Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Moved ParseURI function to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Feb 9, 2011
1 parent 29b3c1b commit 268d5a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libraries/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public function __construct ( ) {
eval ( GLOBALS );

$purifier = $zApp->GetSys ( "Purifier" );

$this->_ParseURI();

foreach ( $_REQUEST as $key => $value ) {
$lowerkey = strtolower ( $key );
Expand Down Expand Up @@ -63,17 +65,17 @@ public function Get ( $pVariable = null , $pDefault = null ) {
// Makes all request variable names case insensitive.
$variable = strtolower ( rtrim ( ltrim ( $pVariable ) ) );

if ( !$this->_URI ) $this->_ParseURI();

if ( $pVariable === null ) return ( $this->_Request );

if ( !$this->_Request[$variable] ) return ( $pDefault );



return ( $this->_Request[$variable] );

}

public function URI ( ) {
return ( $this->_URI );
}

protected function _ParseURI ( ) {
eval ( GLOBALS );
Expand Down

0 comments on commit 268d5a7

Please sign in to comment.