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
This commit is contained in:
phpnut 2006-09-14 18:42:51 +00:00
parent 678ec860a1
commit fec633f227

View file

@ -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) {