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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Fri Oct 22 12:25:06 EDT 2010


Author: jondaley
Date: 2010-10-22 12:25:06 -0400 (Fri, 22 Oct 2010)
New Revision: 7073

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminaddarticlecategoryaction.class.php
Log:
display error properly if there is an error when adding the category.  I think the view init code changed in 1.2 (or maybe even 1.0?) and this code wasn't updated

Modified: plog/branches/lifetype-1.2/class/action/admin/adminaddarticlecategoryaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminaddarticlecategoryaction.class.php	2010-10-22 15:54:58 UTC (rev 7072)
+++ plog/branches/lifetype-1.2/class/action/admin/adminaddarticlecategoryaction.class.php	2010-10-22 16:25:06 UTC (rev 7073)
@@ -89,11 +89,13 @@
 				$this->setCommonData();				
             }
             else {
-				// if there was an error, we should say so... as well as not changing the view since
-				// we're going back to the original view where we can add the category
+                    // display an error
+                $this->_view = new AdminTemplatedView( $this->_blogInfo, "newpostcategory" );
 				$this->_view->setError( true );
-				$this->_view->setErrorMessage( $this->_locale->tr("error_adding_article_category" ));
+				$this->_view->setErrorMessage(
+                    $this->_locale->tr("error_adding_article_category" ));
 				$this->setCommonData( true );
+                return false;
             }
 
             // better to return true if everything fine



More information about the pLog-svn mailing list