cvs: pear /HTML_QuickForm QuickForm.php
| From: | Alexey Borzov | Date: | Thu, 14 Jul 2005 21:16:38 +0000 |
| Subject: | cvs: pear /HTML_QuickForm QuickForm.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33048@lists.php.net to get a copy of this message | ||
avb Thu Jul 14 17:16:38 2005 EDT
Modified files:
/pear/HTML_QuickForm QuickForm.php
Log:
::sigh::
CS fix: managed to add tabs instead of spaces
http://cvs.php.net/diff.php/pear/HTML_QuickForm/QuickForm.php?r1=1.157&r2=1.158&ty=u
Index: pear/HTML_QuickForm/QuickForm.php
diff -u pear/HTML_QuickForm/QuickForm.php:1.157 pear/HTML_QuickForm/QuickForm.php:1.158
--- pear/HTML_QuickForm/QuickForm.php:1.157 Thu Jul 14 17:07:37 2005
+++ pear/HTML_QuickForm/QuickForm.php Thu Jul 14 17:16:38 2005
@@ -17,7 +17,7 @@
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
-// $Id: QuickForm.php,v 1.157 2005/07/14 21:07:37 avb Exp $
+// $Id: QuickForm.php,v 1.158 2005/07/14 21:16:38 avb Exp $
require_once('PEAR.php');
require_once('HTML/Common.php');
@@ -510,8 +510,8 @@
*/
function &createElement($elementType)
{
- $args = func_get_args();
- $element =& HTML_QuickForm::_loadElement('createElement', $elementType,
array_slice($args, 1));
+ $args = func_get_args();
+ $element =& HTML_QuickForm::_loadElement('createElement', $elementType,
array_slice($args, 1));
return $element;
} // end func createElement
@@ -533,7 +533,7 @@
{
$type = strtolower($type);
if (!HTML_QuickForm::isTypeRegistered($type)) {
- $error = PEAR::raiseError(null, QUICKFORM_UNREGISTERED_ELEMENT, null, E_USER_WARNING,
"Element '$type' does not exist in HTML_QuickForm::_loadElement()",
'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_UNREGISTERED_ELEMENT, null, E_USER_WARNING,
"Element '$type' does not exist in HTML_QuickForm::_loadElement()",
'HTML_QuickForm_Error', true);
return $error;
}
$className = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][1];
@@ -590,7 +590,7 @@
$elKeys = array_keys($this->_elements);
$this->_duplicateIndex[$elementName][] = end($elKeys);
} else {
- $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING,
"Element '$elementName' already exists in HTML_QuickForm::addElement()",
'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null,
E_USER_WARNING, "Element '$elementName' already exists in
HTML_QuickForm::addElement()", 'HTML_QuickForm_Error', true);
return $error;
}
} else {
@@ -626,10 +626,10 @@
function &insertElementBefore(&$element, $nameAfter)
{
if (!empty($this->_duplicateIndex[$nameAfter])) {
- $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING,
'Several elements named "' . $nameAfter . '" exist in
HTML_QuickForm::insertElementBefore().', 'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING,
'Several elements named "' . $nameAfter . '" exist in
HTML_QuickForm::insertElementBefore().', 'HTML_QuickForm_Error', true);
return $error;
} elseif (!$this->elementExists($nameAfter)) {
- $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element
'$nameAfter' does not exist in HTML_QuickForm::insertElementBefore()",
'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING,
"Element '$nameAfter' does not exist in HTML_QuickForm::insertElementBefore()",
'HTML_QuickForm_Error', true);
return $error;
}
$elementName = $element->getName();
@@ -638,7 +638,7 @@
// Like in addElement(), check that it's not an incompatible duplicate
if (!empty($elementName) && isset($this->_elementIndex[$elementName])) {
if ($this->_elements[$this->_elementIndex[$elementName]]->getType() !=
$element->getType()) {
- $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING,
"Element '$elementName' already exists in
HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null,
E_USER_WARNING, "Element '$elementName' already exists in
HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
return $error;
}
$duplicate = true;
@@ -698,7 +698,7 @@
$name = 'qf_group_' . $anonGroups++;
$appendName = false;
}
- $group =& $this->addElement('group', $name, $groupLabel, $elements, $separator,
$appendName);
+ $group =& $this->addElement('group', $name, $groupLabel, $elements,
$separator, $appendName);
return $group;
} // end func addGroup
@@ -719,7 +719,7 @@
if (isset($this->_elementIndex[$element])) {
return $this->_elements[$this->_elementIndex[$element]];
} else {
- $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element
'$element' does not exist in HTML_QuickForm::getElement()",
'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING,
"Element '$element' does not exist in HTML_QuickForm::getElement()",
'HTML_QuickForm_Error', true);
return $error;
}
} // end func getElement
@@ -742,7 +742,7 @@
function &getElementValue($element)
{
if (!isset($this->_elementIndex[$element])) {
- $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element
'$element' does not exist in HTML_QuickForm::getElementValue()",
'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING,
"Element '$element' does not exist in HTML_QuickForm::getElementValue()",
'HTML_QuickForm_Error', true);
return $error;
}
$value = $this->_elements[$this->_elementIndex[$element]]->getValue();
@@ -953,7 +953,7 @@
function &removeElement($elementName, $removeRules = true)
{
if (!isset($this->_elementIndex[$elementName])) {
- $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element
'$elementName' does not exist in HTML_QuickForm::removeElement()",
'HTML_QuickForm_Error', true);
+ $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING,
"Element '$elementName' does not exist in HTML_QuickForm::removeElement()",
'HTML_QuickForm_Error', true);
return $error;
}
$el =& $this->_elements[$this->_elementIndex[$elementName]];