mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Refactoring variable names, more readable variable names.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7705 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
a5feed0284
commit
b5473a5f9b
1 changed files with 11 additions and 11 deletions
|
@ -746,23 +746,23 @@ class Model extends Overloadable {
|
||||||
$data = array($this->alias => array($one => $two));
|
$data = array($this->alias => array($one => $two));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($data as $n => $v) {
|
foreach ($data as $modelName => $fieldSet) {
|
||||||
if (is_array($v)) {
|
if (is_array($fieldSet)) {
|
||||||
|
|
||||||
foreach ($v as $x => $y) {
|
foreach ($fieldSet as $fieldName => $fieldValue) {
|
||||||
if (isset($this->validationErrors[$x])) {
|
if (isset($this->validationErrors[$fieldName])) {
|
||||||
unset ($this->validationErrors[$x]);
|
unset ($this->validationErrors[$fieldName]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($n === $this->alias) {
|
if ($modelName === $this->alias) {
|
||||||
if ($x === $this->primaryKey) {
|
if ($fieldName === $this->primaryKey) {
|
||||||
$this->id = $y;
|
$this->id = $fieldValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_array($y) || is_object($y)) {
|
if (is_array($fieldValue) || is_object($fieldValue)) {
|
||||||
$y = $this->deconstruct($x, $y);
|
$fieldValue = $this->deconstruct($fieldName, $fieldValue);
|
||||||
}
|
}
|
||||||
$this->data[$n][$x] = $y;
|
$this->data[$modelName][$fieldName] = $fieldValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue