]> git.wh0rd.org Git - tt-rss.git/commitdiff
store navigator.appName in session object on init
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 24 Jan 2007 08:43:30 +0000 (09:43 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 24 Jan 2007 08:43:30 +0000 (09:43 +0100)
functions.php
modules/backend-rpc.php
tt-rss.js

index 0b3f7ba9fe4c10a0c3d0b4f26c1fb928e2ece6f9..4fadff8d936c51efc3d661d3900116ca57abcda1 100644 (file)
                        return false;
                } else {
                        return true;
-               } 
+               }
        }
 
        function file_is_locked($filename) {
 
                        }
 
+                       print '[' . $_SESSION["client.userAgent"] . ']';
+
                        print "<td class=\"headlineActions$rtl_cpart\">
                                <ul class=\"headlineDropdownMenu\">
                                <li class=\"top2\">
index 1a019af5ba8828a83b1c98567b7f355cb566f921..b6823e2b7eddbd6f87909f65d65a728567caaf1c 100644 (file)
                                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>";
                }               
index 66f6bff3dda6efaad952ad14649a5dd0aa278003..0e4c15485995af926e5a53860314a91a9c730f57 100644 (file)
--- 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);