diff --git a/main/gradebook/lib/be/result.class.php b/main/gradebook/lib/be/result.class.php index a90ffe65da..c0cec3a6c2 100755 --- a/main/gradebook/lib/be/result.class.php +++ b/main/gradebook/lib/be/result.class.php @@ -14,7 +14,10 @@ class Result private $created_at; private $score; - public function Result() + /** + * Result constructor. + */ + public function __construct() { $this->created_at = api_get_utc_datetime(); } diff --git a/main/gradebook/lib/be/surveylink.class.php b/main/gradebook/lib/be/surveylink.class.php index 1ca0ade161..4a56c07123 100755 --- a/main/gradebook/lib/be/surveylink.class.php +++ b/main/gradebook/lib/be/surveylink.class.php @@ -19,9 +19,13 @@ class SurveyLink extends AbstractLink $this->set_type(LINK_SURVEY); } + /** + * @return string + */ public function get_name() { $this->get_survey_data(); + return $this->survey_data['code'].': '.self::html_to_text($this->survey_data['title']); } diff --git a/main/gradebook/lib/fe/catform.class.php b/main/gradebook/lib/fe/catform.class.php index 90280b409e..a86976a5f1 100755 --- a/main/gradebook/lib/fe/catform.class.php +++ b/main/gradebook/lib/fe/catform.class.php @@ -22,7 +22,7 @@ class CatForm extends FormValidator * @param string form name * @param method method */ - public function CatForm( + public function __construct( $form_type, $category_object, $form_name, diff --git a/main/gradebook/lib/fe/dataform.class.php b/main/gradebook/lib/fe/dataform.class.php index 7e79e9454a..dc69dc8f04 100755 --- a/main/gradebook/lib/fe/dataform.class.php +++ b/main/gradebook/lib/fe/dataform.class.php @@ -21,7 +21,7 @@ class DataForm extends FormValidator * @param method * @param action */ - public function DataForm($form_type, $form_name, $method = 'post', $action = null, $target='', $locked_status) + public function __construct($form_type, $form_name, $method = 'post', $action = null, $target='', $locked_status) { parent :: __construct($form_name, $method, $action,$target); $this->form_type = $form_type; diff --git a/main/gradebook/lib/fe/flatviewtable.class.php b/main/gradebook/lib/fe/flatviewtable.class.php index 76ad1318d6..b138d5d97e 100755 --- a/main/gradebook/lib/fe/flatviewtable.class.php +++ b/main/gradebook/lib/fe/flatviewtable.class.php @@ -34,7 +34,7 @@ class FlatViewTable extends SortableTable * @param null $addparams * @param Category $mainCourseCategory */ - public function FlatViewTable( + public function __construct( $selectcat, $users = array(), $evals = array(), diff --git a/main/gradebook/lib/fe/linkaddeditform.class.php b/main/gradebook/lib/fe/linkaddeditform.class.php index 35411c81f5..33bb0fa778 100755 --- a/main/gradebook/lib/fe/linkaddeditform.class.php +++ b/main/gradebook/lib/fe/linkaddeditform.class.php @@ -17,7 +17,7 @@ class LinkAddEditForm extends FormValidator * To add link, define category_object and link_type * To edit link, define link_object */ - public function LinkAddEditForm( + public function __construct( $form_type, $category_object, $link_type, diff --git a/main/gradebook/lib/fe/linkform.class.php b/main/gradebook/lib/fe/linkform.class.php index 454e11dc97..3637812d36 100755 --- a/main/gradebook/lib/fe/linkform.class.php +++ b/main/gradebook/lib/fe/linkform.class.php @@ -25,7 +25,7 @@ class LinkForm extends FormValidator * @param method * @param action */ - public function LinkForm( + public function __construct( $form_type, $category_object, $link_object, diff --git a/main/gradebook/lib/fe/resulttable.class.php b/main/gradebook/lib/fe/resulttable.class.php index 45952de2ef..8a57a9e6ae 100755 --- a/main/gradebook/lib/fe/resulttable.class.php +++ b/main/gradebook/lib/fe/resulttable.class.php @@ -18,7 +18,7 @@ class ResultTable extends SortableTable /** * Constructor */ - public function ResultTable ($evaluation, $results = array(), $iscourse, $addparams = null,$forprint = false) + public function __construct($evaluation, $results = array(), $iscourse, $addparams = null,$forprint = false) { parent :: __construct ('resultlist', null, null, (api_is_western_name_order() xor api_sort_by_first_name()) ? 2 : 1); diff --git a/main/gradebook/lib/fe/scoredisplayform.class.php b/main/gradebook/lib/fe/scoredisplayform.class.php index 596a5a87fe..3ab1322e01 100755 --- a/main/gradebook/lib/fe/scoredisplayform.class.php +++ b/main/gradebook/lib/fe/scoredisplayform.class.php @@ -14,7 +14,7 @@ class ScoreDisplayForm extends FormValidator * @param $form_name * @param null $action */ - public function ScoreDisplayForm($form_name, $action= null) + public function __construct($form_name, $action= null) { parent :: __construct($form_name, 'post', $action); $displayscore = ScoreDisplay :: instance(); diff --git a/main/gradebook/lib/fe/userform.class.php b/main/gradebook/lib/fe/userform.class.php index 52277f681a..f99a38dc06 100755 --- a/main/gradebook/lib/fe/userform.class.php +++ b/main/gradebook/lib/fe/userform.class.php @@ -19,7 +19,7 @@ class UserForm extends FormValidator * @param method * @param action */ - public function UserForm($form_type, $user, $form_name, $method= 'post', $action= null) + public function __construct($form_type, $user, $form_name, $method= 'post', $action= null) { parent :: __construct($form_name, $method, $action); $this->form_type= $form_type; diff --git a/main/gradebook/lib/fe/usertable.class.php b/main/gradebook/lib/fe/usertable.class.php index 3b559627a1..16be247fe9 100755 --- a/main/gradebook/lib/fe/usertable.class.php +++ b/main/gradebook/lib/fe/usertable.class.php @@ -16,7 +16,7 @@ class UserTable extends SortableTable /** * Constructor */ - public function UserTable($userid, $evals = array(), $links = array(), $addparams = null) + public function __construct($userid, $evals = array(), $links = array(), $addparams = null) { parent :: __construct ('userlist', null, null, 0); $this->userid = $userid; diff --git a/main/gradebook/lib/flatview_data_generator.class.php b/main/gradebook/lib/flatview_data_generator.class.php index 91e6f79420..e7681b59b9 100755 --- a/main/gradebook/lib/flatview_data_generator.class.php +++ b/main/gradebook/lib/flatview_data_generator.class.php @@ -32,7 +32,7 @@ class FlatViewDataGenerator * @param array $params * @param null $mainCourseCategory */ - public function FlatViewDataGenerator( + public function __construct( $users = array(), $evals = array(), $links = array(), diff --git a/main/gradebook/lib/results_data_generator.class.php b/main/gradebook/lib/results_data_generator.class.php index a608b4cb61..4776e3d7c3 100755 --- a/main/gradebook/lib/results_data_generator.class.php +++ b/main/gradebook/lib/results_data_generator.class.php @@ -26,7 +26,7 @@ class ResultsDataGenerator /** * Constructor */ - public function ResultsDataGenerator( + public function __construct( $evaluation, $results = array(), $include_edit = false diff --git a/main/gradebook/lib/user_data_generator.class.php b/main/gradebook/lib/user_data_generator.class.php index 82c5441cac..bca049de65 100755 --- a/main/gradebook/lib/user_data_generator.class.php +++ b/main/gradebook/lib/user_data_generator.class.php @@ -30,7 +30,7 @@ class UserDataGenerator private $scorecache; private $avgcache; - public function UserDataGenerator($userid, $evals = array(), $links = array()) + public function __construct($userid, $evals = array(), $links = array()) { $this->userid = $userid; $evals_filtered = array(); diff --git a/main/inc/lib/formvalidator/Element/DatePicker.php b/main/inc/lib/formvalidator/Element/DatePicker.php index 55768d60cd..e2d28e3af0 100755 --- a/main/inc/lib/formvalidator/Element/DatePicker.php +++ b/main/inc/lib/formvalidator/Element/DatePicker.php @@ -13,7 +13,7 @@ class DatePicker extends HTML_QuickForm_text * @param string $elementLabel * @param array $attributes */ - public function DatePicker($elementName = null, $elementLabel = null, $attributes = null) + public function __construct($elementName = null, $elementLabel = null, $attributes = null) { if (!isset($attributes['id'])) { $attributes['id'] = $elementName; diff --git a/main/inc/lib/formvalidator/Element/DateTimePicker.php b/main/inc/lib/formvalidator/Element/DateTimePicker.php index c6657279b5..18b8c86311 100755 --- a/main/inc/lib/formvalidator/Element/DateTimePicker.php +++ b/main/inc/lib/formvalidator/Element/DateTimePicker.php @@ -9,7 +9,7 @@ class DateTimePicker extends HTML_QuickForm_text /** * Constructor */ - public function DateTimePicker($elementName = null, $elementLabel = null, $attributes = null) + public function __construct($elementName = null, $elementLabel = null, $attributes = null) { if (!isset($attributes['id'])) { $attributes['id'] = $elementName; diff --git a/main/inc/lib/formvalidator/Element/HtmlEditor.php b/main/inc/lib/formvalidator/Element/HtmlEditor.php index 4d20ec81f8..c430fd3694 100644 --- a/main/inc/lib/formvalidator/Element/HtmlEditor.php +++ b/main/inc/lib/formvalidator/Element/HtmlEditor.php @@ -31,6 +31,7 @@ class HtmlEditor extends HTML_QuickForm_textarea $config = array() ) { if (empty($name)) { + return false; } diff --git a/main/inc/lib/formvalidator/Element/Number.php b/main/inc/lib/formvalidator/Element/Number.php index e7f0f0954e..718ef9669c 100644 --- a/main/inc/lib/formvalidator/Element/Number.php +++ b/main/inc/lib/formvalidator/Element/Number.php @@ -13,7 +13,7 @@ class Number extends HTML_QuickForm_text * @param string $elementLabel * @param array $attributes */ - public function Number($elementName = null, $elementLabel = null, $attributes = null) + public function __construct($elementName = null, $elementLabel = null, $attributes = null) { if (!isset($attributes['id'])) { $attributes['id'] = $elementName; diff --git a/main/inc/lib/formvalidator/Element/SelectAjax.php b/main/inc/lib/formvalidator/Element/SelectAjax.php index 0352f1c3fa..0d31ebf784 100644 --- a/main/inc/lib/formvalidator/Element/SelectAjax.php +++ b/main/inc/lib/formvalidator/Element/SelectAjax.php @@ -9,7 +9,7 @@ class SelectAjax extends HTML_QuickForm_select /** * Class constructor */ - function SelectAjax($elementName = null, $elementLabel = null, $options = null, $attributes = null) + public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $options, $attributes); } @@ -18,7 +18,7 @@ class SelectAjax extends HTML_QuickForm_select * The ajax call must contain an array of id and text * @return string */ - function toHtml() + public function toHtml() { $html = api_get_asset('select2/dist/js/select2.min.js'); @@ -120,7 +120,7 @@ JS; * We check the options and return only the values that _could_ have been * selected. We also return a scalar value if select is not "multiple" */ - function exportValue(&$submitValues, $assoc = false) + public function exportValue(&$submitValues, $assoc = false) { $value = $this->_findValue($submitValues); diff --git a/main/inc/lib/formvalidator/Element/SelectLanguage.php b/main/inc/lib/formvalidator/Element/SelectLanguage.php index 1c7eda8f80..9fcff08648 100644 --- a/main/inc/lib/formvalidator/Element/SelectLanguage.php +++ b/main/inc/lib/formvalidator/Element/SelectLanguage.php @@ -9,7 +9,7 @@ class SelectLanguage extends HTML_QuickForm_select /** * Class constructor */ - function SelectLanguage($elementName=null, $elementLabel=null, $options=null, $attributes=null) + public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $options, $attributes); // Get all languages @@ -17,7 +17,7 @@ class SelectLanguage extends HTML_QuickForm_select $this->_options = array(); $this->_values = array(); foreach ($languages['name'] as $index => $name) { - if($languages['folder'][$index] == api_get_setting('platformLanguage')) { + if ($languages['folder'][$index] == api_get_setting('platformLanguage')) { $this->addOption($name,$languages['folder'][$index],array('selected'=>'selected')); } else { $this->addOption($name,$languages['folder'][$index]); diff --git a/main/inc/lib/formvalidator/Element/SelectTheme.php b/main/inc/lib/formvalidator/Element/SelectTheme.php index 9bc0433109..890a8ffcfb 100644 --- a/main/inc/lib/formvalidator/Element/SelectTheme.php +++ b/main/inc/lib/formvalidator/Element/SelectTheme.php @@ -9,14 +9,15 @@ class SelectTheme extends HTML_QuickForm_select /** * Class constructor */ - function SelectTheme($elementName=null, $elementLabel=null, $options=null, $attributes=null) { + public function __construct($elementName=null, $elementLabel=null, $options=null, $attributes=null) + { parent::__construct($elementName, $elementLabel, $options, $attributes); // Get all languages $themes = api_get_themes(); $this->_options = array(); $this->_values = array(); $this->addOption('--',''); // no theme select - for ($i=0; $i< count($themes[0]);$i++) { + for ($i=0; $i< count($themes[0]); $i++) { $this->addOption($themes[1][$i],$themes[0][$i]); } } diff --git a/main/inc/lib/formvalidator/Element/Url.php b/main/inc/lib/formvalidator/Element/Url.php index e40efc5f97..84951c978e 100644 --- a/main/inc/lib/formvalidator/Element/Url.php +++ b/main/inc/lib/formvalidator/Element/Url.php @@ -1,5 +1,6 @@ setType('url'); } - } diff --git a/main/inc/lib/formvalidator/Element/receivers.php b/main/inc/lib/formvalidator/Element/receivers.php index ad35994946..99d194c66c 100755 --- a/main/inc/lib/formvalidator/Element/receivers.php +++ b/main/inc/lib/formvalidator/Element/receivers.php @@ -18,6 +18,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group * Array of selected receivers */ var $receivers_selected; + /** * Constructor * @param string $elementName diff --git a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php index 32658beded..e203fb8500 100755 --- a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php +++ b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php @@ -112,7 +112,7 @@ class HTML_QuickForm_CAPTCHA extends HTML_QuickForm_input * * @access public */ - function HTML_QuickForm_CAPTCHA($elementName = null, $elementLabel = null, + public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) { parent::__construct($elementName, $elementLabel, $attributes); diff --git a/main/inc/lib/pear/HTML/QuickForm/Renderer.php b/main/inc/lib/pear/HTML/QuickForm/Renderer.php index 3b5b13a9f7..7f6092bbcf 100755 --- a/main/inc/lib/pear/HTML/QuickForm/Renderer.php +++ b/main/inc/lib/pear/HTML/QuickForm/Renderer.php @@ -40,7 +40,7 @@ class HTML_QuickForm_Renderer * * @access public */ - function HTML_QuickForm_Renderer() + public function __construct() { } // end constructor diff --git a/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php b/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php index c11d1b0bfa..a74fcd74a6 100755 --- a/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php +++ b/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php @@ -81,9 +81,9 @@ class HTML_QuickForm_advcheckbox extends HTML_QuickForm_checkbox * @access public * @return void */ - function HTML_QuickForm_advcheckbox($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null) + public function __construct($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null) { - $this->HTML_QuickForm_checkbox($elementName, $elementLabel, $text, $attributes); + parent::__construct($elementName, $elementLabel, $text, $attributes); $this->setValues($values); } //end constructor diff --git a/main/inc/lib/pear/HTML/QuickForm/advmultiselect.php b/main/inc/lib/pear/HTML/QuickForm/advmultiselect.php index 56c2bda323..0751daea1e 100755 --- a/main/inc/lib/pear/HTML/QuickForm/advmultiselect.php +++ b/main/inc/lib/pear/HTML/QuickForm/advmultiselect.php @@ -272,7 +272,7 @@ class HTML_QuickForm_advmultiselect extends HTML_QuickForm_select * @return void * @since version 0.4.0 (2005-06-25) */ - public function HTML_QuickForm_advmultiselect( + public function __construct( $elementName = null, $elementLabel = null, $options = null, diff --git a/main/inc/lib/pear/HTML/QuickForm/autocomplete.php b/main/inc/lib/pear/HTML/QuickForm/autocomplete.php index f9db2e9e22..669107c3b3 100755 --- a/main/inc/lib/pear/HTML/QuickForm/autocomplete.php +++ b/main/inc/lib/pear/HTML/QuickForm/autocomplete.php @@ -55,7 +55,7 @@ class HTML_QuickForm_autocomplete extends HTML_QuickForm_text * @var array * @access private */ - var $_options = array(); + public $_options = array(); /** * "One-time" javascript (containing functions), see bug #4611 @@ -63,7 +63,7 @@ class HTML_QuickForm_autocomplete extends HTML_QuickForm_text * @var string * @access private */ - var $_js = ''; + public $_js = ''; // }}} // {{{ constructor @@ -79,9 +79,9 @@ class HTML_QuickForm_autocomplete extends HTML_QuickForm_text * @access public * @return void */ - function HTML_QuickForm_autocomplete($elementName = null, $elementLabel = null, $options = null, $attributes = null) + public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) { - $this->HTML_QuickForm_text($elementName, $elementLabel, $attributes); + parent::__construct($elementName, $elementLabel, $attributes); $this->_persistantFreeze = true; $this->_type = 'autocomplete'; if (isset($options)) { diff --git a/main/inc/lib/pear/HTML/QuickForm/checkbox.php b/main/inc/lib/pear/HTML/QuickForm/checkbox.php index 4c9ce31c82..2cea0e4f14 100755 --- a/main/inc/lib/pear/HTML/QuickForm/checkbox.php +++ b/main/inc/lib/pear/HTML/QuickForm/checkbox.php @@ -64,7 +64,7 @@ class HTML_QuickForm_checkbox extends HTML_QuickForm_input * @access public * @return void */ - public function HTML_QuickForm_checkbox( + public function __construct( $elementName = null, $elementLabel = null, $text = '', diff --git a/main/inc/lib/pear/HTML/QuickForm/date.php b/main/inc/lib/pear/HTML/QuickForm/date.php index 7093cafc3d..623ca9a870 100755 --- a/main/inc/lib/pear/HTML/QuickForm/date.php +++ b/main/inc/lib/pear/HTML/QuickForm/date.php @@ -269,9 +269,9 @@ class HTML_QuickForm_date extends HTML_QuickForm_group * @param array Options to control the element's display * @param mixed Either a typical HTML attribute string or an associative array */ - function HTML_QuickForm_date($elementName = null, $elementLabel = null, $options = array(), $attributes = null) + public function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null) { - $this->HTML_QuickForm_element($elementName, $elementLabel, $attributes); + parent::__construct($elementName, $elementLabel, $attributes); $this->_persistantFreeze = true; $this->_appendName = true; $this->_type = 'date'; diff --git a/main/inc/lib/pear/HTML/QuickForm/email.php b/main/inc/lib/pear/HTML/QuickForm/email.php index 0386ec860d..5111249fb7 100755 --- a/main/inc/lib/pear/HTML/QuickForm/email.php +++ b/main/inc/lib/pear/HTML/QuickForm/email.php @@ -26,7 +26,7 @@ class HTML_QuickForm_email extends HTML_QuickForm_input * @return void * @throws */ - function HTML_QuickForm_email($elementName=null, $elementLabel=null, $attributes=null) + public function __construct($elementName=null, $elementLabel=null, $attributes=null) { parent::__construct($elementName, $elementLabel, $attributes); $this->setType('email'); diff --git a/main/inc/lib/pear/HTML/QuickForm/file.php b/main/inc/lib/pear/HTML/QuickForm/file.php index d112fa5d8c..a296454724 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'); @@ -138,7 +138,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input * @access public * @return array */ - function getValue() + public function getValue() { return $this->_value; } // end func getValue @@ -156,7 +156,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input * @access public * @return bool */ - function onQuickFormEvent($event, $arg, &$caller) + public function onQuickFormEvent($event, $arg, &$caller) { switch ($event) { case 'updateValue': @@ -169,18 +169,17 @@ class HTML_QuickForm_file extends HTML_QuickForm_input break; case 'addElement': $this->onQuickFormEvent('createElement', $arg, $caller); + 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 &= new $className($arg[0], $arg[1], $arg[2]); + break; } return true; - } // end func onQuickFormEvent - - // }}} - // {{{ moveUploadedFile() + } /** * Moves an uploaded file into the destination @@ -190,17 +189,14 @@ 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 .= '/'; } $fileName = ($fileName != '') ? $fileName : basename($this->_value['name']); return move_uploaded_file($this->_value['tmp_name'], $dest . $fileName); - } // end func moveUploadedFile - - // }}} - // {{{ isUploadedFile() + } /** * Checks if the element contains an uploaded file @@ -211,11 +207,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input public function isUploadedFile() { return HTML_QuickForm_file::_ruleIsUploadedFile($this->_value); - } // end func isUploadedFile - - - // }}} - // {{{ _ruleIsUploadedFile() + } /** * Checks if the given element contains an uploaded file @@ -232,10 +224,8 @@ class HTML_QuickForm_file extends HTML_QuickForm_input } else { return false; } - } // end func _ruleIsUploadedFile + } - // }}} - // {{{ _ruleCheckMaxFileSize() /** * Tries to find the element value from the values array @@ -243,10 +233,10 @@ class HTML_QuickForm_file extends HTML_QuickForm_input * Needs to be redefined here as $_FILES is populated differently from * other arrays when element name is of the form foo[bar] * - * @access private + * @access public * @return mixed */ - function _findValue(&$values = null) + public function _findValue(&$values = null) { if (empty($_FILES)) { return null; @@ -276,7 +266,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/HTML/QuickForm/header.php b/main/inc/lib/pear/HTML/QuickForm/header.php index 9428b0a383..66e24da381 100755 --- a/main/inc/lib/pear/HTML/QuickForm/header.php +++ b/main/inc/lib/pear/HTML/QuickForm/header.php @@ -42,7 +42,7 @@ class HTML_QuickForm_header extends HTML_QuickForm_static * @access public * @return void */ - function HTML_QuickForm_header($elementName = null, $text = null) + public function __construct($elementName = null, $text = null) { if (!empty($elementName)) { $text = $elementName; diff --git a/main/inc/lib/pear/HTML/QuickForm/hidden.php b/main/inc/lib/pear/HTML/QuickForm/hidden.php index dc665139a1..b6904ef349 100755 --- a/main/inc/lib/pear/HTML/QuickForm/hidden.php +++ b/main/inc/lib/pear/HTML/QuickForm/hidden.php @@ -47,7 +47,7 @@ class HTML_QuickForm_hidden extends HTML_QuickForm_input * @access public * @return void */ - public function HTML_QuickForm_hidden($elementName = null, $value = '', $attributes = null) + public function __construct($elementName = null, $value = '', $attributes = null) { parent::__construct($elementName, null, $attributes); $this->setType('hidden'); diff --git a/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php b/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php index 13b80bd667..cddcc4722e 100755 --- a/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php +++ b/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php @@ -51,7 +51,7 @@ class HTML_QuickForm_hiddenselect extends HTML_QuickForm_select * @access public * @return void */ - function HTML_QuickForm_hiddenselect($elementName=null, $elementLabel=null, $options=null, $attributes=null) + public function __construct($elementName=null, $elementLabel=null, $options=null, $attributes=null) { parent::__construct($elementName, $elementLabel, $attributes); $this->_persistantFreeze = true; diff --git a/main/inc/lib/pear/HTML/QuickForm/image.php b/main/inc/lib/pear/HTML/QuickForm/image.php index a538b21789..b3eeec250d 100755 --- a/main/inc/lib/pear/HTML/QuickForm/image.php +++ b/main/inc/lib/pear/HTML/QuickForm/image.php @@ -47,7 +47,7 @@ class HTML_QuickForm_image extends HTML_QuickForm_input * @access public * @return void */ - function HTML_QuickForm_image($elementName=null, $src='', $attributes=null) + public function __construct($elementName=null, $src='', $attributes=null) { parent::__construct($elementName, null, $attributes); $this->setType('image'); diff --git a/main/inc/lib/pear/HTML/QuickForm/link.php b/main/inc/lib/pear/HTML/QuickForm/link.php index 6c2a0d21b9..ee786a169b 100755 --- a/main/inc/lib/pear/HTML/QuickForm/link.php +++ b/main/inc/lib/pear/HTML/QuickForm/link.php @@ -60,7 +60,7 @@ class HTML_QuickForm_link extends HTML_QuickForm_static * @return void * @throws */ - function HTML_QuickForm_link($elementName=null, $elementLabel=null, $href=null, $text=null, $attributes=null) + public function __construct($elementName=null, $elementLabel=null, $href=null, $text=null, $attributes=null) { parent::__construct($elementName, $elementLabel, $attributes); $this->_persistantFreeze = false; diff --git a/main/inc/lib/pear/HTML/Table.php b/main/inc/lib/pear/HTML/Table.php index 96d4bf9d9f..ffafbb28d1 100755 --- a/main/inc/lib/pear/HTML/Table.php +++ b/main/inc/lib/pear/HTML/Table.php @@ -83,8 +83,8 @@ * @version Release: @package_version@ * @link http://pear.php.net/package/HTML_Table */ -class HTML_Table extends HTML_Common { - +class HTML_Table extends HTML_Common +{ /** * Value to insert into empty cells. This is used as a default for * newly-created tbodies. @@ -162,7 +162,7 @@ class HTML_Table extends HTML_Common { *
or not * @access public */ - function HTML_Table($attributes = null, $tabOffset = 0, $useTGroups = false) + public function __construct($attributes = null, $tabOffset = 0, $useTGroups = false) { parent::__construct($attributes, (int)$tabOffset); $this->_useTGroups = (boolean)$useTGroups; diff --git a/main/inc/lib/pear/HTML/Table/Storage.php b/main/inc/lib/pear/HTML/Table/Storage.php index f4fb91b3d1..ab09eab543 100755 --- a/main/inc/lib/pear/HTML/Table/Storage.php +++ b/main/inc/lib/pear/HTML/Table/Storage.php @@ -67,8 +67,8 @@ * @version Release: @package_version@ * @link http://pear.php.net/package/HTML_Table */ -class HTML_Table_Storage extends HTML_Common { - +class HTML_Table_Storage extends HTML_Common +{ /** * Value to insert into empty cells * @var string @@ -126,7 +126,7 @@ class HTML_Table_Storage extends HTML_Common { * or not * @access public */ - function HTML_Table_Storage($tabOffset = 0, $useTGroups = false) + public function __construct($tabOffset = 0, $useTGroups = false) { parent::__construct(null, (int)$tabOffset); $this->_useTGroups = (boolean)$useTGroups; @@ -769,7 +769,7 @@ class HTML_Table_Storage extends HTML_Common { } $typeContent = $tabs . $tab . $tab . $extraTab . "<$type" . $this->_getAttrString($attr) . '>'; - + if ($contents || is_numeric($contents)) { $typeContent .= $contents; } elseif (empty($contents)) { @@ -777,7 +777,7 @@ class HTML_Table_Storage extends HTML_Common { $contents = $this->_autoFill; } } - + $typeContent .= "$type>" . $lnEnd; if (!empty($contents) || is_numeric($contents)) {