mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 04:05:55 +00:00
debug logging system rework:
* support various logging levels per-message * remove hacks like debug_suppress, DAEMON_EXTENDED_DEBUG, etc * _debug() is kept as a compatibility shim for plugins
This commit is contained in:
@@ -936,24 +936,24 @@ class Article extends Handler_Protected {
|
||||
return $rv;
|
||||
}
|
||||
|
||||
static function purge_orphans($do_output = false) {
|
||||
static function purge_orphans() {
|
||||
|
||||
// purge orphaned posts in main content table
|
||||
// purge orphaned posts in main content table
|
||||
|
||||
if (DB_TYPE == "mysql")
|
||||
$limit_qpart = "LIMIT 5000";
|
||||
else
|
||||
$limit_qpart = "";
|
||||
if (DB_TYPE == "mysql")
|
||||
$limit_qpart = "LIMIT 5000";
|
||||
else
|
||||
$limit_qpart = "";
|
||||
|
||||
$pdo = Db::pdo();
|
||||
$res = $pdo->query("DELETE FROM ttrss_entries WHERE
|
||||
$pdo = Db::pdo();
|
||||
$res = $pdo->query("DELETE FROM ttrss_entries WHERE
|
||||
NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) $limit_qpart");
|
||||
|
||||
if ($do_output) {
|
||||
$rows = $res->rowCount();
|
||||
_debug("Purged $rows orphaned posts.");
|
||||
}
|
||||
}
|
||||
if (Debug::enabled()) {
|
||||
$rows = $res->rowCount();
|
||||
Debug::log("Purged $rows orphaned posts.");
|
||||
}
|
||||
}
|
||||
|
||||
static function catchupArticlesById($ids, $cmode, $owner_uid = false) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user