typo
[lhc/web/wiklou.git] / includes / WebRequest.php
index c75763e..bcec3c0 100644 (file)
@@ -62,12 +62,15 @@ class WebRequest {
                        if( defined( "DEBUG_GLOBALS" ) ) {
                                die( "DEBUG_GLOBALS: Turn register_globals off!" );
                        }
-               } else {
+               }
+               /*
+               else {
                        if( !defined( "DEBUG_GLOBALS" ) ) {
                                # Insecure, but at least it'll run
                                import_request_variables( "GPC" );
                        }
                }
+               */
        }
        
        function getGPCVal( &$arr, $name, $default ) {
@@ -112,6 +115,18 @@ class WebRequest {
                return $this->getGPCText( $_REQUEST, $name, $default );
        }
        
+       function getValues() {  
+               $names = func_get_args();
+               $retVal = array();
+               foreach ( $names as $name ) { 
+                       $value = $this->getVal( $name );
+                       if ( !is_null( $value ) ) {
+                               $retVal[$name] = $value;
+                       }
+               }
+               return $retVal;
+       }
+
        function wasPosted() {
                return $_SERVER['REQUEST_METHOD'] == 'POST';
        }
@@ -150,4 +165,4 @@ class WebRequest {
        
 }
 
-?>
\ No newline at end of file
+?>