move some label stuff to labels.php

move getfeedcategory() to Feeds
This commit is contained in:
Andrew Dolgov
2017-05-04 15:36:36 +03:00
parent 904aff7667
commit 0086a89740
3 changed files with 22 additions and 21 deletions

View File

@@ -2184,5 +2184,18 @@ class Feeds extends Handler_Protected {
return $rv;
}
static function getFeedCategory($feed) {
$result = db_query("SELECT cat_id FROM ttrss_feeds
WHERE id = '$feed'");
if (db_num_rows($result) > 0) {
return db_fetch_result($result, 0, "cat_id");
} else {
return false;
}
}
}