From 02f5dfb43faf6b7930c1254e25f4d00e8fa902d8 Mon Sep 17 00:00:00 2001 From: phpnut Date: Sat, 17 Sep 2005 22:20:28 +0000 Subject: [PATCH] merging fixes to the trunk, re syncing sandboxes git-svn-id: https://svn.cakephp.org/repo/trunk/cake@875 3807eeeb-6ff5-0310-8944-8be069107fe0 --- libs/helpers/html.php | 6 +++--- libs/model.php | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libs/helpers/html.php b/libs/helpers/html.php index 207771068..352271675 100644 --- a/libs/helpers/html.php +++ b/libs/helpers/html.php @@ -265,7 +265,7 @@ class HtmlHelper extends Helper } return $this->output(sprintf($this->tags['password'], $this->model, $this->field, - $this->_parseAttributes($htmlAttributes, null, '', ' ')), $return); + $this->_parseAttributes($htmlAttributes, null, ' ', ' ')), $return); } @@ -321,7 +321,7 @@ class HtmlHelper extends Helper $this->tagValue($fieldName)? $htmlAttributes['checked'] = 'checked': null; $title = $title? $title: ucfirst($fieldName); return $this->output(sprintf($this->tags['checkbox'], $this->model, $this->field, - $this->field, $this->field, + $this->field, $this->_parseAttributes($htmlAttributes, null, '', ' '), $title), $return); } @@ -454,7 +454,7 @@ class HtmlHelper extends Helper } return $this->output(sprintf($this->tags['input'], $this->model, $this->field, - $this->_parseAttributes($htmlAttributes, null, '', ' ')), $return); + $this->_parseAttributes($htmlAttributes, null, ' ', ' ')), $return); } /** diff --git a/libs/model.php b/libs/model.php index 12dcb6d19..2e1e75395 100644 --- a/libs/model.php +++ b/libs/model.php @@ -758,7 +758,7 @@ class Model extends Object { if (!in_array(strtolower($table_name), $this->db->tables())) { - $this->_throwMissingModel($table_name); + $this->_throwMissingTable($table_name); die(); } else @@ -1331,6 +1331,10 @@ class Model extends Object { $newValue[$i] = $original[$i]; } + if(count($this->_oneToMany < 2)) + { + $newValue = $newValue2; + } } elseif(!empty($original)) { @@ -1399,6 +1403,10 @@ class Model extends Object { $newValue2[$i] = $original[$i]; } + if(count($this->_manyToMany < 2)) + { + $newValue = $newValue2; + } } elseif(!empty($original)) {