Adding fix for #2657, fixes form with Textarea does not save when Security Component is enabled

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5222 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-05-30 00:08:25 +00:00
parent 151bdd04ef
commit 31dd607fbe

View file

@ -616,8 +616,6 @@ class FormHelper extends AppHelper {
* @return string An HTML text input element
*/
function checkbox($fieldName, $options = array()) {
$this->__secure();
$value = 1;
if(isset($options['value'])) {
$value = $options['value'];
@ -625,6 +623,7 @@ class FormHelper extends AppHelper {
}
$options = $this->__initInputField($fieldName, am(array('type' => 'checkbox'), $options));
$this->__secure();
$model = $this->model();
if (ClassRegistry::isKeySet($model)) {
@ -656,8 +655,8 @@ class FormHelper extends AppHelper {
* @return string An HTML text input element
*/
function text($fieldName, $options = array()) {
$this->__secure();
$options = $this->__initInputField($fieldName, am(array('type' => 'text'), $options));
$this->__secure();
return $this->output(sprintf($this->Html->tags['input'], $this->model(), $this->field(), $this->_parseAttributes($options, null, null, ' ')));
}
/**
@ -668,8 +667,8 @@ class FormHelper extends AppHelper {
* @return string
*/
function password($fieldName, $options = array()) {
$this->__secure();
$options = $this->__initInputField($fieldName, $options);
$this->__secure();
return $this->output(sprintf($this->Html->tags['password'], $this->model(), $this->field(), $this->_parseAttributes($options, null, null, ' ')));
}
/**
@ -680,8 +679,8 @@ class FormHelper extends AppHelper {
* @return string An HTML text input element
*/
function textarea($fieldName, $options = array()) {
$this->__secure();
$options = $this->__initInputField($fieldName, $options);
$this->__secure();
unset($options['type']);
$value = null;
@ -722,8 +721,8 @@ class FormHelper extends AppHelper {
* @access public
*/
function file($fieldName, $options = array()) {
$this->__secure();
$options = $this->__initInputField($fieldName, $options);
$this->__secure();
return $this->output(sprintf($this->Html->tags['file'], $this->model(), $this->field(), $this->_parseAttributes($options, null, '', ' ')));
}
/**