[pLog-svn] r5871 - plog/branches/lifetype-1.2/class/net

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Aug 29 19:02:46 EDT 2007


Author: jondaley
Date: 2007-08-29 19:02:46 -0400 (Wed, 29 Aug 2007)
New Revision: 5871

Modified:
   plog/branches/lifetype-1.2/class/net/request.class.php
Log:
stripslashes is now in the right place, and this class is now less interesting

Modified: plog/branches/lifetype-1.2/class/net/request.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/net/request.class.php	2007-08-24 11:52:20 UTC (rev 5870)
+++ plog/branches/lifetype-1.2/class/net/request.class.php	2007-08-29 23:02:46 UTC (rev 5871)
@@ -22,43 +22,20 @@
      */
     class Request extends Properties 
 	{
-
-        var $_paramsRaw;
-
         /**
          * Initializes the request object
          *
-         * @param values An associative array that will be used to initialize the object
+         * @param values An associative array that will be
+         *               used to initialize the object
          */
     	function Request( $values = null )
         {
-        	if( $values == null )
-        		$this->Properties();
-            else
-            	$this->Properties( $values );
+            if(get_magic_quotes_gpc()){
+                foreach($values as $key => $value){
+                    $values[$key] = stripslashes($value);
+                }
+            }
+            $this->Properties( $values );
         }
-		
-		/**
-		 * reimplemented from Properties::getValue() so that we can correctly
-		 * strip slashes from requests where magic_quotes_gpc was enabled
-		 *
-		 * @param key
-		 * @param defaultValue
-		 * @param filterClass
-		 * @return the value
-		 */
-		function getValue( $key, $defaultValue = null, $filterClass = null )
-		{
-			// get the value from the parent
-			$value = parent::getValue( $key, $defaultValue, $filterClass );
-			
-			// if magic quotes are enabled and the input parameter is not an array
-			// then strip the slashes
-			if( get_magic_quotes_gpc() && !is_array( $value )) {
-				$value = stripslashes( $value );
-			}
-			
-			return( $value );
-		}
     }
 ?>



More information about the pLog-svn mailing list