[pLog-svn] r6951 - plog/branches/lifetype-1.2/class/view

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Thu Jan 7 10:55:28 EST 2010


Author: jondaley
Date: 2010-01-07 10:55:28 -0500 (Thu, 07 Jan 2010)
New Revision: 6951

Modified:
   plog/branches/lifetype-1.2/class/view/view.class.php
Log:
trivial performance improvement

Modified: plog/branches/lifetype-1.2/class/view/view.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/view/view.class.php	2010-01-07 15:31:36 UTC (rev 6950)
+++ plog/branches/lifetype-1.2/class/view/view.class.php	2010-01-07 15:55:28 UTC (rev 6951)
@@ -294,10 +294,11 @@
 		 */
 		function getCurrentPageFromRequest()
 		{
-                // TODO: make the page static (or just a class variable?), rather than the whole request
-            static $request;
-			if( $request == null )
-				$request = new Request( HttpVars::getRequest() );
+            static $page;
+            if($page)
+                return $page;
+            
+            $request = new Request( HttpVars::getRequest() );
 
 			// get the page value from the request
 			$page = $request->getValue( VIEW_DEFAULT_PAGE_PARAMETER );



More information about the pLog-svn mailing list