[pLog-svn] r4623 - plog/branches/lifetype-1.2/class/action/admin

oscar at devel.lifetype.net oscar at devel.lifetype.net
Tue Jan 30 04:49:45 EST 2007


Author: oscar
Date: 2007-01-30 04:49:45 -0500 (Tue, 30 Jan 2007)
New Revision: 4623

Modified:
   plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php
Log:
Fix for issue 1161 (http://bugs.lifetype.net/view.php?id=1161), it required a new locale string so it wasn't possible to fix it in 1.1.5.

Modified: plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php	2007-01-30 07:31:15 UTC (rev 4622)
+++ plog/branches/lifetype-1.2/class/action/admin/admindeleteblogcategoryaction.class.php	2007-01-30 09:49:45 UTC (rev 4623)
@@ -54,6 +54,12 @@
 			$totalOk = 0;
 			
             foreach( $this->_categoryIds as $categoryId ) {
+				// if there's only one blog category left, we can't do this
+				if( $categories->getNumBlogCategories() == 1 ) {
+					$errorMessage .= $this->_locale->tr( "error_cannot_delete_last_blog_category" );
+					break;
+				}
+	
             	// get the category
                 $category   = $categories->getBlogCategory( $categoryId );
 				if( $category ) {



More information about the pLog-svn mailing list