]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/DBClean.php
Merge pull request #4193 from annando/item-unification
[friendica.git] / src / Worker / DBClean.php
index 40883d5138420aa50d512bb66fdab2b2e111c4a2..8d1228f018b2dbcc699260203fa3321c2e0bf4f6 100644 (file)
@@ -10,6 +10,8 @@ use Friendica\Core\Config;
 use Friendica\Core\Worker;
 use dba;
 
+require_once 'include/dba.php';
+
 class DBClean {
        public static function execute($stage = 0) {
 
@@ -17,9 +19,6 @@ class DBClean {
                        return;
                }
 
-               // Get the expire days for step 8 and 9
-               $days = Config::get('system', 'dbclean-expire-days', 0);
-
                if ($stage == 0) {
                        self::forkCleanProcess();
                } else {
@@ -31,6 +30,9 @@ class DBClean {
         * @brief Fork the different DBClean processes
         */
        private static function forkCleanProcess() {
+               // Get the expire days for step 8 and 9
+               $days = Config::get('system', 'dbclean-expire-days', 0);
+
                for ($i = 1; $i <= 10; $i++) {
                        // Execute the background script for a step when it isn't finished.
                        // Execute step 8 and 9 only when $days is defined.