]> git.wh0rd.org Git - tt-rss.git/commitdiff
rename print_init_params() to make_init_params()
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Nov 2010 13:25:33 +0000 (16:25 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Nov 2010 13:25:33 +0000 (16:25 +0300)
functions.php
modules/backend-rpc.php

index 87a76e1dd50d36612698b2b9df32d18528cae027..59939b967c5d9a37e859905014e1fe35be519250 100644 (file)
                return array("param" => $param, "value" => $value);
        }
 
-       function print_init_params($link) {
-               print "<init-params><![CDATA[";
-
+       function make_init_params($link) {
                $params = array();
 
                array_push($params, make_init_param("theme", get_user_theme($link)));
                array_push($params, make_init_param("collapsed_feedlist", 
                        (int) get_pref($link, "_COLLAPSED_FEEDLIST")));
 
-               print json_encode($params);
-
-               print "]]></init-params>";
+               return $params;
        }
 
        function print_runtime_info($link) {
index 5ff35b4091a584e8c92a2993bf51dee2e8d6d22d..1645db96e213ffd7779b16bf4b565c80bb4acf74 100644 (file)
                        print "<rpc-reply>";
                        if (sanity_check($link)) {
                                print "<error error-code=\"0\"/>";
-                               print_init_params($link);
+
+                               print "<init-params><![CDATA[";
+                               print json_encode(make_init_params($link));
+                               print "]]></init-params>";
+
                                print_runtime_info($link);
 
                                # assign client-passed params to session