Introduced ttAdmin class for admin tasks.
[timetracker.git] / notification_delete.php
index a8a2e49..0b6cf5c 100644 (file)
@@ -31,7 +31,7 @@ import('form.Form');
 import('ttNotificationHelper');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessAllowed('manage_advanced_settings') || !$user->isPluginEnabled('no')) {
   header('Location: access_denied.php');
   exit();
 }
@@ -55,7 +55,7 @@ if ($request->isPost()) {
         $err->add($i18n->getKey('error.db'));
     } else
       $err->add($i18n->getKey('error.db'));
-  } else if ($request->getParameter('btn_cancel')) {
+  } elseif ($request->getParameter('btn_cancel')) {
     header('Location: notifications.php');
     exit();
   }