mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 09:15:55 +00:00
move to Article:
+ static function purge_orphans($do_output = false) {
move to Feeds
+ static function getGlobalUnread($user_id = false) {
+ static function getCategoryTitle($cat_id) {
+ static function getLabelUnread($label_id, $owner_uid = false) {
This commit is contained in:
@@ -864,4 +864,17 @@ class Article extends Handler_Protected {
|
||||
return $rv;
|
||||
}
|
||||
|
||||
static function purge_orphans($do_output = false) {
|
||||
|
||||
// purge orphaned posts in main content table
|
||||
$result = db_query("DELETE FROM ttrss_entries WHERE
|
||||
NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id)");
|
||||
|
||||
if ($do_output) {
|
||||
$rows = db_affected_rows($result);
|
||||
_debug("Purged $rows orphaned posts.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user