mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
678ec860a1
commit
fec633f227
1 changed files with 5 additions and 7 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue