From: Matthias Schmidt Date: Sat, 27 Apr 2013 21:46:24 +0000 (+0200) Subject: Prevents erroneous cronjobs form causing repeated cache reset X-Git-Tag: 2.0.0_Beta_1~274^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c800bcaad59318905be38f3631fb792ea770cc9;p=GitHub%2FWoltLab%2FWCF.git Prevents erroneous cronjobs form causing repeated cache reset Fixes #1194 --- diff --git a/wcfsetup/install/files/lib/system/cache/builder/CronjobCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/CronjobCacheBuilder.class.php index 1df0ffd9dd..0e1b60d2cd 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/CronjobCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/CronjobCacheBuilder.class.php @@ -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(