From 117335bfcb6de6aaa6e25b53da0706af6ae12130 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 11 Jan 2010 15:54:14 +0300 Subject: [PATCH] obsolete and disable use of ttrss_feeds.hidden --- functions.php | 26 +++++--------------------- mobile/classic/functions.php | 1 - mobile/functions.php | 3 --- modules/backend-rpc.php | 3 +-- modules/pref-feeds.php | 36 ++---------------------------------- 5 files changed, 8 insertions(+), 61 deletions(-) diff --git a/functions.php b/functions.php index ec55467b9..41bd646f0 100644 --- a/functions.php +++ b/functions.php @@ -528,7 +528,7 @@ } else { $result = db_query($link, "SELECT id,update_interval,auth_login, - auth_pass,cache_images,update_method,hidden,last_updated + auth_pass,cache_images,update_method,last_updated FROM ttrss_feeds WHERE id = '$feed'"); } @@ -540,7 +540,6 @@ return false; } - $hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden")); $update_method = db_fetch_result($result, 0, "update_method"); $last_updated = db_fetch_result($result, 0, "last_updated"); @@ -1403,15 +1402,6 @@ catchup_feed($link, $feed, false, $owner_uid); } - if (!$hidden) { - if (defined('DAEMON_EXTENDED_DEBUG') || $_REQUEST['xdebug']) { - _debug("update_rss_feed: updating counters cache..."); - } - - // disabled, purge_feed() does that... - //ccache_update($link, $feed, $owner_uid); - } - purge_feed($link, $feed, 0); db_query($link, "UPDATE ttrss_feeds @@ -2372,7 +2362,6 @@ $age_qpart = getMaxAgeSubquery(); $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE $cat_query - AND hidden = false AND owner_uid = " . $owner_uid); $cat_feeds = array(); @@ -2406,7 +2395,7 @@ ttrss_user_entries, ttrss_labels2, ttrss_user_labels2, ttrss_feeds WHERE label_id = ttrss_labels2.id AND article_id = ref_id AND ttrss_labels2.owner_uid = '$owner_uid' - AND unread = true AND hidden = false AND feed_id = ttrss_feeds.id + AND unread = true AND feed_id = ttrss_feeds.id AND ttrss_user_entries.owner_uid = '$owner_uid'"); $unread = db_fetch_result($result, 0, "unread"); @@ -2438,7 +2427,7 @@ ttrss_user_entries, ttrss_labels2, ttrss_user_labels2, ttrss_feeds WHERE label_id = ttrss_labels2.id AND article_id = ref_id AND ttrss_labels2.owner_uid = '$owner_uid' AND ttrss_labels2.id = '$label_id' - AND unread = true AND hidden = false AND feed_id = ttrss_feeds.id + AND unread = true AND feed_id = ttrss_feeds.id AND ttrss_user_entries.owner_uid = '$owner_uid'"); if (db_num_rows($result) != 0) { @@ -2494,7 +2483,6 @@ $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE parent_feed = '$n_feed' - AND hidden = false AND owner_uid = " . $owner_uid); if (db_num_rows($result) > 0) { @@ -2544,8 +2532,7 @@ if ($n_feed != 0) { $from_qpart = "ttrss_user_entries,ttrss_feeds,ttrss_entries"; - $feeds_qpart = "ttrss_feeds.hidden = false AND - ttrss_user_entries.feed_id = ttrss_feeds.id AND"; + $feeds_qpart = "ttrss_user_entries.feed_id = ttrss_feeds.id AND"; } else { $from_qpart = "ttrss_user_entries,ttrss_entries"; } @@ -3443,8 +3430,7 @@ if ($feed != "0") { $from_qpart = "ttrss_entries,ttrss_user_entries,ttrss_feeds$ext_tables_part"; - $feed_check_qpart = "ttrss_feeds.hidden = false AND - ttrss_user_entries.feed_id = ttrss_feeds.id AND"; + $feed_check_qpart = "ttrss_user_entries.feed_id = ttrss_feeds.id AND"; } else { $from_qpart = "ttrss_entries,ttrss_user_entries$ext_tables_part @@ -3775,7 +3761,6 @@ ref_id = ttrss_entries.id AND feed_id = ttrss_feeds.id AND include_in_digest = true AND $interval_query - AND hidden = false AND ttrss_user_entries.owner_uid = $user_id AND unread = true ORDER BY ttrss_feeds.title, date_entered DESC @@ -4282,7 +4267,6 @@ ON (ttrss_feeds.id = feed_id) WHERE - ttrss_feeds.hidden = false AND ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL ORDER BY $order_by_qpart"; diff --git a/mobile/classic/functions.php b/mobile/classic/functions.php index e7d14da6f..05409d630 100644 --- a/mobile/classic/functions.php +++ b/mobile/classic/functions.php @@ -127,7 +127,6 @@ FROM ttrss_feeds LEFT JOIN ttrss_feed_categories ON (ttrss_feed_categories.id = cat_id) WHERE - ttrss_feeds.hidden = false AND ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL ORDER BY $order_by_qpart"); diff --git a/mobile/functions.php b/mobile/functions.php index ddc5bf790..c1bb61c54 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -52,7 +52,6 @@ AND owner_uid = '$owner_uid') AS unread FROM ttrss_feeds WHERE - ttrss_feeds.hidden = false AND ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL ORDER BY $order_by $limit_qpart"); @@ -127,7 +126,6 @@ AND owner_uid = '$owner_uid') as unread FROM ttrss_feeds WHERE - ttrss_feeds.hidden = false AND ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL AND $cat_query @@ -258,7 +256,6 @@ FROM ttrss_feed_categories, ttrss_feeds WHERE ttrss_feed_categories.owner_uid = $owner_uid AND ttrss_feed_categories.id = cat_id - AND hidden = false GROUP BY ttrss_feed_categories.id, ttrss_feed_categories.title ORDER BY ttrss_feed_categories.title"); diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 87178935c..4bf633d2f 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -651,7 +651,7 @@ print ""; $result = db_query($link, "SELECT id, title, cat_id FROM - ttrss_feeds WHERE hidden = false AND owner_uid = ".$_SESSION["uid"]); + ttrss_feeds WHERE owner_uid = ".$_SESSION["uid"]); while ($line = db_fetch_assoc($result)) { @@ -749,7 +749,6 @@ feed_id,content,updated,unread,marked FROM ttrss_user_entries,ttrss_entries,ttrss_feeds WHERE $unread_qpart $cid_qpart $date_qpart - hidden = false AND ttrss_feeds.id = feed_id AND ref_id = ttrss_entries.id AND ttrss_user_entries.owner_uid = ".$_SESSION["uid"]." diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 0794bc626..835b45041 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -336,7 +336,7 @@ } print " "; + $checked> "; $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content")); @@ -349,17 +349,6 @@ print "
 "; - $hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden")); - - if ($hidden) { - $checked = "checked"; - } else { - $checked = ""; - } - - print "
 "; - $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest")); if ($include_in_digest) { @@ -537,7 +526,7 @@ print "
"; print " "; + $checked> "; print " "; batch_edit_cbox("private", "private_l"); @@ -546,11 +535,6 @@ print " "; batch_edit_cbox("rtl_content", "rtl_content_l"); - print "
 "; - - print " "; batch_edit_cbox("hidden", "hidden_l"); - print "
 "; @@ -603,7 +587,6 @@ $parent_feed = db_escape_string($_POST["parent_feed"]); $private = checkbox_to_sql_bool(db_escape_string($_POST["private"])); $rtl_content = checkbox_to_sql_bool(db_escape_string($_POST["rtl_content"])); - $hidden = checkbox_to_sql_bool(db_escape_string($_POST["hidden"])); $include_in_digest = checkbox_to_sql_bool( db_escape_string($_POST["include_in_digest"])); $cache_images = checkbox_to_sql_bool( @@ -649,7 +632,6 @@ auth_pass = '$auth_pass', private = $private, rtl_content = $rtl_content, - hidden = $hidden, $cache_images_qpart include_in_digest = $include_in_digest, always_display_enclosures = $always_display_enclosures, @@ -706,10 +688,6 @@ $qpart = "private = '$private'"; break; - case "hidden": - $qpart = "hidden = '$hidden'"; - break; - case "include_in_digest": $qpart = "include_in_digest = '$include_in_digest'"; break; @@ -1224,7 +1202,6 @@ F1.cat_id, F2.title AS parent_title, C1.title AS category, - F1.hidden, F1.include_in_digest $show_last_article_qpart FROM @@ -1282,8 +1259,6 @@ $edit_title = htmlspecialchars($line["title"]); $edit_cat = htmlspecialchars($line["category"]); - $hidden = sql_bool_to_bool($line["hidden"]); - $last_error = $line["last_error"]; if (!$edit_cat) $edit_cat = __("Uncategorized"); @@ -1357,13 +1332,6 @@ print "$feed_icon"; } - if ($hidden) { - $edit_title = "$edit_title ". - __('(Hidden)').""; - $last_updated = "$last_updated"; - $last_article = "$last_article"; - } - if ($last_error) { $edit_title = "$edit_title"; $last_updated = "$last_updated";