summaryrefslogtreecommitdiff
path: root/include/labels.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-05-04 15:36:36 +0300
committerAndrew Dolgov <[email protected]>2017-05-04 15:36:36 +0300
commit0086a8974069efb38ad1345a74e568e001f17f92 (patch)
tree63a7c350e61364b068469361bf16f0e2c3bb54e9 /include/labels.php
parent904aff76671cd1c806546014992bab34fec12dd8 (diff)
move some label stuff to labels.php
move getfeedcategory() to Feeds
Diffstat (limited to 'include/labels.php')
-rw-r--r--include/labels.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/labels.php b/include/labels.php
index fd0d40af6..f39f092db 100644
--- a/include/labels.php
+++ b/include/labels.php
@@ -1,4 +1,12 @@
<?php
+ function label_to_feed_id($label) {
+ return LABEL_BASE_INDEX - 1 - abs($label);
+ }
+
+ function feed_to_label_id($feed) {
+ return LABEL_BASE_INDEX - 1 + abs($feed);
+ }
+
function label_find_id($label, $owner_uid) {
$result = db_query(
"SELECT id FROM ttrss_labels2 WHERE caption = '$label'