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

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Jun 9 13:14:03 EDT 2008


Author: jondaley
Date: 2008-06-09 13:14:03 -0400 (Mon, 09 Jun 2008)
New Revision: 6537

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php
Log:
made logic clearer (and fixed a bug that I didn't see until the logic was changed)

Modified: plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php	2008-06-09 17:11:37 UTC (rev 6536)
+++ plog/branches/lifetype-1.2/class/action/admin/adminupdateresourceaction.class.php	2008-06-09 17:14:03 UTC (rev 6537)
@@ -41,18 +41,17 @@
 		
 		function validate()
 		{
-			if( !parent::validate()) {
-				$resources = new GalleryResources();
-				$resource = $resources->getResource( $this->_request->getValue("resourceId"), $this->_blogInfo->getId());
-				if( !$resource ) {	
-					$this->setValidationErrorView( new AdminResourcesListView( $this->_blogInfo ));
-					$this->setCommonData();
-					return false;
-				}
-				$this->_view->setValue( "resource", $resource );
-				
-				return false;
-			}
+            if(!parent::validate())
+                return false;
+            
+            $resources = new GalleryResources();
+            $resource = $resources->getResource( $this->_request->getValue("resourceId"), $this->_blogInfo->getId());
+            if( !$resource ) {	
+                $this->setValidationErrorView( new AdminResourcesListView( $this->_blogInfo ));
+                $this->setCommonData();
+                return false;
+            }
+            $this->_view->setValue( "resource", $resource );
 			
 			return true;
 		}



More information about the pLog-svn mailing list