[pLog-svn] r6528 - in plog/branches/lifetype-1.2/class: dao/userdata view/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Mon Jun 9 06:21:48 EDT 2008


Author: mark
Date: 2008-06-09 06:21:48 -0400 (Mon, 09 Jun 2008)
New Revision: 6528

Modified:
   plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php
   plog/branches/lifetype-1.2/class/view/admin/adminsiteuserslistview.class.php
Log:
1. We should not use HttpVars::getRequestValue() in any situation, unless we need the raw request.

2. We can use $this->_request->getValue() or $this->_request->getFilteredValue() in $view. It better to use getFilteredValue(), since there is no registerFiledValidator in $view. So, we can get a cleaned input data from getFilteredValue() function.

3. Fix a sql error of LifetypeUserDataProvider.

Modified: plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php	2008-06-09 08:08:04 UTC (rev 6527)
+++ plog/branches/lifetype-1.2/class/dao/userdata/lifetypeuserdataprovider.class.php	2008-06-09 10:21:48 UTC (rev 6528)
@@ -113,7 +113,7 @@
 	    	if( $searchTerms != "" ) {
 				if( $where != "" )
 					$where .= " AND ";
-	    	    $where = $this->getSearchConditions( $searchTerms );
+	    	    $where .= $this->getSearchConditions( $searchTerms );
 			}
 			if( $where != "" )
 				$where = "WHERE $where";

Modified: plog/branches/lifetype-1.2/class/view/admin/adminsiteuserslistview.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/view/admin/adminsiteuserslistview.class.php	2008-06-09 08:08:04 UTC (rev 6527)
+++ plog/branches/lifetype-1.2/class/view/admin/adminsiteuserslistview.class.php	2008-06-09 10:21:48 UTC (rev 6528)
@@ -41,7 +41,7 @@
 		 */
 		function getStatusFromRequest()
 		{
-			$status = HttpVars::getRequestValue( "status" );
+			$status = $this->_request->getFilteredValue( "status", new HtmlFilter() );
 			
 			// validate the value 
 			$val = new IntegerValidator();



More information about the pLog-svn mailing list