Development

Changeset 11238

You must first sign up to be able to contribute.

Changeset 11238

Show
Ignore:
Timestamp:
08/28/08 22:55:18 (3 months ago)
Author:
dwhittle
Message:

dwhittle: merged changes to branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dwhittle/1.2/lib/request/sfWebRequest.class.php

    r11168 r11238  
    114114  { 
    115115    $pathArray = $this->getPathInfoArray(); 
    116  
    117     if ($this->isAbsUri()) 
    118     { 
    119       return $pathArray['REQUEST_URI']; 
    120     } 
    121  
    122     return $this->getUriPrefix().$pathArray['REQUEST_URI']; 
     116    $uri = isset($pathArray['REQUEST_URI']) ? $pathArray['REQUEST_URI'] : ''; 
     117 
     118    return $this->isAbsUri() ? $uri : $this->getUriPrefix().$uri; 
    123119  } 
    124120 
     
    132128    $pathArray = $this->getPathInfoArray(); 
    133129 
    134     return preg_match('/^http/', $pathArray['REQUEST_URI'])
     130    return isset($pathArray['REQUEST_URI']) ? preg_match('/^http/', $pathArray['REQUEST_URI']) : false
    135131  } 
    136132 
     
    154150    } 
    155151 
    156     $host = explode(":", $pathArray['HTTP_HOST']); 
     152    $host = explode(":", $this->getHost()); 
    157153    if (count($host) == 1) 
    158154    { 
    159       $host[] = $pathArray['SERVER_PORT']
     155      $host[] = isset($pathArray['SERVER_PORT']) ? $pathArray['SERVER_PORT'] : ''
    160156    } 
    161157 
     
    230226  { 
    231227    return $this->requestParameters; 
     228  } 
     229 
     230  public function addRequestParameters($parameters) 
     231  { 
     232    $this->requestParameters = array_merge($this->requestParameters, $parameters); 
     233    $this->getParameterHolder()->add($parameters); 
    232234  } 
    233235 
     
    780782    $this->parameterHolder->add($this->getParameters); 
    781783 
     784    // POST parameters 
     785    $this->postParameters = get_magic_quotes_gpc() ? sfToolkit::stripslashesDeep($_POST) : $_POST; 
     786    $this->parameterHolder->add($this->postParameters); 
     787 
    782788    // additional parameters 
    783789    $this->requestParameters = $this->parseRequestParameters(); 
    784790    $this->parameterHolder->add($this->requestParameters); 
    785791 
    786     // POST parameters 
    787     $this->postParameters = get_magic_quotes_gpc() ? sfToolkit::stripslashesDeep($_POST) : $_POST; 
    788     $this->parameterHolder->add($this->postParameters); 
    789  
    790792    // move symfony parameters to attributes (parameters prefixed with _sf_) 
    791793    foreach ($this->parameterHolder->getAll() as $key => $value)