diff --git a/main/inc/lib/pear/HTML/QuickForm.php b/main/inc/lib/pear/HTML/QuickForm.php
index 89e04fb396..2fc9d10253 100644
--- a/main/inc/lib/pear/HTML/QuickForm.php
+++ b/main/inc/lib/pear/HTML/QuickForm.php
@@ -26,11 +26,11 @@
/**
* PEAR and PEAR_Error classes, for error handling
*/
-require_once 'PEAR.php';
+//require_once 'PEAR.php';
/**
* Base class for all HTML classes
*/
-require_once 'HTML/Common.php';
+//require_once 'HTML/Common.php';
/**
* Element types known to HTML_QuickForm
@@ -76,23 +76,23 @@ $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] = array(
* @global array $GLOBALS['_HTML_QuickForm_registered_rules']
*/
$GLOBALS['_HTML_QuickForm_registered_rules'] = array(
- 'required' => array('html_quickform_rule_required', 'HTML/QuickForm/Rule/Required.php'),
- 'maxlength' => array('html_quickform_rule_range', 'HTML/QuickForm/Rule/Range.php'),
- 'minlength' => array('html_quickform_rule_range', 'HTML/QuickForm/Rule/Range.php'),
- 'rangelength' => array('html_quickform_rule_range', 'HTML/QuickForm/Rule/Range.php'),
- 'email' => array('html_quickform_rule_email', 'HTML/QuickForm/Rule/Email.php'),
- 'regex' => array('html_quickform_rule_regex', 'HTML/QuickForm/Rule/Regex.php'),
- 'lettersonly' => array('html_quickform_rule_regex', 'HTML/QuickForm/Rule/Regex.php'),
- 'alphanumeric' => array('html_quickform_rule_regex', 'HTML/QuickForm/Rule/Regex.php'),
- 'numeric' => array('html_quickform_rule_regex', 'HTML/QuickForm/Rule/Regex.php'),
- 'nopunctuation' => array('html_quickform_rule_regex', 'HTML/QuickForm/Rule/Regex.php'),
- 'nonzero' => array('html_quickform_rule_regex', 'HTML/QuickForm/Rule/Regex.php'),
- 'callback' => array('html_quickform_rule_callback', 'HTML/QuickForm/Rule/Callback.php'),
+ 'required' => array('HTML_QuickForm_Rule_Required', 'HTML/QuickForm/Rule/Required.php'),
+ 'maxlength' => array('HTML_QuickForm_Rule_Range', 'HTML/QuickForm/Rule/Range.php'),
+ 'minlength' => array('HTML_QuickForm_Rule_Range', 'HTML/QuickForm/Rule/Range.php'),
+ 'rangelength' => array('HTML_QuickForm_Rule_Range', 'HTML/QuickForm/Rule/Range.php'),
+ 'email' => array('HTML_QuickForm_Rule_Email', 'HTML/QuickForm/Rule/Email.php'),
+ 'regex' => array('HTML_QuickForm_Rule_Regex', 'HTML/QuickForm/Rule/Regex.php'),
+ 'lettersonly' => array('HTML_QuickForm_Rule_Regex', 'HTML/QuickForm/Rule/Regex.php'),
+ 'alphanumeric' => array('HTML_QuickForm_Rule_Regex', 'HTML/QuickForm/Rule/Regex.php'),
+ 'numeric' => array('HTML_QuickForm_Rule_Regex', 'HTML/QuickForm/Rule/Regex.php'),
+ 'nopunctuation' => array('HTML_QuickForm_Rule_Regex', 'HTML/QuickForm/Rule/Regex.php'),
+ 'nonzero' => array('HTML_QuickForm_Rule_Regex', 'HTML/QuickForm/Rule/Regex.php'),
+ 'callback' => array('HTML_QuickForm_Rule_Callback', 'HTML/QuickForm/Rule/Callback.php'),
// Added by Chamilo team, 16-MAR-2010
//'compare' => array('html_quickform_rule_compare', 'HTML/QuickForm/Rule/Compare.php')
- 'compare' => array('html_quickform_rule_compare', 'HTML/QuickForm/Rule/Compare.php'),
- 'comparedate' => array('html_quickform_rule_comparedate', 'HTML/QuickForm/Rule/CompareDate.php'),
- 'errordate' => array('html_quickform_rule_date', 'HTML/QuickForm/Rule/Date.php'),
+ 'compare' => array('HTML_QuickForm_Rule_Compare', 'HTML/QuickForm/Rule/Compare.php'),
+ 'comparedate' => array('HTML_QuickForm_Rule_CompareDate', 'HTML/QuickForm/Rule/CompareDate.php'),
+ 'errordate' => array('HTML_QuickForm_Rule_Date', 'HTML/QuickForm/Rule/Date.php'),
'captcha' => array('HTML_QuickForm_Rule_CAPTCHA', 'HTML/QuickForm/Rule/CAPTCHA.php')
//
);
@@ -419,9 +419,8 @@ class HTML_QuickForm extends HTML_Common
* @access public
* @return void
*/
- function registerRule($ruleName, $type, $data1, $data2 = null)
+ static function registerRule($ruleName, $type, $data1, $data2 = null)
{
- include_once('HTML/QuickForm/RuleRegistry.php');
$registry =& HTML_QuickForm_RuleRegistry::singleton();
$registry->registerRule($ruleName, $type, $data1, $data2);
} // end func registerRule
@@ -637,7 +636,7 @@ class HTML_QuickForm extends HTML_Common
$className = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][1];
$includeFile = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][0];
- include_once $includeFile;
+ //include_once $includeFile;
// Modified by Ivan Tcholakov, 16-MAR-2010. Suppressing a deprecation warning on PHP 5.3
//$elementObject =& new $className();
@@ -1423,16 +1422,14 @@ class HTML_QuickForm extends HTML_Common
} elseif (!$autoRegister) {
return false;
}
- // automatically register the rule if requested
- include_once 'HTML/QuickForm/RuleRegistry.php';
$ruleName = false;
if (is_object($name) && is_a($name, 'html_quickform_rule')) {
- $ruleName = !empty($name->name)? $name->name: strtolower(get_class($name));
+ $ruleName = !empty($name->name)? $name->name: get_class($name);
} elseif (is_string($name) && class_exists($name)) {
- $parent = strtolower($name);
+ $parent = $name;
do {
if ('html_quickform_rule' == strtolower($parent)) {
- $ruleName = strtolower($name);
+ $ruleName = $name;
break;
}
} while ($parent = get_parent_class($parent));
@@ -1562,7 +1559,6 @@ class HTML_QuickForm extends HTML_Common
return false;
}
- include_once('HTML/QuickForm/RuleRegistry.php');
$registry =& HTML_QuickForm_RuleRegistry::singleton();
foreach ($this->_rules as $target => $rules) {
@@ -1758,7 +1754,7 @@ class HTML_QuickForm extends HTML_Common
*/
function &defaultRenderer() {
if (!isset($GLOBALS['_HTML_QuickForm_default_renderer'])) {
- include_once 'HTML/QuickForm/Renderer/Default.php';
+ //include_once 'HTML/QuickForm/Renderer/Default.php';
// Modified by Ivan Tcholakov, 16-MAR-2010. Suppressing a deprecation warning on PHP 5.3
//$GLOBALS['_HTML_QuickForm_default_renderer'] =& new HTML_QuickForm_Renderer_Default();
$GLOBALS['_HTML_QuickForm_default_renderer'] = new HTML_QuickForm_Renderer_Default();
@@ -1804,7 +1800,6 @@ class HTML_QuickForm extends HTML_Common
return '';
}
- include_once('HTML/QuickForm/RuleRegistry.php');
$registry =& HTML_QuickForm_RuleRegistry::singleton();
$test = array();
$js_escape = array(
@@ -1916,7 +1911,6 @@ class HTML_QuickForm extends HTML_Common
*/
function toArray($collectHidden = false)
{
- include_once 'HTML/QuickForm/Renderer/Array.php';
// Modified by Ivan Tcholakov, 16-MAR-2010. Suppressing a deprecation warning on PHP 5.3
//$renderer =& new HTML_QuickForm_Renderer_Array($collectHidden);
$renderer = new HTML_QuickForm_Renderer_Array($collectHidden);
diff --git a/main/inc/lib/pear/HTML/QuickForm/Action/Back.php b/main/inc/lib/pear/HTML/QuickForm/Action/Back.php
index 29a678e024..2f4e253626 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Action/Back.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Action/Back.php
@@ -1,38 +1,38 @@
- * @copyright 2003-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version SVN: $Id: Back.php 289084 2009-10-02 06:53:09Z avb $
- * @link http://pear.php.net/package/HTML_QuickForm_Controller
- */
-
-/**
- * Class representing an action to perform on HTTP request.
- */
-require_once 'HTML/QuickForm/Action.php';
+/**
+ * The action for a 'back' button of wizard-type multipage form.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @copyright 2003-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version SVN: $Id: Back.php 289084 2009-10-02 06:53:09Z avb $
+ * @link http://pear.php.net/package/HTML_QuickForm_Controller
+ */
+
+/**
+ * Class representing an action to perform on HTTP request.
+ */
+//require_once 'HTML/QuickForm/Action.php';
/**
* The action for a 'back' button of wizard-type multipage form.
*
- * @category HTML
- * @package HTML_QuickForm_Controller
- * @author Alexey Borzov
- * @version Release: 1.0.10
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @version Release: 1.0.10
*/
class HTML_QuickForm_Action_Back extends HTML_QuickForm_Action
{
@@ -44,10 +44,10 @@ class HTML_QuickForm_Action_Back extends HTML_QuickForm_Action
$data =& $page->controller->container();
$data['values'][$pageName] = $page->exportValues();
if (!$page->controller->isModal()) {
- if (PEAR::isError($valid = $page->validate())) {
- return $valid;
- }
- $data['valid'][$pageName] = $valid;
+ if (PEAR::isError($valid = $page->validate())) {
+ return $valid;
+ }
+ $data['valid'][$pageName] = $valid;
}
// get the previous page and go to it
diff --git a/main/inc/lib/pear/HTML/QuickForm/Action/Direct.php b/main/inc/lib/pear/HTML/QuickForm/Action/Direct.php
index 25d7bab62a..8c062c1df3 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Action/Direct.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Action/Direct.php
@@ -1,6 +1,6 @@
-
* @version Release: 1.0.10
- */
-class HTML_QuickForm_Action_Direct extends HTML_QuickForm_Action
-{
- function perform(&$page, $actionName)
- {
- // save the form values and validation status to the session
- $page->isFormBuilt() or $page->buildForm();
- $pageName = $page->getAttribute('id');
- $data =& $page->controller->container();
- $data['values'][$pageName] = $page->exportValues();
+ */
+class HTML_QuickForm_Action_Direct extends HTML_QuickForm_Action
+{
+ function perform(&$page, $actionName)
+ {
+ // save the form values and validation status to the session
+ $page->isFormBuilt() or $page->buildForm();
+ $pageName = $page->getAttribute('id');
+ $data =& $page->controller->container();
+ $data['values'][$pageName] = $page->exportValues();
if (PEAR::isError($valid = $page->validate())) {
return $valid;
}
$data['valid'][$pageName] = $valid;
-
- $target =& $page->controller->getPage($actionName);
- if (PEAR::isError($target)) {
- return $target;
- } else {
- return $target->handle('jump');
- }
- }
-}
-?>
+
+ $target =& $page->controller->getPage($actionName);
+ if (PEAR::isError($target)) {
+ return $target;
+ } else {
+ return $target->handle('jump');
+ }
+ }
+}
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/Action/Display.php b/main/inc/lib/pear/HTML/QuickForm/Action/Display.php
index cd05ec6529..45e3682bb8 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Action/Display.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Action/Display.php
@@ -1,42 +1,42 @@
- * @copyright 2003-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version SVN: $Id: Display.php 289084 2009-10-02 06:53:09Z avb $
- * @link http://pear.php.net/package/HTML_QuickForm_Controller
- */
-
-/**
- * Class representing an action to perform on HTTP request.
- */
-require_once 'HTML/QuickForm/Action.php';
+/**
+ * This action handles output of the form.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @copyright 2003-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version SVN: $Id: Display.php 289084 2009-10-02 06:53:09Z avb $
+ * @link http://pear.php.net/package/HTML_QuickForm_Controller
+ */
/**
- * This action handles output of the form.
+ * Class representing an action to perform on HTTP request.
+ */
+//require_once 'HTML/QuickForm/Action.php';
+
+/**
+ * This action handles output of the form.
*
* If you want to customize the form display, subclass this class and
* override the _renderForm() method, you don't need to change the perform()
* method itself.
*
- * @category HTML
- * @package HTML_QuickForm_Controller
- * @author Alexey Borzov
- * @version Release: 1.0.10
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @version Release: 1.0.10
*/
class HTML_QuickForm_Action_Display extends HTML_QuickForm_Action
{
@@ -67,9 +67,9 @@ class HTML_QuickForm_Action_Display extends HTML_QuickForm_Action
$page->isFormBuilt() or $page->buildForm();
// if we had errors we should show them again
if (isset($validate) && $validate) {
- if (PEAR::isError($err = $page->validate())) {
- return $err;
- }
+ if (PEAR::isError($err = $page->validate())) {
+ return $err;
+ }
}
// Modified by Chamilo team, 16-MAR-2010.
//$this->_renderForm($page);
@@ -84,8 +84,8 @@ class HTML_QuickForm_Action_Display extends HTML_QuickForm_Action
* If you want to customize the form's appearance (you most certainly will),
* then you should override this method. There is no need to override perform()
*
- * @access private
- * @param HTML_QuickForm_Page the page being processed
+ * @access private
+ * @param HTML_QuickForm_Page the page being processed
*/
function _renderForm(&$page)
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/Action/Jump.php b/main/inc/lib/pear/HTML/QuickForm/Action/Jump.php
index 59f2647436..5123edc643 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Action/Jump.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Action/Jump.php
@@ -1,6 +1,6 @@
-
* @version Release: 1.0.10
- */
-class HTML_QuickForm_Action_Jump extends HTML_QuickForm_Action
-{
+ */
+class HTML_QuickForm_Action_Jump extends HTML_QuickForm_Action
+{
/**
* Splits (part of) the URI into path and query components
*
@@ -130,33 +130,33 @@ class HTML_QuickForm_Action_Jump extends HTML_QuickForm_Action
}
}
- function perform(&$page, $actionName)
- {
- // check whether the page is valid before trying to go to it
- if ($page->controller->isModal()) {
- // we check whether *all* pages up to current are valid
- // if there is an invalid page we go to it, instead of the
- // requested one
- $pageName = $page->getAttribute('id');
- if (!$page->controller->isValid($pageName)) {
- $pageName = $page->controller->findInvalid();
- }
- $current =& $page->controller->getPage($pageName);
-
- } else {
- $current =& $page;
- }
- // generate the URL for the page 'display' event and redirect to it
- $action = $current->getAttribute('action');
+ function perform(&$page, $actionName)
+ {
+ // check whether the page is valid before trying to go to it
+ if ($page->controller->isModal()) {
+ // we check whether *all* pages up to current are valid
+ // if there is an invalid page we go to it, instead of the
+ // requested one
+ $pageName = $page->getAttribute('id');
+ if (!$page->controller->isValid($pageName)) {
+ $pageName = $page->controller->findInvalid();
+ }
+ $current =& $page->controller->getPage($pageName);
+
+ } else {
+ $current =& $page;
+ }
+ // generate the URL for the page 'display' event and redirect to it
+ $action = $current->getAttribute('action');
// Bug #13087: RFC 2616 requires an absolute URI in Location header
if (!preg_match('!^https?://!i', $action)) {
$action = $this->_resolveRelativeURL($action);
}
- $url = $action . (false === strpos($action, '?')? '?': '&') .
- $current->getButtonName('display') . '=true' .
+ $url = $action . (false === strpos($action, '?')? '?': '&') .
+ $current->getButtonName('display') . '=true' .
((!defined('SID') || '' == SID || ini_get('session.use_only_cookies'))? '': '&' . SID);
- header('Location: ' . $url);
- exit;
- }
-}
-?>
+ header('Location: ' . $url);
+ exit;
+ }
+}
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/Action/Next.php b/main/inc/lib/pear/HTML/QuickForm/Action/Next.php
index 664bd33214..e4c6989793 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Action/Next.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Action/Next.php
@@ -1,38 +1,38 @@
- * @copyright 2003-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version SVN: $Id: Next.php 289084 2009-10-02 06:53:09Z avb $
- * @link http://pear.php.net/package/HTML_QuickForm_Controller
- */
-
-/**
- * Class representing an action to perform on HTTP request.
- */
-require_once 'HTML/QuickForm/Action.php';
+/**
+ * The action for a 'next' button of wizard-type multipage form.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @copyright 2003-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version SVN: $Id: Next.php 289084 2009-10-02 06:53:09Z avb $
+ * @link http://pear.php.net/package/HTML_QuickForm_Controller
+ */
+
+/**
+ * Class representing an action to perform on HTTP request.
+ */
+//require_once 'HTML/QuickForm/Action.php';
/**
* The action for a 'next' button of wizard-type multipage form.
*
- * @category HTML
- * @package HTML_QuickForm_Controller
- * @author Alexey Borzov
- * @version Release: 1.0.10
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @version Release: 1.0.10
*/
class HTML_QuickForm_Action_Next extends HTML_QuickForm_Action
{
@@ -43,10 +43,10 @@ class HTML_QuickForm_Action_Next extends HTML_QuickForm_Action
$pageName = $page->getAttribute('id');
$data =& $page->controller->container();
$data['values'][$pageName] = $page->exportValues();
- if (PEAR::isError($valid = $page->validate())) {
- return $valid;
- }
- $data['valid'][$pageName] = $valid;
+ if (PEAR::isError($valid = $page->validate())) {
+ return $valid;
+ }
+ $data['valid'][$pageName] = $valid;
// Modal form and page is invalid: don't go further
if ($page->controller->isModal() && !$data['valid'][$pageName]) {
diff --git a/main/inc/lib/pear/HTML/QuickForm/Action/Submit.php b/main/inc/lib/pear/HTML/QuickForm/Action/Submit.php
index 6a4c1125ca..bf94eeeb9c 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Action/Submit.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Action/Submit.php
@@ -1,38 +1,38 @@
- * @copyright 2003-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version SVN: $Id: Submit.php 289084 2009-10-02 06:53:09Z avb $
- * @link http://pear.php.net/package/HTML_QuickForm_Controller
- */
-
-/**
- * Class representing an action to perform on HTTP request.
- */
-require_once 'HTML/QuickForm/Action.php';
+/**
+ * The action for a 'submit' button.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @copyright 2003-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version SVN: $Id: Submit.php 289084 2009-10-02 06:53:09Z avb $
+ * @link http://pear.php.net/package/HTML_QuickForm_Controller
+ */
+
+/**
+ * Class representing an action to perform on HTTP request.
+ */
+//require_once 'HTML/QuickForm/Action.php';
/**
* The action for a 'submit' button.
*
- * @category HTML
- * @package HTML_QuickForm_Controller
- * @author Alexey Borzov
- * @version Release: 1.0.10
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @version Release: 1.0.10
*/
class HTML_QuickForm_Action_Submit extends HTML_QuickForm_Action
{
@@ -43,10 +43,10 @@ class HTML_QuickForm_Action_Submit extends HTML_QuickForm_Action
$pageName = $page->getAttribute('id');
$data =& $page->controller->container();
$data['values'][$pageName] = $page->exportValues();
- if (PEAR::isError($valid = $page->validate())) {
- return $valid;
- }
- $data['valid'][$pageName] = $valid;
+ if (PEAR::isError($valid = $page->validate())) {
+ return $valid;
+ }
+ $data['valid'][$pageName] = $valid;
// All pages are valid, process
if ($page->controller->isValid()) {
@@ -73,4 +73,4 @@ class HTML_QuickForm_Action_Submit extends HTML_QuickForm_Action
}
}
-?>
\ No newline at end of file
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php
index c5ae7040e0..10d80d7a85 100644
--- a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php
+++ b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA.php
@@ -54,8 +54,8 @@
/**
* Required packages
*/
-require_once 'HTML/QuickForm/input.php';
-require_once 'Text/CAPTCHA.php';
+/*require_once 'HTML/QuickForm/input.php';
+require_once 'Text/CAPTCHA.php';*/
/**
* Common class for HTML_QuickForm elements to display a CAPTCHA
@@ -263,6 +263,6 @@ class HTML_QuickForm_CAPTCHA extends HTML_QuickForm_input
/**
* Register the rule with QuickForm
*/
-require_once 'HTML/QuickForm/Rule/CAPTCHA.php';
+//require_once 'HTML/QuickForm/Rule/CAPTCHA.php';
?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Equation.php b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Equation.php
index 29edac9669..85141da179 100644
--- a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Equation.php
+++ b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Equation.php
@@ -24,8 +24,8 @@
/**
* Required packages
*/
-require_once 'HTML/QuickForm/CAPTCHA.php';
-require_once 'Text/CAPTCHA/Driver/Equation.php';
+/*require_once 'HTML/QuickForm/CAPTCHA.php';
+require_once 'Text/CAPTCHA/Driver/Equation.php';*/
/**
* Element for HTML_QuickForm to display a CAPTCHA equation question
@@ -90,4 +90,4 @@ if (class_exists('HTML_QuickForm')) {
'HTML_QuickForm_CAPTCHA_Equation');
}
-?>
\ No newline at end of file
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Figlet.php b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Figlet.php
index 06c09ae11e..a24ac4418e 100644
--- a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Figlet.php
+++ b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Figlet.php
@@ -24,8 +24,8 @@
/**
* Required packages
*/
-require_once 'HTML/QuickForm/CAPTCHA.php';
-require_once 'Text/CAPTCHA/Driver/Figlet.php';
+/*require_once 'HTML/QuickForm/CAPTCHA.php';
+require_once 'Text/CAPTCHA/Driver/Figlet.php';*/
/**
* Element for HTML_QuickForm to display a CAPTCHA figlet
@@ -123,4 +123,4 @@ if (class_exists('HTML_QuickForm')) {
'HTML_QuickForm_CAPTCHA_Figlet');
}
-?>
\ No newline at end of file
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Image.php b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Image.php
index 02d685da02..ec8a71db9d 100644
--- a/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Image.php
+++ b/main/inc/lib/pear/HTML/QuickForm/CAPTCHA/Image.php
@@ -24,8 +24,8 @@
/**
* Required packages
*/
-require_once 'HTML/QuickForm/CAPTCHA.php';
-require_once 'Text/CAPTCHA/Driver/Image.php';
+/*require_once 'HTML/QuickForm/CAPTCHA.php';
+require_once 'Text/CAPTCHA/Driver/Image.php';*/
/**
* Element for HTML_QuickForm to display a CAPTCHA image
diff --git a/main/inc/lib/pear/HTML/QuickForm/Controller.php b/main/inc/lib/pear/HTML/QuickForm/Controller.php
index 9030576862..0ce816c889 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Controller.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Controller.php
@@ -1,31 +1,31 @@
- * @author Bertrand Mansion
- * @copyright 2003-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version SVN: $Id: Controller.php 289084 2009-10-02 06:53:09Z avb $
- * @link http://pear.php.net/package/HTML_QuickForm_Controller
- */
-
-/**
- * The class representing a page of a multipage form.
- */
-require_once 'HTML/QuickForm/Page.php';
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * The class representing a Controller of MVC design pattern.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @author Bertrand Mansion
+ * @copyright 2003-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version SVN: $Id: Controller.php 289084 2009-10-02 06:53:09Z avb $
+ * @link http://pear.php.net/package/HTML_QuickForm_Controller
+ */
+
+/**
+ * The class representing a page of a multipage form.
+ */
+//require_once 'HTML/QuickForm/Page.php';
/**
* The class representing a Controller of MVC design pattern.
@@ -36,11 +36,11 @@ require_once 'HTML/QuickForm/Page.php';
*
* Generally you don't need to subclass this.
*
- * @category HTML
- * @package HTML_QuickForm_Controller
- * @author Alexey Borzov
- * @author Bertrand Mansion
- * @version Release: 1.0.10
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @author Bertrand Mansion
+ * @version Release: 1.0.10
*/
class HTML_QuickForm_Controller
{
@@ -132,7 +132,7 @@ class HTML_QuickForm_Controller
* to the page's handle() method.
*
* @access public
- * @throws PEAR_Error
+ * @throws PEAR_Error
*/
function run()
{
@@ -146,8 +146,8 @@ class HTML_QuickForm_Controller
* Registers a handler for a specific action.
*
* @access public
- * @param string name of the action
- * @param HTML_QuickForm_Action the handler for the action
+ * @param string name of the action
+ * @param HTML_QuickForm_Action the handler for the action
*/
function addAction($actionName, &$action)
{
@@ -159,7 +159,7 @@ class HTML_QuickForm_Controller
* Adds a new page to the form
*
* @access public
- * @param HTML_QuickForm_Page
+ * @param HTML_QuickForm_Page
*/
function addPage(&$page)
{
@@ -172,9 +172,9 @@ class HTML_QuickForm_Controller
* Returns a page
*
* @access public
- * @param string Name of a page
- * @return HTML_QuickForm_Page A reference to the page
- * @throws PEAR_Error
+ * @param string Name of a page
+ * @return HTML_QuickForm_Page A reference to the page
+ * @throws PEAR_Error
*/
function &getPage($pageName)
{
@@ -193,9 +193,9 @@ class HTML_QuickForm_Controller
* for common actions, if specific ones were not added.
*
* @access public
- * @param HTML_QuickForm_Page The page that failed to handle the action
- * @param string Name of the action
- * @throws PEAR_Error
+ * @param HTML_QuickForm_Page The page that failed to handle the action
+ * @param string Name of the action
+ * @throws PEAR_Error
*/
function handle(&$page, $actionName)
{
@@ -208,7 +208,6 @@ class HTML_QuickForm_Controller
case 'submit':
case 'display':
case 'jump':
- include_once 'HTML/QuickForm/Action/' . ucfirst($actionName) . '.php';
$className = 'HTML_QuickForm_Action_' . $actionName;
$this->_actions[$actionName] =& new $className();
return $this->_actions[$actionName]->perform($page, $actionName);
@@ -237,7 +236,7 @@ class HTML_QuickForm_Controller
* @access public
* @param string If set, check only the pages before (not including) that page
* @return bool
- * @throws PEAR_Error
+ * @throws PEAR_Error
*/
function isValid($pageName = null)
{
@@ -250,11 +249,11 @@ class HTML_QuickForm_Controller
// seen a page of a non-modal multipage form
if (!$this->isModal() && null === $data['valid'][$key]) {
$page =& $this->_pages[$key];
- // Fix for bug #8687: the unseen page was considered
- // submitted, so defaults for checkboxes and multiselects
- // were not used. Shouldn't break anything since this flag
- // will be reset right below in loadValues().
- $page->_flagSubmitted = false;
+ // Fix for bug #8687: the unseen page was considered
+ // submitted, so defaults for checkboxes and multiselects
+ // were not used. Shouldn't break anything since this flag
+ // will be reset right below in loadValues().
+ $page->_flagSubmitted = false;
// Use controller's defaults and constants, if present
$this->applyDefaults($key);
$page->isFormBuilt() or $page->BuildForm();
@@ -262,11 +261,11 @@ class HTML_QuickForm_Controller
$data['values'][$key] = $page->exportValues();
$page->loadValues($data['values'][$key]);
// Is the page now valid?
- if (PEAR::isError($valid = $page->validate())) {
- return $valid;
- }
- $data['valid'][$key] = $valid;
- if (true === $valid) {
+ if (PEAR::isError($valid = $page->validate())) {
+ return $valid;
+ }
+ $data['valid'][$key] = $valid;
+ if (true === $valid) {
continue;
}
}
diff --git a/main/inc/lib/pear/HTML/QuickForm/Page.php b/main/inc/lib/pear/HTML/QuickForm/Page.php
index 71d73ddbb8..c26f83a082 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Page.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Page.php
@@ -1,44 +1,44 @@
- * @author Bertrand Mansion
- * @copyright 2003-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version SVN: $Id: Page.php 289084 2009-10-02 06:53:09Z avb $
- * @link http://pear.php.net/package/HTML_QuickForm_Controller
- */
-
-/**
- * Create, validate and process HTML forms
- */
-require_once 'HTML/QuickForm.php';
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * Class representing a page of a multipage form.
+ * Class representing a page of a multipage form.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @author Bertrand Mansion
+ * @copyright 2003-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version SVN: $Id: Page.php 289084 2009-10-02 06:53:09Z avb $
+ * @link http://pear.php.net/package/HTML_QuickForm_Controller
+ */
+
+/**
+ * Create, validate and process HTML forms
+ */
+//require_once 'HTML/QuickForm.php';
+
+/**
+ * Class representing a page of a multipage form.
*
* Generally you'll need to subclass this and define your buildForm()
* method that will build the form. While it is also possible to instantiate
* this class and build the form manually, this is not the recommended way.
*
- * @category HTML
- * @package HTML_QuickForm_Controller
- * @author Alexey Borzov
- * @author Bertrand Mansion
- * @version Release: 1.0.10
+ * @category HTML
+ * @package HTML_QuickForm_Controller
+ * @author Alexey Borzov
+ * @author Bertrand Mansion
+ * @version Release: 1.0.10
*/
class HTML_QuickForm_Page extends HTML_QuickForm
{
@@ -50,8 +50,8 @@ class HTML_QuickForm_Page extends HTML_QuickForm
/**
* Contains a reference to a Controller object containing this page
- * @var HTML_QuickForm_Controller
- * @access public
+ * @var HTML_QuickForm_Controller
+ * @access public
*/
var $controller = null;
@@ -66,7 +66,7 @@ class HTML_QuickForm_Page extends HTML_QuickForm
*
* @access public
*/
- function HTML_QuickForm_Page($formName, $method = 'post', $target = '', $attributes = null)
+ function HTML_QuickForm_Page($formName, $method = 'post', $target = '', $attributes = null)
{
$this->HTML_QuickForm($formName, $method, '', $target, $attributes);
}
@@ -76,8 +76,8 @@ class HTML_QuickForm_Page extends HTML_QuickForm
* Registers a handler for a specific action.
*
* @access public
- * @param string name of the action
- * @param HTML_QuickForm_Action the handler for the action
+ * @param string name of the action
+ * @param HTML_QuickForm_Action the handler for the action
*/
function addAction($actionName, &$action)
{
@@ -93,7 +93,7 @@ class HTML_QuickForm_Page extends HTML_QuickForm
*
* @access public
* @param string Name of the action
- * @throws PEAR_Error
+ * @throws PEAR_Error
*/
function handle($actionName)
{
@@ -128,7 +128,7 @@ class HTML_QuickForm_Page extends HTML_QuickForm
*/
function loadValues($values)
{
- $this->_flagSubmitted = true;
+ $this->_flagSubmitted = true;
$this->_submitValues = $values;
foreach (array_keys($this->_elements) as $key) {
$this->_elements[$key]->onQuickFormEvent('updateValue', null, $this);
@@ -185,26 +185,26 @@ class HTML_QuickForm_Page extends HTML_QuickForm
$this->addElement('hidden', '_qf_default', $this->getAttribute('id') . ':' . $actionName);
}
}
-
-
- /**
- * Returns 'safe' elements' values
- *
- * @param mixed Array/string of element names, whose values we want. If not set then return all elements.
- * @param bool Whether to remove internal (_qf_...) values from the resultant array
- */
- function exportValues($elementList = null, $filterInternal = false)
- {
- $values = parent::exportValues($elementList);
- if ($filterInternal) {
- foreach (array_keys($values) as $key) {
- if (0 === strpos($key, '_qf_')) {
- unset($values[$key]);
- }
- }
- }
- return $values;
- }
+
+
+ /**
+ * Returns 'safe' elements' values
+ *
+ * @param mixed Array/string of element names, whose values we want. If not set then return all elements.
+ * @param bool Whether to remove internal (_qf_...) values from the resultant array
+ */
+ function exportValues($elementList = null, $filterInternal = false)
+ {
+ $values = parent::exportValues($elementList);
+ if ($filterInternal) {
+ foreach (array_keys($values) as $key) {
+ if (0 === strpos($key, '_qf_')) {
+ unset($values[$key]);
+ }
+ }
+ }
+ return $values;
+ }
}
?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php b/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php
index 3a011e2cb4..09faf34cea 100644
--- a/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php
@@ -26,7 +26,7 @@
/**
* An abstract base class for QuickForm renderers
*/
-require_once 'HTML/QuickForm/Renderer.php';
+//require_once 'HTML/QuickForm/Renderer.php';
/**
* A concrete renderer for HTML_QuickForm, based on QuickForm 2.x built-in one
@@ -197,9 +197,9 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
if (!empty($form->_required) && !$form->_freezeAll) {
$this->_html .= str_replace('{requiredNote}', $form->getRequiredNote(), $this->_requiredNoteTemplate);
}
- // add form attributes and content
- $html = str_replace('{attributes}', $form->getAttributes(true), $this->_formTemplate);
-
+ // add form attributes and content
+ $html = str_replace('{attributes}', $form->getAttributes(true), $this->_formTemplate);
+
if (strpos($this->_formTemplate, '{hidden}')) {
$html = str_replace('{hidden}', $this->_hiddenHtml, $html);
} else {
@@ -248,7 +248,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
} else {
$nameLabel = $label;
}
-
+
if (isset($this->_templates[$name])) {
$html = str_replace('{label}', $nameLabel, $this->_templates[$name]);
} else {
@@ -295,7 +295,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
*/
function renderElement(&$element, $required, $error) {
if (!$this->_inGroup) {
- $html = $this->_prepareTemplate($element->getName(), $element->getLabel(), $required, $error);
+ $html = $this->_prepareTemplate($element->getName(), $element->getLabel(), $required, $error);
$this->_html .= str_replace('{element}', $element->toHtml(), $html);
} elseif (!empty($this->_groupElementTemplate)) {
$html = str_replace('{label}', $element->getLabel(), $this->_groupElementTemplate);
@@ -381,7 +381,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
if (!empty($this->_groupWrap)) {
$html = str_replace('{content}', $html, $this->_groupWrap);
}
- $this->_html .= str_replace('{element}', $html, $this->_groupTemplate);
+ $this->_html .= str_replace('{element}', $html, $this->_groupTemplate);
$this->_inGroup = false;
} // end func finishGroup
@@ -453,7 +453,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
* @return void
*/
function setFormTemplate($html) {
- $this->_formTemplate = $html;
+ $this->_formTemplate = $html;
} // end func setFormTemplate
/**
@@ -482,4 +482,4 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
$this->setRequiredNoteTemplate('');
$this->_templates = array();
} // end func clearAllTemplates
-} // end class HTML_QuickForm_Renderer_Default
\ No newline at end of file
+} // end class HTML_QuickForm_Renderer_Default
diff --git a/main/inc/lib/pear/HTML/QuickForm/Rule/Callback.php b/main/inc/lib/pear/HTML/QuickForm/Rule/Callback.php
index 0a7eb6bd51..6d0ae315b5 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Rule/Callback.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Rule/Callback.php
@@ -1,40 +1,40 @@
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: Callback.php,v 1.9 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Abstract base class for QuickForm validation rules
- */
-require_once 'HTML/QuickForm/Rule.php';
+/**
+ * Validates values using callback functions or methods
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: Callback.php,v 1.9 2009/04/04 21:34:04 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Abstract base class for QuickForm validation rules
+ */
+//require_once 'HTML/QuickForm/Rule.php';
/**
- * Validates values using callback functions or methods
- *
- * @category HTML
- * @package HTML_QuickForm
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 3.2
- */
+ * Validates values using callback functions or methods
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 3.2
+ */
class HTML_QuickForm_Rule_Callback extends HTML_QuickForm_Rule
{
/**
@@ -121,4 +121,4 @@ class HTML_QuickForm_Rule_Callback extends HTML_QuickForm_Rule
} // end func getValidationScript
} // end class HTML_QuickForm_Rule_Callback
-?>
\ No newline at end of file
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/Rule/CompareDate.php b/main/inc/lib/pear/HTML/QuickForm/Rule/CompareDate.php
index 5fb5d6ebb5..21d9b6af8c 100644
--- a/main/inc/lib/pear/HTML/QuickForm/Rule/CompareDate.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Rule/CompareDate.php
@@ -23,7 +23,7 @@
/**
* Code
*/
-require_once 'HTML/QuickForm/Rule.php';
+//require_once 'HTML/QuickForm/Rule.php';
/**
* Rule to compare two form fields
*
@@ -76,4 +76,4 @@ class HTML_QuickForm_Rule_CompareDate extends HTML_QuickForm_Rule
$compareFn = create_function('$a, $b', 'return mktime($a[\'H\'],$a[\'i\'],0,$a[\'M\'],$a[\'d\'],$a[\'Y\']) <= mktime($b[\'H\'],$b[\'i\'],0,$b[\'M\'],$b[\'d\'],$b[\'Y\'] );');
return $compareFn($values[0], $values[1]);
}
-}
\ No newline at end of file
+}
diff --git a/main/inc/lib/pear/HTML/QuickForm/Rule/Date.php b/main/inc/lib/pear/HTML/QuickForm/Rule/Date.php
index da75f72390..21d1bb928b 100644
--- a/main/inc/lib/pear/HTML/QuickForm/Rule/Date.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Rule/Date.php
@@ -1,13 +1,5 @@
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: Regex.php,v 1.6 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Abstract base class for QuickForm validation rules
- */
-require_once 'HTML/QuickForm/Rule.php';
+/**
+ * Validates values using regular expressions
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: Regex.php,v 1.6 2009/04/04 21:34:04 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Abstract base class for QuickForm validation rules
+ */
+//require_once 'HTML/QuickForm/Rule.php';
/**
- * Validates values using regular expressions
- *
- * @category HTML
- * @package HTML_QuickForm
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 3.2
- */
+ * Validates values using regular expressions
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 3.2
+ */
class HTML_QuickForm_Rule_Regex extends HTML_QuickForm_Rule
{
/**
@@ -64,13 +64,13 @@ class HTML_QuickForm_Rule_Regex extends HTML_QuickForm_Rule
*/
function validate($value, $regex = null)
{
- // Fix for bug #10799: add 'D' modifier to regex
+ // Fix for bug #10799: add 'D' modifier to regex
if (isset($this->_data[$this->name])) {
- if (!preg_match($this->_data[$this->name] . 'D', $value)) {
+ if (!preg_match($this->_data[$this->name] . 'D', $value)) {
return false;
}
} else {
- if (!preg_match($regex . 'D', $value)) {
+ if (!preg_match($regex . 'D', $value)) {
return false;
}
}
@@ -94,14 +94,14 @@ class HTML_QuickForm_Rule_Regex extends HTML_QuickForm_Rule
{
$regex = isset($this->_data[$this->name]) ? $this->_data[$this->name] : $options;
- // bug #12376, converting unicode escapes and stripping 'u' modifier
- if ($pos = strpos($regex, 'u', strrpos($regex, '/'))) {
- $regex = substr($regex, 0, $pos) . substr($regex, $pos + 1);
- $regex = preg_replace('/(?\\\\\\\\)*\\\\x{([a-fA-F0-9]+)}/', '\\u$1', $regex);
- }
-
+ // bug #12376, converting unicode escapes and stripping 'u' modifier
+ if ($pos = strpos($regex, 'u', strrpos($regex, '/'))) {
+ $regex = substr($regex, 0, $pos) . substr($regex, $pos + 1);
+ $regex = preg_replace('/(?\\\\\\\\)*\\\\x{([a-fA-F0-9]+)}/', '\\u$1', $regex);
+ }
+
return array(" var regex = " . $regex . ";\n", "{jsVar} != '' && !regex.test({jsVar})");
} // end func getValidationScript
} // end class HTML_QuickForm_Rule_Regex
-?>
\ No newline at end of file
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/Rule/Required.php b/main/inc/lib/pear/HTML/QuickForm/Rule/Required.php
index 727a44b712..86e43e4735 100755
--- a/main/inc/lib/pear/HTML/QuickForm/Rule/Required.php
+++ b/main/inc/lib/pear/HTML/QuickForm/Rule/Required.php
@@ -1,6 +1,6 @@
-
+class HTML_QuickForm_Rule_Required extends HTML_QuickForm_Rule
+{
+ /**
+ * Checks if an element is empty
+ *
+ * @param string $value Value to check
+ * @param mixed $options Not used yet
+ * @access public
+ * @return boolean true if value is not empty
+ */
+ function validate($value, $options = null)
+ {
+ if ((string)$value == '') {
+ return false;
+ }
+ return true;
+ } // end func validate
+
+
+ function getValidationScript($options = null)
+ {
+ return array('', "{jsVar} == ''");
+ } // end func getValidationScript
+
+} // end class HTML_QuickForm_Rule_Required
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php b/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php
index d9dc75e942..42ee7b80fa 100644
--- a/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php
+++ b/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php
@@ -102,11 +102,11 @@ class HTML_QuickForm_RuleRegistry
} elseif (is_object($data1)) {
// An instance of HTML_QuickForm_Rule
$this->_rules[strtolower(get_class($data1))] = $data1;
- $GLOBALS['_HTML_QuickForm_registered_rules'][$ruleName] = array(strtolower(get_class($data1)), null);
+ $GLOBALS['_HTML_QuickForm_registered_rules'][$ruleName] = array(get_class($data1), null);
} else {
// Rule class name
- $GLOBALS['_HTML_QuickForm_registered_rules'][$ruleName] = array(strtolower($data1), $data2);
+ $GLOBALS['_HTML_QuickForm_registered_rules'][$ruleName] = array($data1, $data2);
}
} // end func registerRule
@@ -120,15 +120,10 @@ class HTML_QuickForm_RuleRegistry
function &getRule($ruleName)
{
list($class, $path) = $GLOBALS['_HTML_QuickForm_registered_rules'][$ruleName];
-
if (!isset($this->_rules[$class])) {
- if (!empty($path)) {
- include_once($path);
- }
// Modified by Ivan Tcholakov, 16-MAR-2010. Suppressing a deprecation warning on PHP 5.3
//$this->_rules[$class] =& new $class();
$this->_rules[$class] = new $class();
- //
}
$this->_rules[$class]->setName($ruleName);
return $this->_rules[$class];
diff --git a/main/inc/lib/pear/HTML/QuickForm/advanced_settings.php b/main/inc/lib/pear/HTML/QuickForm/advanced_settings.php
index 0b499604fc..304e52649b 100644
--- a/main/inc/lib/pear/HTML/QuickForm/advanced_settings.php
+++ b/main/inc/lib/pear/HTML/QuickForm/advanced_settings.php
@@ -3,7 +3,7 @@
* HTML class for static data
* @example $form->addElement('advanced_settings', 'advanced settings');
*/
-require_once 'HTML/QuickForm/static.php';
+//require_once 'HTML/QuickForm/static.php';
/**
* A pseudo-element used for adding raw HTML to form
diff --git a/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php b/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php
index 2568fc1f89..d6fa64d361 100755
--- a/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php
+++ b/main/inc/lib/pear/HTML/QuickForm/advcheckbox.php
@@ -1,31 +1,31 @@
- * @author Alexey Borzov
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: advcheckbox.php,v 1.18 2009/04/04 21:34:02 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * HTML class for a checkbox type field
- */
-require_once 'HTML/QuickForm/checkbox.php';
+/**
+ * HTML class for an advanced checkbox type field
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Jason Rust
+ * @author Alexey Borzov
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: advcheckbox.php,v 1.18 2009/04/04 21:34:02 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * HTML class for a checkbox type field
+ */
+//require_once 'HTML/QuickForm/checkbox.php';
/**
* HTML class for an advanced checkbox type field
@@ -42,12 +42,12 @@ require_once 'HTML/QuickForm/checkbox.php';
* checked, PHP overwrites the value of the hidden field with
* its value.
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Jason Rust
- * @author Alexey Borzov
- * @version Release: 3.2.11
- * @since 2.0
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Jason Rust
+ * @author Alexey Borzov
+ * @version Release: 3.2.11
+ * @since 2.0
*/
class HTML_QuickForm_advcheckbox extends HTML_QuickForm_checkbox
{
@@ -236,7 +236,7 @@ class HTML_QuickForm_advcheckbox extends HTML_QuickForm_checkbox
*
* @param string $event Name of event
* @param mixed $arg event arguments
- * @param object &$caller calling object
+ * @param object &$caller calling object
* @since 1.0
* @access public
* @return void
diff --git a/main/inc/lib/pear/HTML/QuickForm/autocomplete.php b/main/inc/lib/pear/HTML/QuickForm/autocomplete.php
index 46fff9588f..512f3019ed 100755
--- a/main/inc/lib/pear/HTML/QuickForm/autocomplete.php
+++ b/main/inc/lib/pear/HTML/QuickForm/autocomplete.php
@@ -1,54 +1,54 @@
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: autocomplete.php,v 1.8 2009/04/04 21:34:02 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
+/**
+ * HTML class for an autocomplete element
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Matteo Di Giovinazzo
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: autocomplete.php,v 1.8 2009/04/04 21:34:02 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
-/**
- * HTML class for a text field
- */
-require_once 'HTML/QuickForm/text.php';
+/**
+ * HTML class for a text field
+ */
+//require_once 'HTML/QuickForm/text.php';
/**
- * HTML class for an autocomplete element
- *
- * Creates an HTML input text element that
- * at every keypressed javascript event checks in an array of options
- * if there's a match and autocompletes the text in case of match.
+ * HTML class for an autocomplete element
+ *
+ * Creates an HTML input text element that
+ * at every keypressed javascript event checks in an array of options
+ * if there's a match and autocompletes the text in case of match.
+ *
+ * For the JavaScript code thanks to Martin Honnen and Nicholas C. Zakas
+ * See {@link http://www.faqts.com/knowledge_base/view.phtml/aid/13562} and
+ * {@link http://www.sitepoint.com/article/1220}
*
- * For the JavaScript code thanks to Martin Honnen and Nicholas C. Zakas
- * See {@link http://www.faqts.com/knowledge_base/view.phtml/aid/13562} and
- * {@link http://www.sitepoint.com/article/1220}
- *
- * Example:
- *
+ * Example:
+ *
* $autocomplete =& $form->addElement('autocomplete', 'fruit', 'Favourite fruit:');
* $options = array("Apple", "Orange", "Pear", "Strawberry");
* $autocomplete->setOptions($options);
- *
+ *
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Matteo Di Giovinazzo
- * @version Release: 3.2.11
- * @since 3.2
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Matteo Di Giovinazzo
+ * @version Release: 3.2.11
+ * @since 3.2
*/
class HTML_QuickForm_autocomplete extends HTML_QuickForm_text
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/button.php b/main/inc/lib/pear/HTML/QuickForm/button.php
index 83d7643bd4..e6dec42ad4 100644
--- a/main/inc/lib/pear/HTML/QuickForm/button.php
+++ b/main/inc/lib/pear/HTML/QuickForm/button.php
@@ -25,7 +25,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/input.php';
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for an elements
@@ -54,7 +54,7 @@ class HTML_QuickForm_button extends HTML_QuickForm_input
*/
function HTML_QuickForm_button($elementName=null, $value=null, $attributes = null) {
HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
- $this->_persistantFreeze = false;
+ $this->_persistantFreeze = false;
$this->setValue($value);
$this->setType('button');
} //end constructor
diff --git a/main/inc/lib/pear/HTML/QuickForm/checkbox.php b/main/inc/lib/pear/HTML/QuickForm/checkbox.php
index 8a165515c7..ec65759ec9 100644
--- a/main/inc/lib/pear/HTML/QuickForm/checkbox.php
+++ b/main/inc/lib/pear/HTML/QuickForm/checkbox.php
@@ -26,7 +26,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/input.php';
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a checkbox type field
diff --git a/main/inc/lib/pear/HTML/QuickForm/date.php b/main/inc/lib/pear/HTML/QuickForm/date.php
index bb3d4c7302..443e97d356 100755
--- a/main/inc/lib/pear/HTML/QuickForm/date.php
+++ b/main/inc/lib/pear/HTML/QuickForm/date.php
@@ -24,11 +24,11 @@
/**
* Class for a group of form elements
*/
-require_once 'HTML/QuickForm/group.php';
+//require_once 'HTML/QuickForm/group.php';
/**
* Class for elements
*/
-require_once 'HTML/QuickForm/select.php';
+//require_once 'HTML/QuickForm/select.php';
/**
* Class for a group of elements used to input dates (and times).
@@ -494,7 +494,6 @@ class HTML_QuickForm_date extends HTML_QuickForm_group
function toHtml()
{
- include_once('HTML/QuickForm/Renderer/Default.php');
$renderer = new HTML_QuickForm_Renderer_Default();
$renderer->setElementTemplate('{element}');
parent::accept($renderer);
diff --git a/main/inc/lib/pear/HTML/QuickForm/element.php b/main/inc/lib/pear/HTML/QuickForm/element.php
index def79338c5..881570bb56 100644
--- a/main/inc/lib/pear/HTML/QuickForm/element.php
+++ b/main/inc/lib/pear/HTML/QuickForm/element.php
@@ -26,7 +26,7 @@
/**
* Base class for all HTML classes
*/
-require_once 'HTML/Common.php';
+//require_once 'HTML/Common.php';
/**
* Base class for form elements
diff --git a/main/inc/lib/pear/HTML/QuickForm/email.php b/main/inc/lib/pear/HTML/QuickForm/email.php
index 82462c1429..5b643cc0d0 100644
--- a/main/inc/lib/pear/HTML/QuickForm/email.php
+++ b/main/inc/lib/pear/HTML/QuickForm/email.php
@@ -2,7 +2,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/input.php';
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a password type field
@@ -73,4 +73,4 @@ class HTML_QuickForm_email extends HTML_QuickForm_input
// }}}
-} //end class HTML_QuickForm_password
\ No newline at end of file
+} //end class HTML_QuickForm_password
diff --git a/main/inc/lib/pear/HTML/QuickForm/file.php b/main/inc/lib/pear/HTML/QuickForm/file.php
index 79ac953a8e..88a46c7f30 100644
--- a/main/inc/lib/pear/HTML/QuickForm/file.php
+++ b/main/inc/lib/pear/HTML/QuickForm/file.php
@@ -26,15 +26,15 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/input.php';
+//require_once 'HTML/QuickForm/input.php';
// register file-related rules
-if (class_exists('HTML_QuickForm')) {
- HTML_QuickForm::registerRule('uploadedfile', 'callback', '_ruleIsUploadedFile', 'HTML_QuickForm_file');
- HTML_QuickForm::registerRule('maxfilesize', 'callback', '_ruleCheckMaxFileSize', 'HTML_QuickForm_file');
- HTML_QuickForm::registerRule('mimetype', 'callback', '_ruleCheckMimeType', 'HTML_QuickForm_file');
- HTML_QuickForm::registerRule('filename', 'callback', '_ruleCheckFileName', 'HTML_QuickForm_file');
-}
+
+HTML_QuickForm::registerRule('uploadedfile', 'callback', '_ruleIsUploadedFile', 'HTML_QuickForm_file');
+HTML_QuickForm::registerRule('maxfilesize', 'callback', '_ruleCheckMaxFileSize', 'HTML_QuickForm_file');
+HTML_QuickForm::registerRule('mimetype', 'callback', '_ruleCheckMimeType', 'HTML_QuickForm_file');
+HTML_QuickForm::registerRule('filename', 'callback', '_ruleCheckFileName', 'HTML_QuickForm_file');
+
/**
* HTML class for a file upload field
diff --git a/main/inc/lib/pear/HTML/QuickForm/group.php b/main/inc/lib/pear/HTML/QuickForm/group.php
index fd37af9078..c790c0b8f9 100644
--- a/main/inc/lib/pear/HTML/QuickForm/group.php
+++ b/main/inc/lib/pear/HTML/QuickForm/group.php
@@ -26,7 +26,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/element.php';
+//require_once 'HTML/QuickForm/element.php';
/**
* HTML class for a form element group
@@ -298,7 +298,6 @@ class HTML_QuickForm_group extends HTML_QuickForm_element
*/
function toHtml()
{
- include_once('HTML/QuickForm/Renderer/Default.php');
// Modified by Ivan Tcholakov, 16-MAR-2010. Suppressing a deprecation warning on PHP 5.3
//$renderer =& new HTML_QuickForm_Renderer_Default();
$renderer = new HTML_QuickForm_Renderer_Default();
@@ -588,4 +587,4 @@ class HTML_QuickForm_group extends HTML_QuickForm_element
// }}}
} //end class HTML_QuickForm_group
-?>
\ 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 d38b172e24..e45abb95da 100644
--- a/main/inc/lib/pear/HTML/QuickForm/header.php
+++ b/main/inc/lib/pear/HTML/QuickForm/header.php
@@ -24,7 +24,7 @@
/**
* HTML class for static data
*/
-require_once 'HTML/QuickForm/static.php';
+//require_once 'HTML/QuickForm/static.php';
/**
* A pseudo-element used for adding headers to form
@@ -50,7 +50,7 @@ class HTML_QuickForm_header extends HTML_QuickForm_static
function HTML_QuickForm_header($elementName = null, $text = null) {
if (!empty($elementName)) {
$text = $elementName;
- }
+ }
$this->HTML_QuickForm_static($elementName, null, $text);
$this->_type = 'header';
}
diff --git a/main/inc/lib/pear/HTML/QuickForm/hidden.php b/main/inc/lib/pear/HTML/QuickForm/hidden.php
index 8e75d5047c..195729de7d 100644
--- a/main/inc/lib/pear/HTML/QuickForm/hidden.php
+++ b/main/inc/lib/pear/HTML/QuickForm/hidden.php
@@ -25,7 +25,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/input.php';
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a hidden type element
diff --git a/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php b/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php
index 835228a5ec..4632bc2989 100755
--- a/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php
+++ b/main/inc/lib/pear/HTML/QuickForm/hiddenselect.php
@@ -1,45 +1,45 @@
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: hiddenselect.php,v 1.7 2009/04/04 21:34:03 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
+/**
+ * Hidden select pseudo-element
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Isaac Shepard
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: hiddenselect.php,v 1.7 2009/04/04 21:34:03 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
/**
- * Class for elements
- */
-require_once 'HTML/QuickForm/select.php';
-
-/**
- * Hidden select pseudo-element
- *
+ * Class for elements
+ */
+//require_once 'HTML/QuickForm/select.php';
+
+/**
+ * Hidden select pseudo-element
+ *
* This class takes the same arguments as a select element, but instead
* of creating a select ring it creates hidden elements for all values
* already selected with setDefault or setConstant. This is useful if
* you have a select ring that you don't want visible, but you need all
* selected values to be passed.
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Isaac Shepard
- * @version Release: 3.2.11
- * @since 2.1
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Isaac Shepard
+ * @version Release: 3.2.11
+ * @since 2.1
*/
class HTML_QuickForm_hiddenselect extends HTML_QuickForm_select
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/hierselect.php b/main/inc/lib/pear/HTML/QuickForm/hierselect.php
index 6e26f9bf30..4cdc2ee1b2 100755
--- a/main/inc/lib/pear/HTML/QuickForm/hierselect.php
+++ b/main/inc/lib/pear/HTML/QuickForm/hierselect.php
@@ -1,52 +1,52 @@
- * @author Bertrand Mansion
- * @author Alexey Borzov
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: hierselect.php,v 1.20 2009/04/04 21:34:03 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Class for a group of form elements
- */
-require_once 'HTML/QuickForm/group.php';
-/**
- * Class for elements
- */
-require_once 'HTML/QuickForm/select.php';
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * Hierarchical select element
- *
+ * Hierarchical select element
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Herim Vasquez
+ * @author Bertrand Mansion
+ * @author Alexey Borzov
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: hierselect.php,v 1.20 2009/04/04 21:34:03 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Class for a group of form elements
+ */
+//require_once 'HTML/QuickForm/group.php';
+/**
+ * Class for elements
+ */
+//require_once 'HTML/QuickForm/select.php';
+
+/**
+ * Hierarchical select element
+ *
* Class to dynamically create two or more HTML Select elements
* The first select changes the content of the second select and so on.
* This element is considered as a group. Selects will be named
* groupName[0], groupName[1], groupName[2]...
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Herim Vasquez
- * @author Bertrand Mansion
- * @author Alexey Borzov
- * @version Release: 3.2.11
- * @since 3.1
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Herim Vasquez
+ * @author Bertrand Mansion
+ * @author Alexey Borzov
+ * @version Release: 3.2.11
+ * @since 3.1
*/
class HTML_QuickForm_hierselect extends HTML_QuickForm_group
{
@@ -55,7 +55,7 @@ class HTML_QuickForm_hierselect extends HTML_QuickForm_group
/**
* Options for all the select elements
*
- * @see setOptions()
+ * @see setOptions()
* @var array
* @access private
*/
@@ -110,45 +110,45 @@ class HTML_QuickForm_hierselect extends HTML_QuickForm_group
* Initialize the array structure containing the options for each select element.
* Call the functions that actually do the magic.
*
- * Format is a bit more complex than for a simple select as we need to know
- * which options are related to the ones in the previous select:
- *
- * Ex:
- *
- * // first select
- * $select1[0] = 'Pop';
- * $select1[1] = 'Classical';
- * $select1[2] = 'Funeral doom';
- *
- * // second select
- * $select2[0][0] = 'Red Hot Chil Peppers';
- * $select2[0][1] = 'The Pixies';
- * $select2[1][0] = 'Wagner';
- * $select2[1][1] = 'Strauss';
- * $select2[2][0] = 'Pantheist';
- * $select2[2][1] = 'Skepticism';
- *
- * // If only need two selects
- * // - and using the deprecated functions
- * $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:');
- * $sel->setMainOptions($select1);
- * $sel->setSecOptions($select2);
- *
- * // - and using the new setOptions function
- * $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:');
- * $sel->setOptions(array($select1, $select2));
- *
- * // If you have a third select with prices for the cds
- * $select3[0][0][0] = '15.00$';
- * $select3[0][0][1] = '17.00$';
- * // etc
- *
- * // You can now use
- * $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:');
- * $sel->setOptions(array($select1, $select2, $select3));
- *
+ * Format is a bit more complex than for a simple select as we need to know
+ * which options are related to the ones in the previous select:
+ *
+ * Ex:
+ *
+ * // first select
+ * $select1[0] = 'Pop';
+ * $select1[1] = 'Classical';
+ * $select1[2] = 'Funeral doom';
+ *
+ * // second select
+ * $select2[0][0] = 'Red Hot Chil Peppers';
+ * $select2[0][1] = 'The Pixies';
+ * $select2[1][0] = 'Wagner';
+ * $select2[1][1] = 'Strauss';
+ * $select2[2][0] = 'Pantheist';
+ * $select2[2][1] = 'Skepticism';
+ *
+ * // If only need two selects
+ * // - and using the deprecated functions
+ * $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:');
+ * $sel->setMainOptions($select1);
+ * $sel->setSecOptions($select2);
*
- * @param array $options Array of options defining each element
+ * // - and using the new setOptions function
+ * $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:');
+ * $sel->setOptions(array($select1, $select2));
+ *
+ * // If you have a third select with prices for the cds
+ * $select3[0][0][0] = '15.00$';
+ * $select3[0][0][1] = '17.00$';
+ * // etc
+ *
+ * // You can now use
+ * $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:');
+ * $sel->setOptions(array($select1, $select2, $select3));
+ *
+ *
+ * @param array $options Array of options defining each element
* @access public
* @return void
*/
@@ -313,9 +313,9 @@ class HTML_QuickForm_hierselect extends HTML_QuickForm_group
$this->_js .= <<_js .= "_hs_defaults['" . $this->_escapeString($this->getName()) . "'] = " .
$this->_convertArrayToJavascript($values, false) . ";\n";
}
- include_once('HTML/QuickForm/Renderer/Default.php');
$renderer =& new HTML_QuickForm_Renderer_Default();
$renderer->setElementTemplate('{element}');
parent::accept($renderer);
@@ -593,4 +592,4 @@ JAVASCRIPT;
// }}}
} // end class HTML_QuickForm_hierselect
-?>
\ No newline at end of file
+?>
diff --git a/main/inc/lib/pear/HTML/QuickForm/html.php b/main/inc/lib/pear/HTML/QuickForm/html.php
index cc6a9f22a0..0a532d60ab 100644
--- a/main/inc/lib/pear/HTML/QuickForm/html.php
+++ b/main/inc/lib/pear/HTML/QuickForm/html.php
@@ -24,7 +24,7 @@
/**
* HTML class for static data
*/
-require_once 'HTML/QuickForm/static.php';
+///require_once 'HTML/QuickForm/static.php';
/**
* A pseudo-element used for adding raw HTML to form
@@ -65,19 +65,19 @@ class HTML_QuickForm_html extends HTML_QuickForm_static
* @param HTML_QuickForm_Renderer renderer object (only works with Default renderer!)
* @access public
* @return void
- */
+ */
function accept(&$renderer, $required = false, $error = null)
{
$renderer->renderHtml($this);
} // end func accept
-
-
+
+
function toHtml()
{
return HTML_QuickForm_static::toHtml();
} //end func toHtml
-
+
// }}}
} //end class HTML_QuickForm_html
diff --git a/main/inc/lib/pear/HTML/QuickForm/image.php b/main/inc/lib/pear/HTML/QuickForm/image.php
index f84f420eef..27176fb6fb 100755
--- a/main/inc/lib/pear/HTML/QuickForm/image.php
+++ b/main/inc/lib/pear/HTML/QuickForm/image.php
@@ -1,41 +1,41 @@
element
+ * HTML class for an element
*
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.01 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_01.txt If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category HTML
- * @package HTML_QuickForm
- * @author Adam Daniel
- * @author Bertrand Mansion
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: image.php,v 1.6 2009/04/04 21:34:03 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Base class for form elements
- */
-require_once 'HTML/QuickForm/input.php';
-
-/**
- * HTML class for an element
- *
- * @category HTML
- * @package HTML_QuickForm
- * @author Adam Daniel
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 1.0
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: image.php,v 1.6 2009/04/04 21:34:03 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Base class for form elements
+ */
+//require_once 'HTML/QuickForm/input.php';
+
+/**
+ * HTML class for an element
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 1.0
*/
class HTML_QuickForm_image extends HTML_QuickForm_input
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/input.php b/main/inc/lib/pear/HTML/QuickForm/input.php
index 04c4775165..86c199f39b 100755
--- a/main/inc/lib/pear/HTML/QuickForm/input.php
+++ b/main/inc/lib/pear/HTML/QuickForm/input.php
@@ -25,7 +25,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/element.php';
+//require_once 'HTML/QuickForm/element.php';
/**
* Base class for form elements
diff --git a/main/inc/lib/pear/HTML/QuickForm/label.php b/main/inc/lib/pear/HTML/QuickForm/label.php
index fbe63561da..2113f64208 100644
--- a/main/inc/lib/pear/HTML/QuickForm/label.php
+++ b/main/inc/lib/pear/HTML/QuickForm/label.php
@@ -3,7 +3,7 @@
* HTML class for static data
* @example $form->addElement('label', 'My label', 'Content');
*/
-require_once 'HTML/QuickForm/static.php';
+//require_once 'HTML/QuickForm/static.php';
/**
* A pseudo-element used for adding raw HTML to form
diff --git a/main/inc/lib/pear/HTML/QuickForm/link.php b/main/inc/lib/pear/HTML/QuickForm/link.php
index a2b5742b5a..d3e3461d8e 100755
--- a/main/inc/lib/pear/HTML/QuickForm/link.php
+++ b/main/inc/lib/pear/HTML/QuickForm/link.php
@@ -1,41 +1,41 @@
- * @author Bertrand Mansion
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: link.php,v 1.4 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * HTML class for static data
- */
-require_once 'HTML/QuickForm/static.php';
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* HTML class for a link type field
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Adam Daniel
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 2.0
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: link.php,v 1.4 2009/04/04 21:34:04 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * HTML class for static data
+ */
+//require_once 'HTML/QuickForm/static.php';
+
+/**
+ * HTML class for a link type field
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 2.0
*/
class HTML_QuickForm_link extends HTML_QuickForm_static
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/password.php b/main/inc/lib/pear/HTML/QuickForm/password.php
index dd800b5f11..a752a3ebe1 100755
--- a/main/inc/lib/pear/HTML/QuickForm/password.php
+++ b/main/inc/lib/pear/HTML/QuickForm/password.php
@@ -1,41 +1,41 @@
- * @author Bertrand Mansion
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: password.php,v 1.8 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Base class for form elements
- */
-require_once 'HTML/QuickForm/input.php';
+/**
+ * HTML class for a password type field
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: password.php,v 1.8 2009/04/04 21:34:04 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Base class for form elements
+ */
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a password type field
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Adam Daniel
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 1.0
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 1.0
*/
class HTML_QuickForm_password extends HTML_QuickForm_input
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/radio.php b/main/inc/lib/pear/HTML/QuickForm/radio.php
index 0746955ea4..1eea273894 100644
--- a/main/inc/lib/pear/HTML/QuickForm/radio.php
+++ b/main/inc/lib/pear/HTML/QuickForm/radio.php
@@ -25,7 +25,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/input.php';
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a radio type element
diff --git a/main/inc/lib/pear/HTML/QuickForm/reset.php b/main/inc/lib/pear/HTML/QuickForm/reset.php
index b9518831a3..39f8f740dc 100755
--- a/main/inc/lib/pear/HTML/QuickForm/reset.php
+++ b/main/inc/lib/pear/HTML/QuickForm/reset.php
@@ -1,41 +1,41 @@
- * @author Bertrand Mansion
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: reset.php,v 1.6 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Base class for form elements
- */
-require_once 'HTML/QuickForm/input.php';
+/**
+ * HTML class for a reset type element
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: reset.php,v 1.6 2009/04/04 21:34:04 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Base class for form elements
+ */
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a reset type element
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Adam Daniel
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 1.0
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 1.0
*/
class HTML_QuickForm_reset extends HTML_QuickForm_input
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/select.php b/main/inc/lib/pear/HTML/QuickForm/select.php
index 888772bd70..cad163ced3 100644
--- a/main/inc/lib/pear/HTML/QuickForm/select.php
+++ b/main/inc/lib/pear/HTML/QuickForm/select.php
@@ -26,7 +26,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/element.php';
+//require_once 'HTML/QuickForm/element.php';
/**
* Class to dynamically create an HTML SELECT
@@ -428,7 +428,7 @@ class HTML_QuickForm_select extends HTML_QuickForm_element {
function loadQuery(&$conn, $sql, $textCol=null, $valueCol=null, $values=null)
{
if (is_string($conn)) {
- require_once('DB.php');
+ //require_once('DB.php');
$dbConn = &DB::connect($conn, true);
if (DB::isError($dbConn)) {
return $dbConn;
diff --git a/main/inc/lib/pear/HTML/QuickForm/static.php b/main/inc/lib/pear/HTML/QuickForm/static.php
index 787cadf090..8fb935a11c 100755
--- a/main/inc/lib/pear/HTML/QuickForm/static.php
+++ b/main/inc/lib/pear/HTML/QuickForm/static.php
@@ -24,7 +24,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/element.php';
+//require_once 'HTML/QuickForm/element.php';
/**
* HTML class for static data
@@ -168,4 +168,4 @@ class HTML_QuickForm_static extends HTML_QuickForm_element
{
return null;
}
-}
\ No newline at end of file
+}
diff --git a/main/inc/lib/pear/HTML/QuickForm/submit.php b/main/inc/lib/pear/HTML/QuickForm/submit.php
index 3ff6f5ff90..6e1deea13b 100755
--- a/main/inc/lib/pear/HTML/QuickForm/submit.php
+++ b/main/inc/lib/pear/HTML/QuickForm/submit.php
@@ -1,41 +1,41 @@
- * @author Bertrand Mansion
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: submit.php,v 1.6 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Base class for form elements
- */
-require_once 'HTML/QuickForm/input.php';
+/**
+ * HTML class for a submit type element
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: submit.php,v 1.6 2009/04/04 21:34:04 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Base class for form elements
+ */
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a submit type element
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Adam Daniel
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 1.0
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 1.0
*/
class HTML_QuickForm_submit extends HTML_QuickForm_input
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/text.php b/main/inc/lib/pear/HTML/QuickForm/text.php
index 434f87f9e5..f938bc61cf 100755
--- a/main/inc/lib/pear/HTML/QuickForm/text.php
+++ b/main/inc/lib/pear/HTML/QuickForm/text.php
@@ -25,7 +25,7 @@
/**
* Base class for form elements
*/
-require_once 'HTML/QuickForm/input.php';
+//require_once 'HTML/QuickForm/input.php';
/**
* HTML class for a text field
diff --git a/main/inc/lib/pear/HTML/QuickForm/textarea.php b/main/inc/lib/pear/HTML/QuickForm/textarea.php
index 3d737f1610..9b9f73fcf5 100755
--- a/main/inc/lib/pear/HTML/QuickForm/textarea.php
+++ b/main/inc/lib/pear/HTML/QuickForm/textarea.php
@@ -1,41 +1,41 @@
- * @author Bertrand Mansion
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: textarea.php,v 1.13 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Base class for form elements
- */
-require_once 'HTML/QuickForm/element.php';
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* HTML class for a textarea type field
*
- * @category HTML
- * @package HTML_QuickForm
- * @author Adam Daniel
- * @author Bertrand Mansion
- * @version Release: 3.2.11
- * @since 1.0
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This source file is subject to version 3.01 of the PHP license
+ * that is available through the world-wide-web at the following URI:
+ * http://www.php.net/license/3_01.txt If you did not receive a copy of
+ * the PHP License and are unable to obtain it through the web, please
+ * send a note to license@php.net so we can mail you a copy immediately.
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @copyright 2001-2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @version CVS: $Id: textarea.php,v 1.13 2009/04/04 21:34:04 avb Exp $
+ * @link http://pear.php.net/package/HTML_QuickForm
+ */
+
+/**
+ * Base class for form elements
+ */
+//require_once 'HTML/QuickForm/element.php';
+
+/**
+ * HTML class for a textarea type field
+ *
+ * @category HTML
+ * @package HTML_QuickForm
+ * @author Adam Daniel
+ * @author Bertrand Mansion
+ * @version Release: 3.2.11
+ * @since 1.0
*/
class HTML_QuickForm_textarea extends HTML_QuickForm_element
{
diff --git a/main/inc/lib/pear/HTML/QuickForm/xbutton.php b/main/inc/lib/pear/HTML/QuickForm/xbutton.php
index 9f30af556b..85b4de9096 100755
--- a/main/inc/lib/pear/HTML/QuickForm/xbutton.php
+++ b/main/inc/lib/pear/HTML/QuickForm/xbutton.php
@@ -1,39 +1,39 @@
element
- *
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.01 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_01.txt If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category HTML
- * @package HTML_QuickForm
- * @author Alexey Borzov
- * @copyright 2001-2009 The PHP Group
- * @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: xbutton.php,v 1.3 2009/04/04 21:34:04 avb Exp $
- * @link http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * Base class for form elements
- */
-require_once 'HTML/QuickForm/element.php';
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Class for HTML 4.0