|
|
|
@ -1,76 +1,78 @@ |
|
|
|
|
<?php |
|
|
|
|
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Create, validate and process HTML forms |
|
|
|
|
* |
|
|
|
|
* 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 <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @copyright 2001-2009 The PHP Group |
|
|
|
|
* @license http://www.php.net/license/3_01.txt PHP License 3.01 |
|
|
|
|
* @version CVS: $Id: QuickForm.php,v 1.166 2009/04/04 21:34:02 avb Exp $ |
|
|
|
|
* @link http://pear.php.net/package/HTML_QuickForm |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* PEAR and PEAR_Error classes, for error handling |
|
|
|
|
*/ |
|
|
|
|
require_once 'PEAR.php'; |
|
|
|
|
/** |
|
|
|
|
* Base class for all HTML classes |
|
|
|
|
*/ |
|
|
|
|
require_once 'HTML/Common.php'; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Element types known to HTML_QuickForm |
|
|
|
|
* @see HTML_QuickForm::registerElementType(), HTML_QuickForm::getRegisteredTypes(), |
|
|
|
|
* HTML_QuickForm::isTypeRegistered() |
|
|
|
|
* @global array $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] |
|
|
|
|
*/ |
|
|
|
|
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Create, validate and process HTML forms |
|
|
|
|
* |
|
|
|
|
* 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 <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @copyright 2001-2009 The PHP Group |
|
|
|
|
* @license http://www.php.net/license/3_01.txt PHP License 3.01 |
|
|
|
|
* @version CVS: $Id: QuickForm.php,v 1.166 2009/04/04 21:34:02 avb Exp $ |
|
|
|
|
* @link http://pear.php.net/package/HTML_QuickForm |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* PEAR and PEAR_Error classes, for error handling |
|
|
|
|
*/ |
|
|
|
|
require_once 'PEAR.php'; |
|
|
|
|
/** |
|
|
|
|
* Base class for all HTML classes |
|
|
|
|
*/ |
|
|
|
|
require_once 'HTML/Common.php'; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Element types known to HTML_QuickForm |
|
|
|
|
* @see HTML_QuickForm::registerElementType(), HTML_QuickForm::getRegisteredTypes(), |
|
|
|
|
* HTML_QuickForm::isTypeRegistered() |
|
|
|
|
* @global array $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] |
|
|
|
|
*/ |
|
|
|
|
$GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] = |
|
|
|
|
array( |
|
|
|
|
'group' =>array('HTML/QuickForm/group.php','HTML_QuickForm_group'), |
|
|
|
|
'hidden' =>array('HTML/QuickForm/hidden.php','HTML_QuickForm_hidden'), |
|
|
|
|
'reset' =>array('HTML/QuickForm/reset.php','HTML_QuickForm_reset'), |
|
|
|
|
'checkbox' =>array('HTML/QuickForm/checkbox.php','HTML_QuickForm_checkbox'), |
|
|
|
|
'file' =>array('HTML/QuickForm/file.php','HTML_QuickForm_file'), |
|
|
|
|
'image' =>array('HTML/QuickForm/image.php','HTML_QuickForm_image'), |
|
|
|
|
'password' =>array('HTML/QuickForm/password.php','HTML_QuickForm_password'), |
|
|
|
|
'radio' =>array('HTML/QuickForm/radio.php','HTML_QuickForm_radio'), |
|
|
|
|
'button' =>array('HTML/QuickForm/button.php','HTML_QuickForm_button'), |
|
|
|
|
'submit' =>array('HTML/QuickForm/submit.php','HTML_QuickForm_submit'), |
|
|
|
|
'select' =>array('HTML/QuickForm/select.php','HTML_QuickForm_select'), |
|
|
|
|
'hiddenselect' =>array('HTML/QuickForm/hiddenselect.php','HTML_QuickForm_hiddenselect'), |
|
|
|
|
'text' =>array('HTML/QuickForm/text.php','HTML_QuickForm_text'), |
|
|
|
|
'textarea' =>array('HTML/QuickForm/textarea.php','HTML_QuickForm_textarea'), |
|
|
|
|
'link' =>array('HTML/QuickForm/link.php','HTML_QuickForm_link'), |
|
|
|
|
'advcheckbox' =>array('HTML/QuickForm/advcheckbox.php','HTML_QuickForm_advcheckbox'), |
|
|
|
|
'date' =>array('HTML/QuickForm/date.php','HTML_QuickForm_date'), |
|
|
|
|
'static' =>array('HTML/QuickForm/static.php','HTML_QuickForm_static'), |
|
|
|
|
'header' =>array('HTML/QuickForm/header.php', 'HTML_QuickForm_header'), |
|
|
|
|
'html' =>array('HTML/QuickForm/html.php', 'HTML_QuickForm_html'), |
|
|
|
|
'hierselect' =>array('HTML/QuickForm/hierselect.php', 'HTML_QuickForm_hierselect'), |
|
|
|
|
'autocomplete' =>array('HTML/QuickForm/autocomplete.php', 'HTML_QuickForm_autocomplete'), |
|
|
|
|
'xbutton' =>array('HTML/QuickForm/xbutton.php','HTML_QuickForm_xbutton') |
|
|
|
|
'group' =>array('HTML/QuickForm/group.php','HTML_QuickForm_group'), |
|
|
|
|
'hidden' =>array('HTML/QuickForm/hidden.php','HTML_QuickForm_hidden'), |
|
|
|
|
'reset' =>array('HTML/QuickForm/reset.php','HTML_QuickForm_reset'), |
|
|
|
|
'checkbox' =>array('HTML/QuickForm/checkbox.php','HTML_QuickForm_checkbox'), |
|
|
|
|
'file' =>array('HTML/QuickForm/file.php','HTML_QuickForm_file'), |
|
|
|
|
'image' =>array('HTML/QuickForm/image.php','HTML_QuickForm_image'), |
|
|
|
|
'password' =>array('HTML/QuickForm/password.php','HTML_QuickForm_password'), |
|
|
|
|
'radio' =>array('HTML/QuickForm/radio.php','HTML_QuickForm_radio'), |
|
|
|
|
'button' =>array('HTML/QuickForm/button.php','HTML_QuickForm_button'), |
|
|
|
|
'submit' =>array('HTML/QuickForm/submit.php','HTML_QuickForm_submit'), |
|
|
|
|
'select' =>array('HTML/QuickForm/select.php','HTML_QuickForm_select'), |
|
|
|
|
'hiddenselect' =>array('HTML/QuickForm/hiddenselect.php','HTML_QuickForm_hiddenselect'), |
|
|
|
|
'text' =>array('HTML/QuickForm/text.php','HTML_QuickForm_text'), |
|
|
|
|
'textarea' =>array('HTML/QuickForm/textarea.php','HTML_QuickForm_textarea'), |
|
|
|
|
'link' =>array('HTML/QuickForm/link.php','HTML_QuickForm_link'), |
|
|
|
|
'advcheckbox' =>array('HTML/QuickForm/advcheckbox.php','HTML_QuickForm_advcheckbox'), |
|
|
|
|
'date' =>array('HTML/QuickForm/date.php','HTML_QuickForm_date'), |
|
|
|
|
'static' =>array('HTML/QuickForm/static.php','HTML_QuickForm_static'), |
|
|
|
|
'header' =>array('HTML/QuickForm/header.php', 'HTML_QuickForm_header'), |
|
|
|
|
'html' =>array('HTML/QuickForm/html.php', 'HTML_QuickForm_html'), |
|
|
|
|
'hierselect' =>array('HTML/QuickForm/hierselect.php', 'HTML_QuickForm_hierselect'), |
|
|
|
|
'autocomplete' =>array('HTML/QuickForm/autocomplete.php', 'HTML_QuickForm_autocomplete'), |
|
|
|
|
'xbutton' =>array('HTML/QuickForm/xbutton.php','HTML_QuickForm_xbutton'), |
|
|
|
|
'advanced_settings' =>array('HTML/QuickForm/advanced_settings.php','HTML_QuickForm_advanced_settings') |
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Validation rules known to HTML_QuickForm |
|
|
|
|
* @see HTML_QuickForm::registerRule(), HTML_QuickForm::getRegisteredRules(), |
|
|
|
|
* HTML_QuickForm::isRuleRegistered() |
|
|
|
|
* @global array $GLOBALS['_HTML_QuickForm_registered_rules'] |
|
|
|
|
*/ |
|
|
|
|
/** |
|
|
|
|
* Validation rules known to HTML_QuickForm |
|
|
|
|
* @see HTML_QuickForm::registerRule(), HTML_QuickForm::getRegisteredRules(), |
|
|
|
|
* HTML_QuickForm::isRuleRegistered() |
|
|
|
|
* @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'), |
|
|
|
@ -94,13 +96,13 @@ $GLOBALS['_HTML_QuickForm_registered_rules'] = array( |
|
|
|
|
|
|
|
|
|
// {{{ error codes |
|
|
|
|
|
|
|
|
|
/**#@+ |
|
|
|
|
* Error codes for HTML_QuickForm |
|
|
|
|
* |
|
|
|
|
* Codes are mapped to textual messages by errorMessage() method, if you add a |
|
|
|
|
* new code be sure to add a new message for it to errorMessage() |
|
|
|
|
* |
|
|
|
|
* @see HTML_QuickForm::errorMessage() |
|
|
|
|
/**#@+ |
|
|
|
|
* Error codes for HTML_QuickForm |
|
|
|
|
* |
|
|
|
|
* Codes are mapped to textual messages by errorMessage() method, if you add a |
|
|
|
|
* new code be sure to add a new message for it to errorMessage() |
|
|
|
|
* |
|
|
|
|
* @see HTML_QuickForm::errorMessage() |
|
|
|
|
*/ |
|
|
|
|
define('QUICKFORM_OK', 1); |
|
|
|
|
define('QUICKFORM_ERROR', -1); |
|
|
|
@ -112,22 +114,22 @@ define('QUICKFORM_INVALID_ELEMENT_NAME', -6); |
|
|
|
|
define('QUICKFORM_INVALID_PROCESS', -7); |
|
|
|
|
define('QUICKFORM_DEPRECATED', -8); |
|
|
|
|
define('QUICKFORM_INVALID_DATASOURCE', -9); |
|
|
|
|
/**#@-*/ |
|
|
|
|
/**#@-*/ |
|
|
|
|
|
|
|
|
|
// }}} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Create, validate and process HTML forms |
|
|
|
|
* |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @version Release: 3.2.11 |
|
|
|
|
*/ |
|
|
|
|
class HTML_QuickForm extends HTML_Common |
|
|
|
|
{ |
|
|
|
|
* Create, validate and process HTML forms |
|
|
|
|
* |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @version Release: 3.2.11 |
|
|
|
|
*/ |
|
|
|
|
class HTML_QuickForm extends HTML_Common |
|
|
|
|
{ |
|
|
|
|
// {{{ properties |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -422,7 +424,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @since 3.3 |
|
|
|
|
* @access public |
|
|
|
|
* @return void |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function setDatasource(&$datasource, $defaultsFilter = null, $constantsFilter = null) |
|
|
|
|
{ |
|
|
|
@ -450,7 +452,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @since 1.0 |
|
|
|
|
* @access public |
|
|
|
|
* @return void |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function setDefaults($defaultValues = null, $filter = null) |
|
|
|
|
{ |
|
|
|
@ -490,7 +492,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @since 2.0 |
|
|
|
|
* @access public |
|
|
|
|
* @return void |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function setConstants($constantValues = null, $filter = null) |
|
|
|
|
{ |
|
|
|
@ -568,7 +570,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @param string $elementType type of element to add (text, textarea, file...) |
|
|
|
|
* @since 1.0 |
|
|
|
|
* @access public |
|
|
|
|
* @return HTML_QuickForm_Element |
|
|
|
|
* @return HTML_QuickForm_Element |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function &createElement($elementType) { |
|
|
|
@ -588,7 +590,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @param array $args arguments for event |
|
|
|
|
* @since 2.0 |
|
|
|
|
* @access private |
|
|
|
|
* @return HTML_QuickForm_Element |
|
|
|
|
* @return HTML_QuickForm_Element |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function &_loadElement($event, $type, $args) |
|
|
|
@ -631,7 +633,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* |
|
|
|
|
* @param mixed $element element object or type of element to add (text, textarea, file...) |
|
|
|
|
* @since 1.0 |
|
|
|
|
* @return HTML_QuickForm_Element a reference to newly added element |
|
|
|
|
* @return HTML_QuickForm_Element a reference to newly added element |
|
|
|
|
* @access public |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
@ -685,10 +687,10 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* |
|
|
|
|
* @access public |
|
|
|
|
* @since 3.2.4 |
|
|
|
|
* @param HTML_QuickForm_element Element to insert |
|
|
|
|
* @param string Name of the element before which the new |
|
|
|
|
* one is inserted |
|
|
|
|
* @return HTML_QuickForm_element reference to inserted element |
|
|
|
|
* @param HTML_QuickForm_element Element to insert |
|
|
|
|
* @param string Name of the element before which the new |
|
|
|
|
* one is inserted |
|
|
|
|
* @return HTML_QuickForm_element reference to inserted element |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function &insertElementBefore(&$element, $nameAfter) |
|
|
|
@ -753,10 +755,10 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @param string $separator (optional)string to separate elements |
|
|
|
|
* @param string $appendName (optional)specify whether the group name should be |
|
|
|
|
* used in the form element name ex: group[element] |
|
|
|
|
* @return HTML_QuickForm_group reference to a newly added group |
|
|
|
|
* @return HTML_QuickForm_group reference to a newly added group |
|
|
|
|
* @since 2.8 |
|
|
|
|
* @access public |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function &addGroup($elements, $name=null, $groupLabel='', $separator=null, $appendName = true) |
|
|
|
|
{ |
|
|
|
@ -779,7 +781,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @param string $element Element name |
|
|
|
|
* @since 2.0 |
|
|
|
|
* @access public |
|
|
|
|
* @return HTML_QuickForm_element reference to element |
|
|
|
|
* @return HTML_QuickForm_element reference to element |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function &getElement($element) |
|
|
|
@ -1025,7 +1027,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @param boolean $removeRules True if rules for this element are to be removed too |
|
|
|
|
* @access public |
|
|
|
|
* @since 2.0 |
|
|
|
|
* @return HTML_QuickForm_element a reference to the removed element |
|
|
|
|
* @return HTML_QuickForm_element a reference to the removed element |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function &removeElement($elementName, $removeRules = true) |
|
|
|
@ -1042,13 +1044,13 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
$this->_elementIndex[$elementName] = array_shift($this->_duplicateIndex[$elementName]); |
|
|
|
|
} |
|
|
|
|
if ($removeRules) { |
|
|
|
|
$this->_required = array_diff($this->_required, array($elementName)); |
|
|
|
|
$this->_required = array_diff($this->_required, array($elementName)); |
|
|
|
|
unset($this->_rules[$elementName], $this->_errors[$elementName]); |
|
|
|
|
if ('group' == $el->getType()) { |
|
|
|
|
foreach (array_keys($el->getElements()) as $key) { |
|
|
|
|
unset($this->_rules[$el->getElementName($key)]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ('group' == $el->getType()) { |
|
|
|
|
foreach (array_keys($el->getElements()) as $key) { |
|
|
|
|
unset($this->_rules[$el->getElementName($key)]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $el; |
|
|
|
|
} // end func removeElement |
|
|
|
@ -1248,7 +1250,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @param mixed $filter Callback, either function name or array(&$object, 'method') |
|
|
|
|
* @since 2.0 |
|
|
|
|
* @access public |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function applyFilter($element, $filter) |
|
|
|
|
{ |
|
|
|
@ -1313,7 +1315,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* The main difference is that existing keys will not be renumbered |
|
|
|
|
* if they are integers. |
|
|
|
|
* |
|
|
|
|
* @access public |
|
|
|
|
* @access public |
|
|
|
|
* @param array $a original array |
|
|
|
|
* @param array $b array which will be merged into first one |
|
|
|
|
* @return array merged array |
|
|
|
@ -1515,7 +1517,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @access public |
|
|
|
|
* @since 1.0 |
|
|
|
|
* @return boolean true if no error found |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function validate() |
|
|
|
|
{ |
|
|
|
@ -1544,11 +1546,11 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
// Fix for bug #3501: we shouldn't validate not uploaded files, either. |
|
|
|
|
// Unfortunately, we can't just use $element->isUploadedFile() since |
|
|
|
|
// the element in question can be buried in group. Thus this hack. |
|
|
|
|
// See also bug #12014, we should only consider a file that has |
|
|
|
|
// status UPLOAD_ERR_NO_FILE as not uploaded, in all other cases |
|
|
|
|
// validation should be performed, so that e.g. 'maxfilesize' rule |
|
|
|
|
// will display an error if status is UPLOAD_ERR_INI_SIZE |
|
|
|
|
// or UPLOAD_ERR_FORM_SIZE |
|
|
|
|
// See also bug #12014, we should only consider a file that has |
|
|
|
|
// status UPLOAD_ERR_NO_FILE as not uploaded, in all other cases |
|
|
|
|
// validation should be performed, so that e.g. 'maxfilesize' rule |
|
|
|
|
// will display an error if status is UPLOAD_ERR_INI_SIZE |
|
|
|
|
// or UPLOAD_ERR_FORM_SIZE |
|
|
|
|
} elseif (is_array($submitValue)) { |
|
|
|
|
if (false === ($pos = strpos($target, '['))) { |
|
|
|
|
$isUpload = !empty($this->_submitFiles[$target]); |
|
|
|
@ -1563,7 +1565,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
) . "']"; |
|
|
|
|
eval("\$isUpload = isset(\$this->_submitFiles['{$base}']['name']{$idx});"); |
|
|
|
|
} |
|
|
|
|
if ($isUpload && (!isset($submitValue['error']) || UPLOAD_ERR_NO_FILE == $submitValue['error'])) { |
|
|
|
|
if ($isUpload && (!isset($submitValue['error']) || UPLOAD_ERR_NO_FILE == $submitValue['error'])) { |
|
|
|
|
continue 2; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1667,7 +1669,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @since 1.0 |
|
|
|
|
* @access public |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @return mixed Whatever value the $callback function returns |
|
|
|
|
* @return mixed Whatever value the $callback function returns |
|
|
|
|
*/ |
|
|
|
|
function process($callback, $mergeFiles = true) |
|
|
|
|
{ |
|
|
|
@ -1897,7 +1899,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @param string Name of an element |
|
|
|
|
* @access public |
|
|
|
|
* @return mixed |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
* @throws HTML_QuickForm_Error |
|
|
|
|
*/ |
|
|
|
|
function exportValue($element) |
|
|
|
|
{ |
|
|
|
@ -1987,7 +1989,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @access public |
|
|
|
|
* @param mixed result code |
|
|
|
|
* @return bool whether $value is an error |
|
|
|
|
* @static |
|
|
|
|
* @static |
|
|
|
|
*/ |
|
|
|
|
function isError($value) |
|
|
|
|
{ |
|
|
|
@ -2003,7 +2005,7 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
* @access public |
|
|
|
|
* @param int error code |
|
|
|
|
* @return string error message |
|
|
|
|
* @static |
|
|
|
|
* @static |
|
|
|
|
*/ |
|
|
|
|
function errorMessage($value) |
|
|
|
|
{ |
|
|
|
@ -2038,15 +2040,15 @@ class HTML_QuickForm extends HTML_Common |
|
|
|
|
// }}} |
|
|
|
|
} // end class HTML_QuickForm |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Class for errors thrown by HTML_QuickForm package |
|
|
|
|
* |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @version Release: 3.2.11 |
|
|
|
|
*/ |
|
|
|
|
/** |
|
|
|
|
* Class for errors thrown by HTML_QuickForm package |
|
|
|
|
* |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @version Release: 3.2.11 |
|
|
|
|
*/ |
|
|
|
|
class HTML_QuickForm_Error extends PEAR_Error { |
|
|
|
|
|
|
|
|
|
// {{{ properties |
|
|
|
|