Commit 5b037fa6760f7df663520af9d106e1c8d14895c6
1 parent
2bab55d7
Add deleteGroup method.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4322 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
12 additions
and
1 deletions
presentation/lookAndFeel/knowledgeTree/administration/groupmanagement/groupManagement.php
| @@ -378,7 +378,18 @@ class KTGroupAdminDispatcher extends KTAdminDispatcher { | @@ -378,7 +378,18 @@ class KTGroupAdminDispatcher extends KTAdminDispatcher { | ||
| 378 | $this->commitTransaction(); | 378 | $this->commitTransaction(); |
| 379 | $this->successRedirectToMain('Group "' . $group_name . '" created.'); | 379 | $this->successRedirectToMain('Group "' . $group_name . '" created.'); |
| 380 | } | 380 | } |
| 381 | + | ||
| 382 | + function do_deleteGroup() { | ||
| 383 | + $aErrorOptions = array( | ||
| 384 | + 'redirect_to' => array('main'), | ||
| 385 | + ); | ||
| 386 | + $oGroup = $this->oValidator->validateGroup($_REQUEST['group_id'], $aErrorOptions); | ||
| 387 | + $sGroupName = $oGroup->getName(); | ||
| 388 | + $res = $oGroup->delete(); | ||
| 389 | + $this->oValidator->notError($res, $aErrorOptions); | ||
| 390 | + $this->successRedirectToMain(sprintf('Group "%s" deleted.', $sGroupName)); | ||
| 391 | + } | ||
| 381 | 392 | ||
| 382 | } | 393 | } |
| 383 | 394 | ||
| 384 | -?> | ||
| 385 | \ No newline at end of file | 395 | \ No newline at end of file |
| 396 | +?> |