Prevents erroneous cronjobs form causing repeated cache reset
authorMatthias Schmidt <gravatronics@live.com>
Sat, 27 Apr 2013 21:46:24 +0000 (23:46 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 27 Apr 2013 21:46:24 +0000 (23:46 +0200)
Fixes #1194

wcfsetup/install/files/lib/system/cache/builder/CronjobCacheBuilder.class.php

index 1df0ffd9ddb86a3bd6ce3b0fab2e3306ead5a006..0e1b60d2cd2c7d42b6b5108ea69c6e6692cb861a 100644 (file)
@@ -17,11 +17,12 @@ class CronjobCacheBuilder extends AbstractCacheBuilder {
         * @see wcf\system\cache\builder\AbstractCacheBuilder::rebuild()
         */
        public function rebuild(array $parameters) {
-               $sql = "SELECT          MIN(nextExec) AS nextExec,
-                                       MIN(afterNextExec) AS afterNextExec
-                       FROM            wcf".WCF_N."_cronjob";
+               $sql = "SELECT  MIN(nextExec) AS nextExec,
+                               MIN(afterNextExec) AS afterNextExec
+                       FROM    wcf".WCF_N."_cronjob
+                       WHERE   isDisabled = ?";
                $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute();
+               $statement->execute(array(0));
                $row = $statement->fetchArray();
                
                return array(