summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-01-24 09:43:30 +0100
committerAndrew Dolgov <[email protected]>2007-01-24 09:43:30 +0100
commit4220d6b0374682f03e5c2195799ed1cbce8f3cc3 (patch)
tree521f34ca90ee8c2950c83e6637d6d9e4e7621eba
parenteb28b131bc2d7354252f61849551a20b617bd5e4 (diff)
store navigator.appName in session object on init
-rw-r--r--functions.php4
-rw-r--r--modules/backend-rpc.php4
-rw-r--r--tt-rss.js4
3 files changed, 10 insertions, 2 deletions
diff --git a/functions.php b/functions.php
index 0b3f7ba9f..4fadff8d9 100644
--- a/functions.php
+++ b/functions.php
@@ -1348,7 +1348,7 @@
return false;
} else {
return true;
- }
+ }
}
function file_is_locked($filename) {
@@ -2742,6 +2742,8 @@
}
+ print '[' . $_SESSION["client.userAgent"] . ']';
+
print "<td class=\"headlineActions$rtl_cpart\">
<ul class=\"headlineDropdownMenu\">
<li class=\"top2\">
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 1a019af5b..b6823e2b7 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -185,6 +185,10 @@
print "<error error-code=\"0\"/>";
print_init_params($link);
print_runtime_info($link);
+
+ # assign client-passed params to session
+ $_SESSION["client.userAgent"] = $_GET["ua"];
+
}
print "</rpc-reply>";
}
diff --git a/tt-rss.js b/tt-rss.js
index 66f6bff3d..0e4c15485 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -364,7 +364,9 @@ function init() {
debug('debug mode activated');
}
- xmlhttp.open("GET", "backend.php?op=rpc&subop=sanityCheck", true);
+ var params = "&ua=" + param_escape(navigator.userAgent);
+
+ xmlhttp.open("GET", "backend.php?op=rpc&subop=sanityCheck" + params, true);
xmlhttp.onreadystatechange=backend_sanity_check_callback;
xmlhttp.send(null);