From afb5c45e945b3fbdea3ea38585ea24f538d3ea68 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Mon, 25 Apr 2016 16:15:48 +0200 Subject: [PATCH] Fix constructor. --- main/inc/lib/pear/HTML/QuickForm/file.php | 15 ++++++--------- main/inc/lib/pear/Pager/Pager.php | 15 ++------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/main/inc/lib/pear/HTML/QuickForm/file.php b/main/inc/lib/pear/HTML/QuickForm/file.php index d112fa5d8c..fd33db2846 100755 --- a/main/inc/lib/pear/HTML/QuickForm/file.php +++ b/main/inc/lib/pear/HTML/QuickForm/file.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 -?> +} \ No newline at end of file diff --git a/main/inc/lib/pear/Pager/Pager.php b/main/inc/lib/pear/Pager/Pager.php index a44cbeb8cf..5d28ea49a0 100755 --- a/main/inc/lib/pear/Pager/Pager.php +++ b/main/inc/lib/pear/Pager/Pager.php @@ -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); - } + } // }}}