Adding FormHelper::input() fix for generating select menus (Ticket #1860)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4293 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-14 05:46:03 +00:00
parent 2ef3e325ca
commit 33990b2193
2 changed files with 3 additions and 3 deletions

View file

@ -260,7 +260,7 @@ class FormHelper extends AppHelper {
$this->setFormTag($tagName); $this->setFormTag($tagName);
if (!isset($options['type']) || ($options['type'] == 'select' && !isset($options['options']))) { if ((!isset($options['type']) || $options['type'] == 'select') && !isset($options['options'])) {
if (ClassRegistry::isKeySet($this->model())) { if (ClassRegistry::isKeySet($this->model())) {
$model =& ClassRegistry::getObject($this->model()); $model =& ClassRegistry::getObject($this->model());
@ -354,7 +354,7 @@ class FormHelper extends AppHelper {
if(isset($options['rows']) || isset($options['cols'])) { if(isset($options['rows']) || isset($options['cols'])) {
$options['type'] = 'textarea'; $options['type'] = 'textarea';
} }
$empty = false; $empty = false;
if(isset($options['empty'])) { if(isset($options['empty'])) {
$empty = $options['empty']; $empty = $options['empty'];

View file

@ -168,7 +168,7 @@ class XmlHelper extends AppHelper {
} }
$out = "<{$ns}{$name}" . $this->__composeAttributes($attrib); $out = "<{$ns}{$name}" . $this->__composeAttributes($attrib);
if ((empty($content) || $content == null) && $endTag) { if (empty($content) && $endTag) {
$out .= ' />'; $out .= ' />';
} else { } else {
$out .= '>' . $this->__composeContent($content); $out .= '>' . $this->__composeContent($content);