From: Matthias Schmidt Date: Fri, 12 Aug 2011 14:44:53 +0000 (+0200) Subject: Alias isn't needed anymore since the Cronjob-interface is not ICronjob X-Git-Tag: 2.0.0_Beta_1~1882^2~2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=48c6d3635857761a2bebf390cc0e40478c6077b7;p=GitHub%2FWoltLab%2FWCF.git Alias isn't needed anymore since the Cronjob-interface is not ICronjob --- diff --git a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php index c858370b3b..e06007e4c3 100644 --- a/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php @@ -1,7 +1,7 @@ cronjobEditors as $cronjobEditor) { // mark cronjob as being executed $cronjobEditor->update(array( - 'state' => CronjobObj::EXECUTING + 'state' => Cronjob::EXECUTING )); // create log entry @@ -86,7 +86,7 @@ class CronjobScheduler extends SingletonFactory { 'afterNextExec' => $afterNextExec, 'failCount' => 0, 'nextExec' => $nextExec, - 'state' => CronjobObj::READY + 'state' => Cronjob::READY )); } } @@ -100,7 +100,7 @@ class CronjobScheduler extends SingletonFactory { $conditions->add("(cronjob.nextExec <= ? OR cronjob.afterNextExec <= ?)", array(TIME_NOW, TIME_NOW)); $conditions->add("cronjob.active = ?", array(1)); $conditions->add("cronjob.failCount < ?", array(3)); - $conditions->add("cronjob.state = ?", array(CronjobObj::READY)); + $conditions->add("cronjob.state = ?", array(Cronjob::READY)); $sql = "SELECT cronjob.* FROM wcf".WCF_N."_cronjob cronjob @@ -108,16 +108,16 @@ class CronjobScheduler extends SingletonFactory { $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($conditions->getParameters()); while ($row = $statement->fetchArray()) { - $cronjob = new CronjobObj(null, $row); + $cronjob = new Cronjob(null, $row); $cronjobEditor = new CronjobEditor($cronjob); $executeCronjob = true; $data = array( - 'state' => CronjobObj::PENDING + 'state' => Cronjob::PENDING ); // reset cronjob if it got stuck before and afterNextExec is in the past - if ($cronjobEditor->afterNextExec <= TIME_NOW && $cronjobEditor->state == CronjobObj::EXECUTING) { + if ($cronjobEditor->afterNextExec <= TIME_NOW && $cronjobEditor->state == Cronjob::EXECUTING) { $failCount = $cronjobEditor->failCount + 1; $data['failCount'] = $failCount; @@ -128,7 +128,7 @@ class CronjobScheduler extends SingletonFactory { } } // ignore cronjobs which seem to be running - else if ($cronjobEditor->nextExec <= TIME_NOW && $cronjobEditor->state != CronjobObj::READY) { + else if ($cronjobEditor->nextExec <= TIME_NOW && $cronjobEditor->state != Cronjob::READY) { $executeCronjob = false; }