Revision: 747
http://sciret.svn.sourceforge.net/sciret/?rev=747&view=rev
Author: alpeb
Date: 2008-10-22 14:32:45 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
better error message when trying to delete categories that still have subcats
Modified Paths:
--------------
trunk/actions/DeleteCategory.php
Modified: trunk/actions/DeleteCategory.php
===================================================================
--- trunk/actions/DeleteCategory.php 2008-10-21 20:55:21 UTC (rev 746)
+++ trunk/actions/DeleteCategory.php 2008-10-22 14:32:45 UTC (rev 747)
@@ -24,7 +24,8 @@
}
if (!$category->delete()) {
- die('unauthorized action');
+ $_SESSION['message'] = $this->user->lang('This category can\'t be deleted until its sub-categories are deleted');
+ Library::redirect(Library::getLink(array('view' => 'MainView', 'catId' => $catId)));
}
$_SESSION['message'] = $this->user->lang('Category deleted successfully');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|