Fixed issue #4 - copy-paste error in fillDropdowns().
[timetracker.git] / notification_delete.php
index 6723824..50c3395 100644 (file)
@@ -52,14 +52,14 @@ if ($request->isPost()) {
         header('Location: notifications.php');
         exit();
       } else
-        $errors->add($i18n->getKey('error.db'));
+        $err->add($i18n->getKey('error.db'));
     } else
-      $errors->add($i18n->getKey('error.db'));
-  } else if ($request->getParameter('btn_cancel')) {
+      $err->add($i18n->getKey('error.db'));
+  } elseif ($request->getParameter('btn_cancel')) {
     header('Location: notifications.php');
     exit();
   }
-} // POST
+} // isPost
 
 $smarty->assign('notification_to_delete', $notification_to_delete);
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));