diff --git a/main/inc/lib/formvalidator/Element/calendar_popup.php b/main/inc/lib/formvalidator/Element/calendar_popup.php index e237fa23a4..a0fc2c22d2 100755 --- a/main/inc/lib/formvalidator/Element/calendar_popup.php +++ b/main/inc/lib/formvalidator/Element/calendar_popup.php @@ -1,26 +1,5 @@ richEditorStatus; } + /** + * @param $status + */ public function setRichEditorStatus($status) { $this->richEditorStatus = (bool)$status; @@ -37,7 +43,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea * @param string Attributes for the textarea * @param array $editor_config Optional configuration settings for the online editor. */ - function HTML_QuickForm_html_editor($elementName = null, $elementLabel = null, $attributes = null, $config = null) + public function HTML_QuickForm_html_editor($elementName = null, $elementLabel = null, $attributes = null, $config = null) { if (empty($elementName)) { return false; @@ -50,11 +56,9 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea $this->_persistantFreeze = true; $this->_type = 'html_editor'; $this->fullPage = false; - $name = $this->getAttribute('name'); global $app; - //$this->fck_editor = new FCKeditor($name); $this->fck_editor = new ChamiloLMS\Component\Editor\Editor($name, $app['translator']); $this->fck_editor->ToolbarSet = $fck_attribute['ToolbarSet']; @@ -89,7 +93,8 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea * @access public * @return boolean */ - function browserSupported() { + function browserSupported() + { return FCKeditor :: IsCompatible(); } @@ -97,7 +102,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea * Return the HTML editor in HTML * @return string */ - function toHtml() + public function toHtml() { if ($this->getRichEditorStatus() == false) { //Fix rows and cols @@ -125,7 +130,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea * Returns the htmlarea content in HTML * @return string */ - function getFrozenHtml() + public function getFrozenHtml() { return $this->getValue(); } @@ -133,7 +138,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea /** * Build this element using FCKeditor */ - function build_FCKeditor() + public function build_FCKeditor() { if (!FCKeditor :: IsCompatible()) { return parent::toHTML(); diff --git a/main/inc/lib/formvalidator/Element/receivers.php b/main/inc/lib/formvalidator/Element/receivers.php index 398259c584..aa44a80cb8 100644 --- a/main/inc/lib/formvalidator/Element/receivers.php +++ b/main/inc/lib/formvalidator/Element/receivers.php @@ -1,26 +1,6 @@ _appendName = true; $this->_type = 'receivers'; } + /** * Create the form elements to build this element group */ @@ -70,6 +51,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group $this->_elements[] = new HTML_QuickForm_advmultiselect('to', '', $this->receivers); $this->_elements[2]->setSelected($this->receivers_selected); } + /** * HTML representation */ @@ -85,6 +67,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group $js = $this->getElementJS(); return $renderer->toHtml().$js; } + /** * Get the necessary javascript */ @@ -105,6 +88,7 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group \n"; return $js; } + /** * accept renderer */ @@ -113,4 +97,3 @@ class HTML_QuickForm_receivers extends HTML_QuickForm_group $renderer->renderElement($this, $required, $error); } } -?> \ No newline at end of file diff --git a/main/inc/lib/formvalidator/Element/style_button.php b/main/inc/lib/formvalidator/Element/style_button.php index 489a2011ca..e0be56d6b4 100644 --- a/main/inc/lib/formvalidator/Element/style_button.php +++ b/main/inc/lib/formvalidator/Element/style_button.php @@ -1,4 +1,6 @@ form elements * @@ -59,8 +61,9 @@ class HTML_QuickForm_stylebutton extends HTML_QuickForm_element $strAttr = ''; if (is_array($attributes)) { foreach ($attributes as $key => $value) { - if ($key != 'value') + if ($key != 'value') { $strAttr .= ' ' . $key . '="' . htmlspecialchars($value) . '"'; + } } } return $strAttr; @@ -199,4 +202,4 @@ class HTML_QuickForm_stylebutton extends HTML_QuickForm_element return parent::exportValue($submitValues, $assoc); } } -} \ No newline at end of file +} diff --git a/main/inc/lib/formvalidator/Element/style_submit_button.php b/main/inc/lib/formvalidator/Element/style_submit_button.php index 53b861c84e..ee3e1c9ff8 100644 --- a/main/inc/lib/formvalidator/Element/style_submit_button.php +++ b/main/inc/lib/formvalidator/Element/style_submit_button.php @@ -1,10 +1,7 @@ setValue($value); $this->setType('submit'); - } //end constructor + } /** * Freeze the element so that only its value is returned @@ -72,19 +68,17 @@ class HTML_QuickForm_stylesubmitbutton extends HTML_QuickForm_stylebutton * @access public * @return void */ - function freeze() { + public function freeze() + { return false; - } //end func freeze - - // }}} - // {{{ exportValue() + } /** * Only return the value if it is found within $submitValues (i.e. if * this particular submit button was clicked) */ - function exportValue(&$submitValues, $assoc = false) { + public function exportValue(&$submitValues, $assoc = false) + { return $this->_prepareValue($this->_findValue($submitValues), $assoc); } - // }}} -} //end class HTML_QuickForm_submit \ No newline at end of file +} \ No newline at end of file diff --git a/main/inc/lib/formvalidator/FormValidator.class.php b/main/inc/lib/formvalidator/FormValidator.class.php index 480fc0cfae..51e0e7ed44 100644 --- a/main/inc/lib/formvalidator/FormValidator.class.php +++ b/main/inc/lib/formvalidator/FormValidator.class.php @@ -1,5 +1,4 @@ =, etc * @param string the value to compare @@ -20,9 +21,9 @@ class HTML_QuickForm_Compare_Fields extends HTML_QuickForm_Rule_Compare } $params = explode('@', $operator_and_max_value); $operator = $params[0]; - $max_value = $params[1]; + $max_value = $params[1]; return parent::validate(array($final_value, $max_value), $operator); } - return false; + return false; } } \ No newline at end of file diff --git a/main/inc/lib/formvalidator/Rule/Date.php b/main/inc/lib/formvalidator/Rule/Date.php index 03f3eab82d..f9b040dd21 100644 --- a/main/inc/lib/formvalidator/Rule/Date.php +++ b/main/inc/lib/formvalidator/Rule/Date.php @@ -1,26 +1,5 @@ \ No newline at end of file +} \ No newline at end of file diff --git a/main/inc/lib/formvalidator/Rule/Filetype.php b/main/inc/lib/formvalidator/Rule/Filetype.php index ef0682ebba..d1350a008c 100644 --- a/main/inc/lib/formvalidator/Rule/Filetype.php +++ b/main/inc/lib/formvalidator/Rule/Filetype.php @@ -1,26 +1,6 @@ diff --git a/main/inc/lib/formvalidator/Rule/MultipleRequired.php b/main/inc/lib/formvalidator/Rule/MultipleRequired.php index c1ba994d7f..76bfa082c5 100755 --- a/main/inc/lib/formvalidator/Rule/MultipleRequired.php +++ b/main/inc/lib/formvalidator/Rule/MultipleRequired.php @@ -1,15 +1,6 @@ | -// +----------------------------------------------------------------------+ + +/* For licensing terms, see /license.txt */ require_once('HTML/QuickForm/Rule.php'); @@ -46,4 +37,3 @@ class HTML_QuickForm_Rule_MultipleRequired extends HTML_QuickForm_Rule } // end func getValidationScript } // end class HTML_QuickForm_Rule_MultipleRequired -?> diff --git a/main/inc/lib/formvalidator/Rule/Url.php b/main/inc/lib/formvalidator/Rule/Url.php index 5267aa7f07..5a0ac790df 100644 --- a/main/inc/lib/formvalidator/Rule/Url.php +++ b/main/inc/lib/formvalidator/Rule/Url.php @@ -1,4 +1,5 @@