mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 10:32:40 +00:00
Refactoring dispatcher.
Added test for changes to Dispatcher. Updating Model::_ _saveMulti(), moved the insert statement to DboSource::insertMulti() this will allow database that do not support multiple inserts in one statement to save data. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5460 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
31c3447682
commit
549d86ac23
76 changed files with 812 additions and 409 deletions
|
@ -622,7 +622,7 @@ class Set extends Object {
|
|||
$path2 = $path1;
|
||||
$path1 = $data;
|
||||
$data = $this->get();
|
||||
} else if (is_a($this, 'set') && is_string($data) && empty($path2)) {
|
||||
} elseif (is_a($this, 'set') && is_string($data) && empty($path2)) {
|
||||
$path2 = $path1;
|
||||
$path1 = $data;
|
||||
$data = $this->get();
|
||||
|
@ -638,7 +638,7 @@ class Set extends Object {
|
|||
$vals = Set::extract($data, $path2);
|
||||
} else {
|
||||
$count = count($keys);
|
||||
for($i=0; $i < $count; $i++) {
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$vals[$i] = null;
|
||||
}
|
||||
}
|
||||
|
@ -709,7 +709,7 @@ class Set extends Object {
|
|||
}
|
||||
$return = $object;
|
||||
|
||||
if(!empty($merge)) {
|
||||
if (!empty($merge)) {
|
||||
$mergeKeys = array_keys($merge);
|
||||
$objectKeys = array_keys($object);
|
||||
$count = count($mergeKeys);
|
||||
|
@ -720,8 +720,8 @@ class Set extends Object {
|
|||
$loop = $count1;
|
||||
|
||||
for ($ii = 0; $ii < $loop; $ii++) {
|
||||
if(is_array($object[$objectKeys[$ii]])) {
|
||||
if(array_key_exists($objectKeys[$ii], $object[$objectKeys[$ii]])) {
|
||||
if (is_array($object[$objectKeys[$ii]])) {
|
||||
if (array_key_exists($objectKeys[$ii], $object[$objectKeys[$ii]])) {
|
||||
unset($change[$objectKeys[$ii]][$objectKeys[$ii]]);
|
||||
}
|
||||
} else {
|
||||
|
@ -730,8 +730,8 @@ class Set extends Object {
|
|||
}
|
||||
|
||||
foreach ($objectKeys as $key => $value) {
|
||||
if(is_array($object[$value])) {
|
||||
if(array_key_exists($mergeKeys[$i], $object[$value])) {
|
||||
if (is_array($object[$value])) {
|
||||
if (array_key_exists($mergeKeys[$i], $object[$value])) {
|
||||
unset($change[$value][$mergeKeys[$i]]);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue