From 3a0292303e453f38204279b5d1c978a4b9c367e9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 3 Nov 2018 15:08:43 +0300 Subject: [PATCH] php: remove trailing whitespaces --- classes/article.php | 8 +++--- classes/ccache.php | 4 +-- classes/feeds.php | 6 ++--- classes/labels.php | 4 +-- classes/opml.php | 18 ++++++------- classes/pluginhost.php | 2 +- classes/pref/feeds.php | 10 ++++---- classes/pref/users.php | 14 +++++----- plugins/mail/init.php | 2 +- plugins/search_sphinx/sphinxapi.php | 40 ++++++++++++++--------------- plugins/vf_shared/init.php | 4 +-- 11 files changed, 56 insertions(+), 56 deletions(-) diff --git a/classes/article.php b/classes/article.php index 71dfdabc4..c5e73ea02 100755 --- a/classes/article.php +++ b/classes/article.php @@ -126,7 +126,7 @@ class Article extends Handler_Protected { if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) return false; $pdo = Db::pdo(); - + $pdo->beginTransaction(); // only check for our user data here, others might have shared this with different content etc @@ -309,7 +309,7 @@ class Article extends Handler_Protected { if ($tag != '') { $sth = $this->pdo->prepare("INSERT INTO ttrss_tags - (post_int_id, owner_uid, tag_name) + (post_int_id, owner_uid, tag_name) VALUES (?, ?, ?)"); $sth->execute([$int_id, $_SESSION['uid'], $tag]); @@ -642,7 +642,7 @@ class Article extends Handler_Protected { stylesheet_tag("css/default.css")." "; - + $rv['content'] .= "\n"; $rv['content'] .= "\n"; $rv['content'] .= "prepare("SELECT DISTINCT tag_name, - owner_uid as owner FROM ttrss_tags + owner_uid as owner FROM ttrss_tags WHERE post_int_id = (SELECT int_id FROM ttrss_user_entries WHERE ref_id = ? AND owner_uid = ? LIMIT 1) ORDER BY tag_name"); diff --git a/classes/ccache.php b/classes/ccache.php index 87c14e78e..9c5547e7d 100644 --- a/classes/ccache.php +++ b/classes/ccache.php @@ -130,7 +130,7 @@ class CCache { if (!$pcat_fast) { $sth = $pdo->prepare("SELECT id FROM ttrss_feeds - WHERE owner_uid = :uid AND + WHERE owner_uid = :uid AND (cat_id = :cat OR (:cat = 0 AND cat_id IS NULL))"); $sth->execute([":uid" => $owner_uid, ":cat" => $feed_id]); @@ -141,7 +141,7 @@ class CCache { $sth = $pdo->prepare("SELECT SUM(value) AS sv FROM ttrss_counters_cache, ttrss_feeds - WHERE id = feed_id AND + WHERE id = feed_id AND (cat_id = :cat OR (:cat = 0 AND cat_id IS NULL)) AND ttrss_counters_cache.owner_uid = :uid AND ttrss_feeds.owner_uid = :uid"); diff --git a/classes/feeds.php b/classes/feeds.php index 6bf14f45e..90797270e 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -173,7 +173,7 @@ class Feeds extends Handler_Protected { $method_split = explode(":", $method); if ($method == "ForceUpdate" && $feed > 0 && is_numeric($feed)) { - $sth = $this->pdo->prepare("UPDATE ttrss_feeds + $sth = $this->pdo->prepare("UPDATE ttrss_feeds SET last_updated = '1970-01-01', last_update_started = '1970-01-01' WHERE id = ?"); $sth->execute([$feed]); @@ -527,7 +527,7 @@ class Feeds extends Handler_Protected { $tmp_content .= " + class=\"titleWrap hlMenuAttach $hlc_suffix\"> get_hooks(PluginHost::HOOK_SUBSCRIBE_FEED) as $plugin) { $contents = $plugin->hook_subscribe_feed($contents, $url, $auth_login, $auth_pass); } - + if (!$contents) { if (preg_match("/cloudflare\.com/", $fetch_last_error_content)) { $fetch_last_error .= " (feed behind Cloudflare)"; diff --git a/classes/labels.php b/classes/labels.php index 4061de57e..fd9e454bb 100644 --- a/classes/labels.php +++ b/classes/labels.php @@ -42,7 +42,7 @@ class Labels $pdo = Db::pdo(); - $sth = $pdo->prepare("SELECT id, fg_color, bg_color, caption FROM ttrss_labels2 + $sth = $pdo->prepare("SELECT id, fg_color, bg_color, caption FROM ttrss_labels2 WHERE owner_uid = ? ORDER BY caption"); $sth->execute([$owner_uid]); @@ -190,7 +190,7 @@ class Labels $sth->execute([$caption, $owner_uid]); if (!$sth->fetch()) { - $sth = $pdo->prepare("INSERT INTO ttrss_labels2 + $sth = $pdo->prepare("INSERT INTO ttrss_labels2 (caption,owner_uid,fg_color,bg_color) VALUES (?, ?, ?, ?)"); $sth->execute([$caption, $owner_uid, $fg_color, $bg_color]); diff --git a/classes/opml.php b/classes/opml.php index ae995860f..5b7690375 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -75,7 +75,7 @@ class Opml extends Handler_Protected { $sth = $this->pdo->prepare("SELECT id,title FROM ttrss_feed_categories WHERE - (parent_cat = :cat OR (:cat = 0 AND parent_cat IS NULL)) AND + (parent_cat = :cat OR (:cat = 0 AND parent_cat IS NULL)) AND owner_uid = :uid ORDER BY order_id, title"); $sth->execute([':cat' => $cat_id, ':uid' => $owner_uid]); @@ -85,7 +85,7 @@ class Opml extends Handler_Protected { } $fsth = $this->pdo->prepare("select title, feed_url, site_url - FROM ttrss_feeds WHERE + FROM ttrss_feeds WHERE (cat_id = :cat OR (:cat = 0 AND cat_id IS NULL)) AND owner_uid = :uid AND $hide_qpart ORDER BY order_id, title"); @@ -421,9 +421,9 @@ class Opml extends Handler_Protected { $inverse = bool_to_sql_bool($rule["inverse"]); $match_on = json_encode($match_on); - $usth = $this->pdo->prepare("INSERT INTO ttrss_filters2_rules + $usth = $this->pdo->prepare("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,match_on,filter_id,filter_type,reg_exp,cat_filter,inverse) - VALUES + VALUES (NULL, NULL, ?, ?, ?, ?, false, ?)"); $usth->execute([$match_on, $filter_id, $filter_type, $reg_exp, $inverse]); @@ -454,9 +454,9 @@ class Opml extends Handler_Protected { $filter_type = (int)$rule["filter_type"]; $inverse = bool_to_sql_bool($rule["inverse"]); - $usth = $this->pdo->prepare("INSERT INTO ttrss_filters2_rules + $usth = $this->pdo->prepare("INSERT INTO ttrss_filters2_rules (feed_id,cat_id,filter_id,filter_type,reg_exp,cat_filter,inverse) - VALUES + VALUES (?, ?, ?, ?, ?, ?, ?)"); $usth->execute([$feed_id, $cat_id, $filter_id, $filter_type, $reg_exp, $cat_filter, $inverse]); } @@ -467,9 +467,9 @@ class Opml extends Handler_Protected { $action_id = (int)$action["action_id"]; $action_param = $action["action_param"]; - $usth = $this->pdo->prepare("INSERT INTO ttrss_filters2_actions + $usth = $this->pdo->prepare("INSERT INTO ttrss_filters2_actions (filter_id,action_id,action_param) - VALUES + VALUES (?, ?, ?)"); $usth->execute([$filter_id, $action_id, $action_param]); } @@ -613,7 +613,7 @@ class Opml extends Handler_Protected { $parent_cat_id = (int) $parent_cat_id; $sth = $this->pdo->prepare("SELECT id FROM ttrss_feed_categories - WHERE title = :title + WHERE title = :title AND (parent_cat = :parent OR (:parent = 0 AND parent_cat IS NULL)) AND owner_uid = :uid"); diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 5a45f09d4..5c545d18b 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -96,7 +96,7 @@ class PluginHost { function get_pdo() { return $this->pdo; } - + function get_plugin_names() { $names = array(); diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 817966e11..5127b19c3 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -71,7 +71,7 @@ class Pref_Feeds extends Handler_Protected { $fsth = $this->pdo->prepare("SELECT id, title, last_error, ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval FROM ttrss_feeds - WHERE cat_id = :cat AND + WHERE cat_id = :cat AND owner_uid = :uid AND (:search = '' OR (LOWER(title) LIKE :search OR LOWER(feed_url) LIKE :search)) ORDER BY order_id, title"); @@ -238,9 +238,9 @@ class Pref_Feeds extends Handler_Protected { $cat['child_unread'] = 0; $fsth = $this->pdo->prepare("SELECT id, title,last_error, - ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval + ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated, update_interval FROM ttrss_feeds - WHERE cat_id IS NULL AND + WHERE cat_id IS NULL AND owner_uid = :uid AND (:search = '' OR (LOWER(title) LIKE :search OR LOWER(feed_url) LIKE :search)) ORDER BY order_id, title"); @@ -745,7 +745,7 @@ class Pref_Feeds extends Handler_Protected { - +