mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
experimentally rebase labels; make base index configurable
This commit is contained in:
@@ -700,7 +700,7 @@ class Feeds extends Handler_Protected {
|
||||
$message = __("No starred articles found to display.");
|
||||
break;
|
||||
default:
|
||||
if ($feed < -10) {
|
||||
if ($feed < LABEL_BASE_INDEX) {
|
||||
$message = __("No articles found to display. You can assign articles to labels manually (see the Actions menu above) or use a filter.");
|
||||
} else {
|
||||
$message = __("No articles found to display.");
|
||||
@@ -777,8 +777,8 @@ class Feeds extends Handler_Protected {
|
||||
|
||||
$result = false;
|
||||
|
||||
if ($feed < -10) {
|
||||
$label_feed = -11-$feed;
|
||||
if ($feed < LABEL_BASE_INDEX) {
|
||||
$label_feed = feed_to_label_id($feed);
|
||||
$result = db_query($this->link, "SELECT id FROM ttrss_labels2 WHERE
|
||||
id = '$label_feed' AND owner_uid = " . $_SESSION['uid']);
|
||||
} else if (!$cat_view && is_numeric($feed) && $feed > 0) {
|
||||
|
||||
@@ -134,7 +134,7 @@ class Pref_Feeds extends Handler_Protected {
|
||||
|
||||
while ($line = db_fetch_assoc($result)) {
|
||||
|
||||
$label_id = -$line['id'] - 11;
|
||||
$label_id = label_to_feed_id($line['id']);
|
||||
|
||||
$feed = $this->feedlist_init_feed($label_id, false, 0);
|
||||
|
||||
@@ -1700,8 +1700,8 @@ class Pref_Feeds extends Handler_Protected {
|
||||
ccache_remove($link, $id, $owner_uid);
|
||||
|
||||
} else {
|
||||
label_remove($link, -11-$id, $owner_uid);
|
||||
ccache_remove($link, -11-$id, $owner_uid);
|
||||
label_remove($link, feed_to_label_id($id), $owner_uid);
|
||||
//ccache_remove($link, $id, $owner_uid); don't think labels are cached
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user