1
0
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:
Andrew Dolgov
2018-11-30 08:34:29 +03:00
parent 758752684c
commit c10a43069e
16 changed files with 326 additions and 311 deletions

View File

@@ -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) {