Changeset 943

Show
Ignore:
Timestamp:
05/27/08 00:19:16 (6 months ago)
Author:
laurentj
Message:

fixed a regression added by the patch of the ticket #599

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • branches/1.0.x/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • branches/1.0.x/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • branches/1.0.x/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r898 r943  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114114        if($this->_form->hasUpload()) 
    115115            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r898 r943  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114114        if($this->_form->hasUpload()) 
    115115            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r898 r943  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114114        if($this->_form->hasUpload()) 
    115115            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/forms/jFormsBuilderBase.class.php

    r898 r943  
    111111    public function outputHeader($params){ 
    112112        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    113         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
     113        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'" onsubmit="return jForms.verifyForm(this)"'; 
    114114        if($this->_form->hasUpload()) 
    115115            echo ' enctype="multipart/form-data">'; 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
  • trunk/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • trunk/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • trunk/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • trunk/lib/jelix/core/jUrl.class.php

    r941 r943  
    55* @author      Laurent Jouanneau 
    66* @contributor Thibault PIRONT < nuKs > 
    7 * @copyright   2005-2006 Laurent Jouanneau 
     7* @copyright   2005-2008 Laurent Jouanneau 
    88* @copyright   2007 Thibault PIRONT 
    99* Some parts of this file are took from an experimental branch of the Copix project (CopixUrl.class.php, Copix 2.3dev20050901, http://www.copix.org), 
     
    206206    */ 
    207207    public function toString ($forxml = false){ 
     208        return $this->getPath().$this->getQuery($forxml); 
     209    } 
     210 
     211    /** 
     212     * get the path part of the url (scriptName + pathinfo) 
     213     * @return string 
     214     * @since 1.0.4 
     215     */ 
     216    public function getPath() { 
    208217        $url = $this->scriptName; 
    209218        if(substr($this->scriptName,-1) == '/') 
     
    211220        else 
    212221            $url.= $this->pathInfo; 
    213  
     222        return $url; 
     223    } 
     224 
     225    /** 
     226     * get the query part of the url 
     227     * @param boolean $forxml  true: some characters will be escaped 
     228     * @return string 
     229     * @since 1.0.4 
     230     */ 
     231    public function getQuery($forxml = false) { 
     232        $url = ''; 
    214233        if (count ($this->params)>0){ 
    215234            $q = http_build_query($this->params, '', ($forxml?'&amp;':'&')); 
  • trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    r924 r943  
    8282    public function outputHeader($params){ 
    8383        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    84         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'"'; 
     84        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'"'; 
    8585        if($this->_form->hasUpload()) 
    8686            echo ' enctype="multipart/form-data">'; 
  • trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    r924 r943  
    8282    public function outputHeader($params){ 
    8383        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    84         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'"'; 
     84        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'"'; 
    8585        if($this->_form->hasUpload()) 
    8686            echo ' enctype="multipart/form-data">'; 
  • trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    r924 r943  
    8282    public function outputHeader($params){ 
    8383        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    84         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'"'; 
     84        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'"'; 
    8585        if($this->_form->hasUpload()) 
    8686            echo ' enctype="multipart/form-data">'; 
  • trunk/lib/jelix/plugins/jforms/html/html.jformsbuilder.php

    r924 r943  
    8282    public function outputHeader($params){ 
    8383        $url = jUrl::get($this->_action, $this->_actionParams, 2); // retourne le jurl correspondant 
    84         echo '<form action="',$url->scriptName,$url->pathInfo,'" method="'.$params[2].'" id="', $this->_name,'"'; 
     84        echo '<form action="',$url->getPath(),'" method="'.$params[2].'" id="', $this->_name,'"'; 
    8585        if($this->_form->hasUpload()) 
    8686            echo ' enctype="multipart/form-data">'; 
  • trunk/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
  • trunk/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
  • trunk/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
  • trunk/lib/jelix/plugins/tpl/html/function.formurl.php

    r506 r943  
    33* @package    jelix 
    44* @subpackage jtpl_plugin 
    5 * @version    $Id$ 
    65* @author     Loic Mathaud 
    7 * @copyright  2005-2006 Loic Mathaud 
     6* @contributor Laurent Jouanneau 
     7* @copyright  2005-2006 Loic Mathaud, 2008 Laurent Jouanneau 
    88* @link        http://www.jelix.org 
    99* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    2020{ 
    2121    $url = jUrl::get($selector, $params, 2); // retourne le jurl correspondant 
    22     echo $url->scriptName . $url->pathInfo
     22    echo $url->getPath()
    2323} 
    2424 
Download in other formats: Unified Diff Zip Archive