Changeset 1508 for branches/3.0

Show
Ignore:
Timestamp:
11/25/2006 02:42:54 PM (2 years ago)
Author:
xue
Message:

constructUrl encodes ampersand by default now.

Location:
branches/3.0
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • branches/3.0/HISTORY

    r1497 r1508  
    77CHG: Ticket#454 - Redundant PHP Version Check 
    88CHG: TRepeater does not render <span> anymore for empty item template (Qiang) 
     9CHG: THttpRequest.constructUrl() now encodes ampersand by default (Qiang) 
    910 
    1011Version 3.0.5 October 23, 2006 
  • branches/3.0/UPGRADE

    r1497 r1508  
    1717--------------------- 
    1818- TRepeater does not render <span> anymore for empty item template. 
     19- constructUrl() now encodes ampersand by default. This should have minimal 
     20  impact on any existing PRADO applications, though. 
    1921 
    2022Upgrading from v3.0.4 
  • branches/3.0/framework/Web/Services/TPageService.php

    r1497 r1508  
    463463         * @param string page path 
    464464         * @param array list of GET parameters, null if no GET parameters required 
    465          * @param boolean whether to encode the ampersand in URL, defaults to false. 
     465         * @param boolean whether to encode the ampersand in URL, defaults to true. 
    466466         * @param boolean whether to encode the GET parameters (their names and values), defaults to true. 
    467467         * @return string URL for the page and GET parameters 
    468468         */ 
    469         public function constructUrl($pagePath,$getParams=null,$encodeAmpersand=false,$encodeGetItems=true) 
     469        public function constructUrl($pagePath,$getParams=null,$encodeAmpersand=true,$encodeGetItems=true) 
    470470        { 
    471471                return $this->getRequest()->constructUrl($this->getID(),$pagePath,$getParams,$encodeAmpersand,$encodeGetItems); 
  • branches/3.0/framework/Web/THttpRequest.php

    r1497 r1508  
    488488         * @see parseUrl 
    489489         */ 
    490         public function constructUrl($serviceID,$serviceParam,$getItems=null,$encodeAmpersand=false,$encodeGetItems=true) 
     490        public function constructUrl($serviceID,$serviceParam,$getItems=null,$encodeAmpersand=true,$encodeGetItems=true) 
    491491        { 
    492492                $url=$serviceID.'='.$serviceParam; 
  • branches/3.0/framework/Web/THttpResponse.php

    r1407 r1508  
    286286                if($url[0]==='/') 
    287287                        $url=$this->getRequest()->getBaseUrl().$url; 
    288                 header('Location: '.$url); 
     288                header('Location: '.str_replace('&amp;','&',$url)); 
    289289                exit(); 
    290290        }