obsolete and disable use of ttrss_feeds.hidden

This commit is contained in:
Andrew Dolgov 2010-01-11 15:54:14 +03:00
parent 4703094553
commit 117335bfcb
5 changed files with 8 additions and 61 deletions

View File

@ -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";

View File

@ -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");

View File

@ -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");

View File

@ -651,7 +651,7 @@
print "<feeds>";
$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"]."

View File

@ -336,7 +336,7 @@
}
print "<input type=\"checkbox\" name=\"private\" id=\"private\"
$checked>&nbsp;<label for=\"private\">".__('Hide from "Other Feeds"')."</label>";
$checked>&nbsp;<label for=\"private\">".__('Hide from Popular feeds')."</label>";
$rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
@ -349,17 +349,6 @@
print "<br/><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
$checked>&nbsp;<label for=\"rtl_content\">".__('Right-to-left content')."</label>";
$hidden = sql_bool_to_bool(db_fetch_result($result, 0, "hidden"));
if ($hidden) {
$checked = "checked";
} else {
$checked = "";
}
print "<br/><input type=\"checkbox\" id=\"hidden\" name=\"hidden\"
$checked>&nbsp;<label for=\"hidden\">".__('Hide from my feed list')."</label>";
$include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest"));
if ($include_in_digest) {
@ -537,7 +526,7 @@
print "<div style=\"line-height : 100%\">";
print "<input disabled type=\"checkbox\" name=\"private\" id=\"private\"
$checked>&nbsp;<label id=\"private_l\" class='insensitive' for=\"private\">".__('Hide from "Other Feeds"')."</label>";
$checked>&nbsp;<label id=\"private_l\" class='insensitive' for=\"private\">".__('Hide from Popular feeds"')."</label>";
print "&nbsp;"; batch_edit_cbox("private", "private_l");
@ -546,11 +535,6 @@
print "&nbsp;"; batch_edit_cbox("rtl_content", "rtl_content_l");
print "<br/><input disabled type=\"checkbox\" id=\"hidden\" name=\"hidden\"
$checked>&nbsp;<label class='insensitive' id=\"hidden_l\" for=\"hidden\">".__('Hide from my feed list')."</label>";
print "&nbsp;"; batch_edit_cbox("hidden", "hidden_l");
print "<br/><input disabled type=\"checkbox\" id=\"include_in_digest\"
name=\"include_in_digest\"
$checked>&nbsp;<label id=\"include_in_digest_l\" class='insensitive' for=\"include_in_digest\">".__('Include in e-mail digest')."</label>";
@ -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 "<td $onclick class='feedIcon'>$feed_icon</td>";
}
if ($hidden) {
$edit_title = "<span class=\"insensitive\">$edit_title ".
__('(Hidden)')."</span>";
$last_updated = "<span class=\"insensitive\">$last_updated</span>";
$last_article = "<span class=\"insensitive\">$last_article</span>";
}
if ($last_error) {
$edit_title = "<span class=\"feed_error\">$edit_title</span>";
$last_updated = "<span class=\"feed_error\">$last_updated</span>";