diff --git a/main/inc/lib/pear/HTML/QuickForm.php b/main/inc/lib/pear/HTML/QuickForm.php
index 2880f893d4..58b5787687 100755
--- a/main/inc/lib/pear/HTML/QuickForm.php
+++ b/main/inc/lib/pear/HTML/QuickForm.php
@@ -1087,21 +1087,52 @@ class HTML_QuickForm extends HTML_Common
* @access public
* @throws HTML_QuickForm_Error
*/
- function addRule($element, $message, $type, $format=null, $validation='server', $reset = false, $force = false)
- {
+ function addRule(
+ $element,
+ $message,
+ $type,
+ $format = null,
+ $validation = 'server',
+ $reset = false,
+ $force = false
+ ) {
if (!$force) {
if (!is_array($element) && !$this->elementExists($element)) {
- return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
+ return PEAR::raiseError(
+ null,
+ QUICKFORM_NONEXIST_ELEMENT,
+ null,
+ E_USER_WARNING,
+ "Element '$element' does not exist in HTML_QuickForm::addRule()",
+ 'HTML_QuickForm_Error',
+ true
+ );
} elseif (is_array($element)) {
foreach ($element as $el) {
if (!$this->elementExists($el)) {
- return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$el' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
+ return PEAR::raiseError(
+ null,
+ QUICKFORM_NONEXIST_ELEMENT,
+ null,
+ E_USER_WARNING,
+ "Element '$el' does not exist in HTML_QuickForm::addRule()",
+ 'HTML_QuickForm_Error',
+ true
+ );
}
}
}
}
if (false === ($newName = $this->isRuleRegistered($type, true))) {
- return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
+ return PEAR::raiseError(
+ null,
+ QUICKFORM_INVALID_RULE,
+ null,
+ E_USER_WARNING,
+ "Rule '$type' is not registered in HTML_QuickForm::addRule()",
+ 'HTML_QuickForm_Error',
+ true
+ );
} elseif (is_string($newName)) {
$type = $newName;
}
diff --git a/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php b/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php
index ee211d5dce..26b2a2104e 100755
--- a/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php
+++ b/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php
@@ -150,7 +150,8 @@ class HTML_QuickForm_RuleRegistry
'username_available' => 'HTML_QuickForm_Rule_UsernameAvailable',
'compare_fields' => 'HTML_QuickForm_Compare_Fields',
'html' => 'HTML_QuickForm_Rule_HTML',
- 'CAPTCHA' => 'HTML_QuickForm_Rule_CAPTCHA'
+ 'CAPTCHA' => 'HTML_QuickForm_Rule_CAPTCHA',
+ 'date' => 'HTML_QuickForm_Rule_Date'
);
$class = $rules[$ruleName];