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

mark at devel.lifetype.net mark at devel.lifetype.net
Fri Jun 20 15:24:30 EDT 2008


Author: mark
Date: 2008-06-20 15:24:30 -0400 (Fri, 20 Jun 2008)
New Revision: 6609

Modified:
   plog/branches/lifetype-1.2/class/action/admin/chooser/adminresourcelistaction.class.php
Log:
Validate the albumId

Modified: plog/branches/lifetype-1.2/class/action/admin/chooser/adminresourcelistaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/chooser/adminresourcelistaction.class.php	2008-06-20 19:24:10 UTC (rev 6608)
+++ plog/branches/lifetype-1.2/class/action/admin/chooser/adminresourcelistaction.class.php	2008-06-20 19:24:30 UTC (rev 6609)
@@ -20,10 +20,11 @@
         function AdminResourceListAction( $actionInfo, $request )
         {
         	$this->AdminAction( $actionInfo, $request );
-			
-            $this->_albumId = $this->_request->getValue( "albumId" );
-            if( $this->_albumId == "" )
-            	$this->_albumId = 0;	
+			$this->registerFieldValue( "albumId", new IntegerValidator(), true );
+
+        	// and the view we should show in case there is a validation error
+			$view = new AdminSimpleResourcesListView( $this->_blogInfo );
+			$this->setValidationErrorView( $view );
             	
             $this->requirePermission( "view_resources" );		
         }



More information about the pLog-svn mailing list