X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/9e82b53fc5d8cb1e54b5fde774fa68a916f28b4c..7ca15b5853146dd809f2ad3f5b2e1d9dab4f8dd4:/admin_team_delete.php diff --git a/admin_team_delete.php b/admin_team_delete.php index 19de9a7e..b2b462ce 100644 --- a/admin_team_delete.php +++ b/admin_team_delete.php @@ -31,7 +31,7 @@ import('form.Form'); import('ttTeamHelper'); // Access check. -if (!ttAccessCheck(right_administer_site)) { +if (!ttAccessAllowed('administer_site')) { header('Location: access_denied.php'); exit(); } @@ -47,7 +47,10 @@ $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getK if ($request->isPost()) { if ($request->getParameter('btn_delete')) { - if (ttTeamHelper::markDeleted($team_id)) { + import('ttAdmin'); + $admin = new ttAdmin(); + $result = $admin->markGroupDeleted($team_id); + if ($result) { header('Location: admin_teams.php'); exit(); } else @@ -58,7 +61,7 @@ if ($request->isPost()) { header('Location: admin_teams.php'); exit(); } -} // POST +} // isPost $smarty->assign('team_to_delete', $team_name); $smarty->assign('forms', array($form->getName()=>$form->toArray()));