From e9105eb50dfbfbf33c75a475f21fb7f7ddf76b48 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 11 Jan 2010 14:06:19 +0300 Subject: mobile: properly save preferences --- mobile/functions.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mobile/functions.php') diff --git a/mobile/functions.php b/mobile/functions.php index 39f492a25..2a689fb77 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -4,16 +4,20 @@ /* TODO replace with interface to db-prefs */ function mobile_pref_toggled($link, $id) { - if ($_SESSION["mobile-prefs"][$id]) return "true"; - + if (get_pref($link, "_MOBILE_$id")) + return "true"; + else + return ""; } function mobile_get_pref($link, $id) { - return $_SESSION["mobile-prefs"][$id]; + //return $_SESSION["mobile-prefs"][$id]; + return get_pref($link, "_MOBILE_$id"); } function mobile_set_pref($link, $id, $value) { - $_SESSION["mobile-prefs"][$id] = $value; + //$_SESSION["mobile-prefs"][$id] = $value; + return set_pref($link, "_MOBILE_$id", $value); } function mobile_feed_has_icon($id) { -- cgit v1.2.3