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) {
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