X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=admin_team_delete.php;h=b2b462ce6b3cda98a8186e143c1f66b031d2e437;hb=73bd55c5aaa9459806ef9fa899cc5a24513727bc;hp=19de9a7e4525d8dd1a23af2a28229416196ec458;hpb=9e82b53fc5d8cb1e54b5fde774fa68a916f28b4c;p=timetracker.git 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()));