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

mark at devel.lifetype.net mark at devel.lifetype.net
Wed Jun 18 01:07:17 EDT 2008


Author: mark
Date: 2008-06-18 01:07:16 -0400 (Wed, 18 Jun 2008)
New Revision: 6563

Modified:
   plog/branches/lifetype-1.2/class/action/admin/adminpoststatsaction.class.php
Log:
We can get page from perform(0 directly, because it already validated in View::getCurrentPageFromRequest().

Modified: plog/branches/lifetype-1.2/class/action/admin/adminpoststatsaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/adminpoststatsaction.class.php	2008-06-18 05:02:59 UTC (rev 6562)
+++ plog/branches/lifetype-1.2/class/action/admin/adminpoststatsaction.class.php	2008-06-18 05:07:16 UTC (rev 6563)
@@ -32,27 +32,12 @@
         }
 
         /**
-         * Check that the parameter is correct.
-         */
-        function validate()
-        {
-			// let's make sure that the "page" parameter has a sane value
-			// and that it is not below 0
-			$val = new IntegerValidator();
-			$this->_page = $this->_request->getValue( "page" );			
-			if( !$val->validate( $this->_page ) || $this->_page < 0 )
-				$this->_page = 1;
-
-			// run the real validation stuff...
-            return parent::validate();
-        }
-
-        /**
          * Carries out the specified action
          */
         function perform()
         {
-        	$this->_postId = $this->_request->getValue( "postId" );		
+        	$this->_postId = $this->_request->getValue( "postId" );	
+        	$this->_page = View::getCurrentPageFromRequest();
 		
             // fetch the post itself
             $posts = new Articles();



More information about the pLog-svn mailing list