Changeset 604

Show
Ignore:
Timestamp:
10/01/07 18:02:13 (1 year ago)
Author:
laurentj
Message:

fixed bug #291: bad argument name in jControllerCmdLine. p=M. Thiriot

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0beta3.x/lib/jelix/controllers/jControllerCmdLine.class.php

    r573 r604  
    44* @subpackage controllers 
    55* @author     Loic Mathaud 
    6 * @contributor 
    7 * @copyright  2006 Loic Mathaud 
     6* @contributor M. Thiriot 
     7* @copyright  2006 Loic Mathaud, 2007 M. Thiriot 
    88* @link        http://www.jelix.org 
    99* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    4040 
    4141    protected function param ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
    42         if (isset($this->_parameters[$param])) { 
    43             if($this->_parameters[$param] == '' && $useDefaultIfEmpty) 
     42        if (isset($this->_parameters[$parName])) { 
     43            if($this->_parameters[$parName] == '' && $useDefaultIfEmpty) 
    4444                return $parDefaultValue; 
    4545            else 
    46                 return $this->_parameters[$param]; 
     46                return $this->_parameters[$parName]; 
    4747        } else { 
    4848            return $parDefaultValue; 
  • branches/1.0beta3.x/lib/jelix/controllers/jControllerCmdLine.class.php

    r573 r604  
    44* @subpackage controllers 
    55* @author     Loic Mathaud 
    6 * @contributor 
    7 * @copyright  2006 Loic Mathaud 
     6* @contributor M. Thiriot 
     7* @copyright  2006 Loic Mathaud, 2007 M. Thiriot 
    88* @link        http://www.jelix.org 
    99* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    4040 
    4141    protected function param ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
    42         if (isset($this->_parameters[$param])) { 
    43             if($this->_parameters[$param] == '' && $useDefaultIfEmpty) 
     42        if (isset($this->_parameters[$parName])) { 
     43            if($this->_parameters[$parName] == '' && $useDefaultIfEmpty) 
    4444                return $parDefaultValue; 
    4545            else 
    46                 return $this->_parameters[$param]; 
     46                return $this->_parameters[$parName]; 
    4747        } else { 
    4848            return $parDefaultValue; 
  • trunk/lib/jelix/controllers/jControllerCmdLine.class.php

    r573 r604  
    44* @subpackage controllers 
    55* @author     Loic Mathaud 
    6 * @contributor 
    7 * @copyright  2006 Loic Mathaud 
     6* @contributor M. Thiriot 
     7* @copyright  2006 Loic Mathaud, 2007 M. Thiriot 
    88* @link        http://www.jelix.org 
    99* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    4040 
    4141    protected function param ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
    42         if (isset($this->_parameters[$param])) { 
    43             if($this->_parameters[$param] == '' && $useDefaultIfEmpty) 
     42        if (isset($this->_parameters[$parName])) { 
     43            if($this->_parameters[$parName] == '' && $useDefaultIfEmpty) 
    4444                return $parDefaultValue; 
    4545            else 
    46                 return $this->_parameters[$param]; 
     46                return $this->_parameters[$parName]; 
    4747        } else { 
    4848            return $parDefaultValue; 
  • trunk/lib/jelix/controllers/jControllerCmdLine.class.php

    r573 r604  
    44* @subpackage controllers 
    55* @author     Loic Mathaud 
    6 * @contributor 
    7 * @copyright  2006 Loic Mathaud 
     6* @contributor M. Thiriot 
     7* @copyright  2006 Loic Mathaud, 2007 M. Thiriot 
    88* @link        http://www.jelix.org 
    99* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    4040 
    4141    protected function param ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
    42         if (isset($this->_parameters[$param])) { 
    43             if($this->_parameters[$param] == '' && $useDefaultIfEmpty) 
     42        if (isset($this->_parameters[$parName])) { 
     43            if($this->_parameters[$parName] == '' && $useDefaultIfEmpty) 
    4444                return $parDefaultValue; 
    4545            else 
    46                 return $this->_parameters[$param]; 
     46                return $this->_parameters[$parName]; 
    4747        } else { 
    4848            return $parDefaultValue; 
Download in other formats: Unified Diff Zip Archive