From a42c55f02b7e313ab61bf826794d0888f2dceae1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Apr 2013 18:34:18 +0400 Subject: fix blank character after opening bracket in function calls --- plugins/mobile/article.php | 12 ++--- plugins/mobile/backend.php | 24 +++++----- plugins/mobile/cat.php | 6 +-- plugins/mobile/feed.php | 14 +++--- plugins/mobile/home.php | 8 ++-- plugins/mobile/index.php | 8 ++-- plugins/mobile/mobile-functions.php | 90 ++++++++++++++++++------------------- plugins/mobile/prefs.php | 14 +++--- 8 files changed, 88 insertions(+), 88 deletions(-) (limited to 'plugins/mobile') diff --git a/plugins/mobile/article.php b/plugins/mobile/article.php index 17fc39395..f51c8962c 100644 --- a/plugins/mobile/article.php +++ b/plugins/mobile/article.php @@ -20,13 +20,13 @@ init_plugins($link); - login_sequence( true); + login_sequence(true); - $id = db_escape_string( $_REQUEST["id"]); - $feed_id = db_escape_string( $_REQUEST["feed"]); - $cat_id = db_escape_string( $_REQUEST["cat"]); - $is_cat = db_escape_string( $_REQUEST["is_cat"]); + $id = db_escape_string($_REQUEST["id"]); + $feed_id = db_escape_string($_REQUEST["feed"]); + $cat_id = db_escape_string($_REQUEST["cat"]); + $is_cat = db_escape_string($_REQUEST["is_cat"]); - render_article( $id, $feed_id, $cat_id, $is_cat); + render_article($id, $feed_id, $cat_id, $is_cat); ?> diff --git a/plugins/mobile/backend.php b/plugins/mobile/backend.php index a62f462d5..872798814 100644 --- a/plugins/mobile/backend.php +++ b/plugins/mobile/backend.php @@ -31,28 +31,28 @@ switch ($op) { case "toggleMarked": - $cmode = db_escape_string( $_REQUEST["mark"]); - $id = db_escape_string( $_REQUEST["id"]); + $cmode = db_escape_string($_REQUEST["mark"]); + $id = db_escape_string($_REQUEST["id"]); - markArticlesById( array($id), $cmode); + markArticlesById(array($id), $cmode); break; case "togglePublished": - $cmode = db_escape_string( $_REQUEST["pub"]); - $id = db_escape_string( $_REQUEST["id"]); + $cmode = db_escape_string($_REQUEST["pub"]); + $id = db_escape_string($_REQUEST["id"]); - publishArticlesById( array($id), $cmode); + publishArticlesById(array($id), $cmode); break; case "toggleUnread": - $cmode = db_escape_string( $_REQUEST["unread"]); - $id = db_escape_string( $_REQUEST["id"]); + $cmode = db_escape_string($_REQUEST["unread"]); + $id = db_escape_string($_REQUEST["id"]); - catchupArticlesById( array($id), $cmode); + catchupArticlesById(array($id), $cmode); break; case "setPref": - $id = db_escape_string( $_REQUEST["id"]); - $value = db_escape_string( $_REQUEST["to"]); - mobile_set_pref( $id, $value); + $id = db_escape_string($_REQUEST["id"]); + $value = db_escape_string($_REQUEST["to"]); + mobile_set_pref($id, $value); print_r($_SESSION); break; default: diff --git a/plugins/mobile/cat.php b/plugins/mobile/cat.php index ec5bbf3d9..5164d0049 100644 --- a/plugins/mobile/cat.php +++ b/plugins/mobile/cat.php @@ -20,10 +20,10 @@ init_plugins($link); - login_sequence( true); + login_sequence(true); - $cat_id = db_escape_string( $_REQUEST["id"]); + $cat_id = db_escape_string($_REQUEST["id"]); - render_category( $cat_id); + render_category($cat_id); ?> diff --git a/plugins/mobile/feed.php b/plugins/mobile/feed.php index 08e916e21..e09f9432a 100644 --- a/plugins/mobile/feed.php +++ b/plugins/mobile/feed.php @@ -20,14 +20,14 @@ init_plugins($link); - login_sequence( true); + login_sequence(true); - $feed_id = db_escape_string( $_REQUEST["id"]); - $cat_id = db_escape_string( $_REQUEST["cat"]); - $offset = (int) db_escape_string( $_REQUEST["skip"]); - $search = db_escape_string( $_REQUEST["search"]); - $is_cat = (bool) db_escape_string( $_REQUEST["is_cat"]); + $feed_id = db_escape_string($_REQUEST["id"]); + $cat_id = db_escape_string($_REQUEST["cat"]); + $offset = (int) db_escape_string($_REQUEST["skip"]); + $search = db_escape_string($_REQUEST["search"]); + $is_cat = (bool) db_escape_string($_REQUEST["is_cat"]); - render_headlines_list( $feed_id, $cat_id, $offset, $search, $is_cat); + render_headlines_list($feed_id, $cat_id, $offset, $search, $is_cat); ?> diff --git a/plugins/mobile/home.php b/plugins/mobile/home.php index 57b18cd85..71ef81def 100644 --- a/plugins/mobile/home.php +++ b/plugins/mobile/home.php @@ -20,14 +20,14 @@ init_plugins($link); - login_sequence( true); + login_sequence(true); - $use_cats = mobile_get_pref( 'ENABLE_CATS'); - $offset = (int) db_escape_string( $_REQUEST["skip"]); + $use_cats = mobile_get_pref('ENABLE_CATS'); + $offset = (int) db_escape_string($_REQUEST["skip"]); if ($use_cats) { render_categories_list($link); } else { - render_flat_feed_list( $offset); + render_flat_feed_list($offset); } ?> diff --git a/plugins/mobile/index.php b/plugins/mobile/index.php index 8202f4043..7154ebdc2 100644 --- a/plugins/mobile/index.php +++ b/plugins/mobile/index.php @@ -20,7 +20,7 @@ init_plugins($link); - login_sequence( true); + login_sequence(true); ?> @@ -76,13 +76,13 @@ diff --git a/plugins/mobile/mobile-functions.php b/plugins/mobile/mobile-functions.php index 0395ee7a5..dd5914516 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( $id) { - if (get_pref( "_MOBILE_$id")) + function mobile_pref_toggled($id) { + if (get_pref("_MOBILE_$id")) return "true"; else return ""; } - function mobile_get_pref( $id) { + function mobile_get_pref($id) { //return $_SESSION["mobile-prefs"][$id]; - return get_pref( "_MOBILE_$id"); + return get_pref("_MOBILE_$id"); } - function mobile_set_pref( $id, $value) { + function mobile_set_pref($id, $value) { //$_SESSION["mobile-prefs"][$id] = $value; - return set_pref( "_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( $offset) { + function render_flat_feed_list($offset) { $owner_uid = $_SESSION["uid"]; $limit = 0; if (!$offset) $offset = 0; - if (mobile_get_pref( "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( "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( "HIDE_READ")) { + if ($unread > 0 || !mobile_get_pref("HIDE_READ")) { print "
  • " . "". $line["title"] . "
  • "; @@ -103,7 +103,7 @@ } - function render_category( $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( "SORT_FEEDS_UNREAD")) { + if (mobile_get_pref("SORT_FEEDS_UNREAD")) { $order_by = "unread DESC, title"; } else { $order_by = "title"; } - $result = db_query( "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( $cat_id); + $title = getCategoryTitle($cat_id); print "