From fec633f2270242d4939a8ae13ef62171b374d2a2 Mon Sep 17 00:00:00 2001 From: phpnut Date: Thu, 14 Sep 2006 18:42:51 +0000 Subject: [PATCH] Corrected bad merge on model.php git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3479 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/model.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 7ad67f31a..e88a7adbe 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -1017,15 +1017,13 @@ class Model extends Overloadable { */ function __saveMulti($joined, $id) { $db =& ConnectionManager::getDataSource($this->useDbConfig); - foreach($joined as $x => $y) { foreach($y as $assoc => $value) { - - $joinTable[] = $this->hasAndBelongsToMany[$assoc]['joinTable']; - $mainKey[] = $this->hasAndBelongsToMany[$assoc]['foreignKey']; - $keys[] = $this->hasAndBelongsToMany[$assoc]['foreignKey']; - $keys[] = $this->hasAndBelongsToMany[$assoc]['associationForeignKey']; - $fields[] = join(',', $keys); + $joinTable[$assoc] = $this->hasAndBelongsToMany[$assoc]['joinTable']; + $mainKey[$assoc] = $this->hasAndBelongsToMany[$assoc]['foreignKey']; + $keys[] = $this->hasAndBelongsToMany[$assoc]['foreignKey']; + $keys[] = $this->hasAndBelongsToMany[$assoc]['associationForeignKey']; + $fields[$assoc] = join(',', $keys); unset($keys); foreach($value as $update) {