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:
mark_story 2008-10-06 02:44:05 +00:00
parent a5feed0284
commit b5473a5f9b

View file

@ -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;
} }
} }
} }