summaryrefslogtreecommitdiff
path: root/mobile
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-01-11 14:06:19 +0300
committerAndrew Dolgov <[email protected]>2010-01-11 14:06:19 +0300
commite9105eb50dfbfbf33c75a475f21fb7f7ddf76b48 (patch)
treea4111773c53de1fc8a347a8e8c0cc7d4846b1529 /mobile
parentfbaca24658379ea3efe92dbeb0f779f95c02fe6a (diff)
mobile: properly save preferences
Diffstat (limited to 'mobile')
-rw-r--r--mobile/functions.php12
1 files changed, 8 insertions, 4 deletions
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) {