X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=notification_add.php;h=80f46bb2e65b99ecb02f60799c4337e2abc5458b;hb=a07b6f8bccda226991ced6fe25f1c9c508e423e5;hp=feeaa04832bc0b072833bffd8ff075db9cee7f68;hpb=a7ba11adfecf6cb906749efe5abce688363aef07;p=timetracker.git diff --git a/notification_add.php b/notification_add.php index feeaa048..80f46bb2 100644 --- a/notification_add.php +++ b/notification_add.php @@ -64,11 +64,11 @@ $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->getKey( if ($request->isPost()) { // Validate user input. - if (!$cl_fav_report) $errors->add($i18n->getKey('error.report')); - if (!ttValidCronSpec($cl_cron_spec)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.cron_schedule')); - if (!ttValidEmail($cl_email)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); + if (!$cl_fav_report) $err->add($i18n->getKey('error.report')); + if (!ttValidCronSpec($cl_cron_spec)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.cron_schedule')); + if (!ttValidEmail($cl_email)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email')); - if ($errors->no()) { + if ($err->no()) { // Calculate next execution time. $next = tdCron::getNextOccurrence($cl_cron_spec, mktime()); @@ -82,9 +82,9 @@ if ($request->isPost()) { header('Location: notifications.php'); exit(); } else - $errors->add($i18n->getKey('error.db')); + $err->add($i18n->getKey('error.db')); } -} // POST +} // isPost $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->getKey('title.add_notification'));