Merge pull request #5265 from miqrogroove/patch-1

Workaround for Bugs in Class dba
This commit is contained in:
Hypolite Petovan 2018-06-21 11:23:56 -04:00 committed by GitHub
commit 88e532321f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,7 +328,7 @@ class DBClean {
logger("Deleting old conversations. Last created: ".$last_id);
$r = dba::p("SELECT `received`, `item-uri` FROM `conversation`
WHERE `received` < UTC_TIMESTAMP() - INTERVAL ? DAY
ORDER BY `received` LIMIT ?", $days, intval($limit));
ORDER BY `received` LIMIT ".intval($limit), $days);
$count = dba::num_rows($r);
if ($count > 0) {
logger("found old conversations: ".$count);