X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=plugins%2Fmobile%2Fmobile-functions.php;h=0395ee7a54c5b7eb99c3c3f6bbe2f024670ed0e5;hb=6322ac79a020ab584d412d782d62b2ee77d7c6cf;hp=8e5cb7010a7049cb9f4abb3b13fcfad4117dde87;hpb=aca75cb5cb323535099c7aef46a78ea3cec082f2;p=tt-rss.git diff --git a/plugins/mobile/mobile-functions.php b/plugins/mobile/mobile-functions.php index 8e5cb701..0395ee7a 100644 --- a/plugins/mobile/mobile-functions.php +++ b/plugins/mobile/mobile-functions.php @@ -8,34 +8,34 @@ /* TODO replace with interface to db-prefs */ - function mobile_pref_toggled($link, $id) { - if (get_pref($link, "_MOBILE_$id")) + function mobile_pref_toggled( $id) { + if (get_pref( "_MOBILE_$id")) return "true"; else return ""; } - function mobile_get_pref($link, $id) { + function mobile_get_pref( $id) { //return $_SESSION["mobile-prefs"][$id]; - return get_pref($link, "_MOBILE_$id"); + return get_pref( "_MOBILE_$id"); } - function mobile_set_pref($link, $id, $value) { + function mobile_set_pref( $id, $value) { //$_SESSION["mobile-prefs"][$id] = $value; - return set_pref($link, "_MOBILE_$id", $value); + return set_pref( "_MOBILE_$id", $value); } function mobile_feed_has_icon($id) { return file_exists("../../".ICONS_DIR."/$id.ico"); } - function render_flat_feed_list($link, $offset) { + function render_flat_feed_list( $offset) { $owner_uid = $_SESSION["uid"]; $limit = 0; if (!$offset) $offset = 0; - if (mobile_get_pref($link, "SORT_FEEDS_UNREAD")) { + if (mobile_get_pref( "SORT_FEEDS_UNREAD")) { $order_by = "unread DESC, title"; } else { $order_by = "title"; @@ -47,7 +47,7 @@ $limit_qpart = ""; } - $result = db_query($link, "SELECT id, + $result = db_query( "SELECT id, title, (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries WHERE feed_id = ttrss_feeds.id AND unread = true @@ -85,7 +85,7 @@ $icon_url = "../../images/blank_icon.gif"; } - if ($unread > 0 || !mobile_get_pref($link, "HIDE_READ")) { + if ($unread > 0 || !mobile_get_pref( "HIDE_READ")) { print "
  • " . "". $line["title"] . "
  • "; @@ -103,7 +103,7 @@ } - function render_category($link, $cat_id, $offset) { + function render_category( $cat_id, $offset) { $owner_uid = $_SESSION["uid"]; if ($cat_id >= 0) { @@ -114,13 +114,13 @@ $cat_query = "cat_id IS NULL"; } - if (mobile_get_pref($link, "SORT_FEEDS_UNREAD")) { + if (mobile_get_pref( "SORT_FEEDS_UNREAD")) { $order_by = "unread DESC, title"; } else { $order_by = "title"; } - $result = db_query($link, "SELECT id, + $result = db_query( "SELECT id, title, (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries WHERE feed_id = ttrss_feeds.id AND unread = true @@ -132,7 +132,7 @@ $cat_query ORDER BY $order_by"); - $title = getCategoryTitle($link, $cat_id); + $title = getCategoryTitle( $cat_id); print "