Fix constructor.

ofaj
jmontoyaa 10 years ago
parent 02189404c3
commit afb5c45e94
  1. 15
      main/inc/lib/pear/HTML/QuickForm/file.php
  2. 15
      main/inc/lib/pear/Pager/Pager.php

@ -57,7 +57,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input
* @since 1.0
* @access public
*/
function HTML_QuickForm_file($elementName=null, $elementLabel=null, $attributes=null)
public function __construct($elementName=null, $elementLabel=null, $attributes=null)
{
parent::__construct($elementName, $elementLabel, $attributes);
$this->setType('file');
@ -172,8 +172,8 @@ class HTML_QuickForm_file extends HTML_QuickForm_input
return $this->onQuickFormEvent('updateValue', null, $caller);
break;
case 'createElement':
$className = get_class($this);
$this->$className($arg[0], $arg[1], $arg[2]);
//$className = get_class($this);
//$this->$className($arg[0], $arg[1], $arg[2]);
break;
}
return true;
@ -190,7 +190,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input
* @access public
* @return bool Whether the file was moved successfully
*/
function moveUploadedFile($dest, $fileName = '')
public function moveUploadedFile($dest, $fileName = '')
{
if ($dest != '' && substr($dest, -1) != '/') {
$dest .= '/';
@ -210,7 +210,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input
*/
public function isUploadedFile()
{
return HTML_QuickForm_file::_ruleIsUploadedFile($this->_value);
return self::_ruleIsUploadedFile($this->_value);
} // end func isUploadedFile
@ -276,7 +276,4 @@ class HTML_QuickForm_file extends HTML_QuickForm_input
return null;
}
}
// }}}
} // end class HTML_QuickForm_file
?>
}

@ -138,20 +138,9 @@ class Pager
*
* @access public
*/
function Pager($options = array())
public function __construct($options = array())
{
//this check evaluates to true on 5.0.0RC-dev,
//so i'm using another one, for now...
//if (version_compare(phpversion(), '5.0.0') == -1) {
if (get_class($this) == 'pager') { //php4 lowers class names
// assign factoried method to this for PHP 4
eval('$this = Pager::factory($options);');
} else { //php5 is case sensitive
$msg = 'Pager constructor is deprecated.'
.' You must use the "Pager::factory($params)" method'
.' instead of "new Pager($params)"';
trigger_error($msg, E_USER_ERROR);
}
}
// }}}

Loading…
Cancel
Save