]> git.mxchange.org Git - friendica.git/commitdiff
Update DBClean.php
authormiqrogroove <miqrogroove@gmail.com>
Thu, 21 Jun 2018 12:27:36 +0000 (08:27 -0400)
committerGitHub <noreply@github.com>
Thu, 21 Jun 2018 12:27:36 +0000 (08:27 -0400)
src/Worker/DBClean.php

index eeddea4c3eb054fc5acb06d06016afc727fa0028..ffeee5dd68ef00003f8163b23511088722f8f4d3 100644 (file)
@@ -323,12 +323,12 @@ class DBClean {
                        Config::set('system', 'dbclean-last-id-9', $last_id);
                } elseif ($stage == 10) {
                        $last_id = Config::get('system', 'dbclean-last-id-10', 0);
-                       $days = intval(Config::get('system', 'dbclean_expire_conversation', 7));
+                       $days = intval(Config::get('system', 'dbclean_expire_conversation', 90));
 
                        logger("Deleting old conversations. Last created: ".$last_id);
                        $r = dba::p("SELECT `received`, `item-uri` FROM `conversation`
-                                       WHERE `received` < UTC_TIMESTAMP() - INTERVAL $days DAY
-                                       ORDER BY `received` LIMIT ".intval($limit));
+                                       WHERE `received` < UTC_TIMESTAMP() - INTERVAL ? DAY
+                                       ORDER BY `received` LIMIT ?", $days, intval($limit));
                        $count = dba::num_rows($r);
                        if ($count > 0) {
                                logger("found old conversations: ".$count);