$ids = explode(",", clean($_REQUEST["ids"]));
$label_id = clean($_REQUEST["lid"]);
- $label = db_escape_string(Labels::find_caption($label_id,
- $_SESSION["uid"]));
+ $label = Labels::find_caption($label_id, $_SESSION["uid"]);
$reply["info-for-headlines"] = array();
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) {