import v2.0.0.0_RC3 | 2012-07-01

https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
2019-07-17 22:31:04 +02:00
parent 38c146901c
commit 2f397f01f7
2677 changed files with 296182 additions and 45159 deletions

View File

@ -28,7 +28,7 @@ require_once 'Zend/Validate/Interface.php';
* @package Zend_Form
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Form.php 17616 2009-08-15 03:28:29Z yoshida@zend.co.jp $
* @version $Id: Form.php 18951 2009-11-12 16:26:19Z alexander $
*/
class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
{
@ -133,6 +133,12 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
*/
protected $_errorsExist = false;
/**
* Has the form been manually flagged as an error?
* @var bool
*/
protected $_errorsForced = false;
/**
* Form order
* @var int|null
@ -1213,8 +1219,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
/**
* Set default values for elements
*
* If an element's name is not specified as a key in the array, its value
* is set to null.
* Sets values for all elements specified in the array of $defaults.
*
* @param array $defaults
* @return Zend_Form
@ -2014,6 +2019,12 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
}
$this->_errorsExist = !$valid;
// If manually flagged as an error, return invalid status
if ($this->_errorsForced) {
return false;
}
return $valid;
}
@ -2149,7 +2160,8 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
*/
public function markAsError()
{
$this->_errorsExist = true;
$this->_errorsExist = true;
$this->_errorsForced = true;
return $this;
}