mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 01:46:00 +00:00
OPML: multiple fixes
- remove unused integer indexes when exporting filters as JSON - fix warning when importing filters without rules - properly assign category IDs for category filter rules - fix warning: check if outline attributes like xmlUrl are set before trying to use them - fix warning: don't try to use libxml_disable_entity_loader on PHP 8
This commit is contained in:
@@ -1105,6 +1105,30 @@ class Feeds extends Handler_Protected {
|
||||
}
|
||||
}
|
||||
|
||||
/** $owner_uid defaults to $_SESSION['uid] */
|
||||
static function _find_by_title(string $title, bool $cat = false, int $owner_uid = 0) {
|
||||
|
||||
$res = false;
|
||||
|
||||
if ($cat) {
|
||||
$res = ORM::for_table('ttrss_feed_categories')
|
||||
->where('owner_uid', $owner_uid ? $owner_uid : $_SESSION['uid'])
|
||||
->where('title', $title)
|
||||
->find_one();
|
||||
} else {
|
||||
$res = ORM::for_table('ttrss_feeds')
|
||||
->where('owner_uid', $owner_uid ? $owner_uid : $_SESSION['uid'])
|
||||
->where('title', $title)
|
||||
->find_one();
|
||||
}
|
||||
|
||||
if ($res) {
|
||||
return $res->id;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static function _get_title($id, bool $cat = false) {
|
||||
$pdo = Db::pdo();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user