コード例 #1
0
ファイル: form.php プロジェクト: DECAF/redaxo
 protected function save()
 {
     $nexttime = $this->getElement($this->mainFieldset, 'nexttime');
     $timestamp = rex_cronjob_manager_sql::calculateNextTime($this->intervalField->getValue());
     $nexttime->setValue($timestamp ? rex_sql::datetime($timestamp) : null);
     $return = parent::save();
     rex_cronjob_manager_sql::factory()->saveNextTime();
     return $return;
 }
コード例 #2
0
ファイル: form.php プロジェクト: skerbis/redaxo
 protected function save()
 {
     if ($this->isEditMode()) {
         $nexttime = $this->getElement($this->mainFieldset, 'nexttime');
         if (strtotime($nexttime->getValue()) > 0) {
             $interval = $this->getElement($this->mainFieldset, 'interval');
             $nexttime->setValue(rex_sql::datetime(rex_cronjob_manager_sql::calculateNextTime($interval->getValue())));
         }
     }
     $return = parent::save();
     rex_cronjob_manager_sql::factory()->saveNextTime();
     return $return;
 }