handle hidden feed attribute, fix broken mobile version
This commit is contained in:
parent
7da377ca8b
commit
0da49badd4
31
backend.php
31
backend.php
|
@ -273,6 +273,7 @@
|
|||
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");
|
||||
|
||||
|
@ -1364,7 +1365,18 @@
|
|||
|
||||
print "<br><input type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"
|
||||
$checked><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><label for=\"hidden\">Hide from feedlist</label>";
|
||||
|
||||
print "</td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
@ -1394,6 +1406,7 @@
|
|||
$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"]));
|
||||
|
||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||
if ($cat_id && $cat_id != 0) {
|
||||
|
@ -1420,7 +1433,8 @@
|
|||
auth_login = '$auth_login',
|
||||
auth_pass = '$auth_pass',
|
||||
private = $private,
|
||||
rtl_content = $rtl_content
|
||||
rtl_content = $rtl_content,
|
||||
hidden = $hidden
|
||||
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
|
||||
}
|
||||
|
||||
|
@ -1568,7 +1582,7 @@
|
|||
|
||||
// print "<h3>Edit Feeds</h3>";
|
||||
|
||||
$result = db_query($link, "SELECT id,title,feed_url,last_error
|
||||
$result = db_query($link, "SELECT id,title,feed_url,last_error
|
||||
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
|
||||
|
||||
if (db_num_rows($result) > 0) {
|
||||
|
@ -1656,7 +1670,8 @@
|
|||
F1.purge_interval,
|
||||
F1.cat_id,
|
||||
F2.title AS parent_title,
|
||||
C1.title AS category
|
||||
C1.title AS category,
|
||||
F1.hidden
|
||||
FROM
|
||||
ttrss_feeds AS F1
|
||||
LEFT JOIN ttrss_feeds AS F2
|
||||
|
@ -1706,6 +1721,8 @@
|
|||
$edit_link = htmlspecialchars(db_unescape_string($line["feed_url"]));
|
||||
$edit_cat = htmlspecialchars(db_unescape_string($line["category"]));
|
||||
|
||||
$hidden = sql_bool_to_bool($line["hidden"]);
|
||||
|
||||
if (!$edit_cat) $edit_cat = "Uncategorized";
|
||||
|
||||
$last_updated = $line["last_updated"];
|
||||
|
@ -1759,6 +1776,12 @@
|
|||
$edit_title = truncate_string($edit_title, 40);
|
||||
$edit_link = truncate_string($edit_link, 60);
|
||||
|
||||
if ($hidden) {
|
||||
$edit_title = "<span class=\"insensitive\">$edit_title (Hidden)</span>";
|
||||
$edit_link = "<span class=\"insensitive\">$edit_link</span>";
|
||||
$last_updated = "<span class=\"insensitive\">$last_updated</span>";
|
||||
}
|
||||
|
||||
$parent_title = $line["parent_title"];
|
||||
if ($parent_title) {
|
||||
$parent_title = "<span class='groupPrompt'>(linked to
|
||||
|
|
|
@ -68,12 +68,13 @@
|
|||
|
||||
error_reporting (0);
|
||||
|
||||
$tmp_result = db_query($link, "SELECT count(id) as count
|
||||
FROM ttrss_entries,ttrss_user_entries
|
||||
$tmp_result = db_query($link, "SELECT count(ttrss_entries.id) as count
|
||||
FROM ttrss_entries,ttrss_user_entries,ttrss_feeds
|
||||
WHERE (" . $line["sql_exp"] . ") AND unread = true AND
|
||||
ttrss_user_entries.ref_id = ttrss_entries.id
|
||||
AND owner_uid = '$owner_uid'");
|
||||
|
||||
ttrss_user_entries.ref_id = ttrss_entries.id AND
|
||||
ttrss_user_entries.feed_id = ttrss_feeds.id
|
||||
AND ttrss_user_entries.owner_uid = '$owner_uid'");
|
||||
|
||||
$count = db_fetch_result($tmp_result, 0, "count");
|
||||
|
||||
$class = "label";
|
||||
|
@ -104,6 +105,7 @@
|
|||
}
|
||||
|
||||
$result = db_query($link, "SELECT ttrss_feeds.*,
|
||||
SUBSTRING(last_updated,1,19) AS last_updated_noms,
|
||||
(SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries
|
||||
WHERE feed_id = ttrss_feeds.id AND
|
||||
ttrss_user_entries.ref_id = ttrss_entries.id AND
|
||||
|
@ -118,6 +120,7 @@
|
|||
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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue