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));
}
foreach ($data as $n => $v) {
if (is_array($v)) {
foreach ($data as $modelName => $fieldSet) {
if (is_array($fieldSet)) {
foreach ($v as $x => $y) {
if (isset($this->validationErrors[$x])) {
unset ($this->validationErrors[$x]);
foreach ($fieldSet as $fieldName => $fieldValue) {
if (isset($this->validationErrors[$fieldName])) {
unset ($this->validationErrors[$fieldName]);
}
if ($n === $this->alias) {
if ($x === $this->primaryKey) {
$this->id = $y;
if ($modelName === $this->alias) {
if ($fieldName === $this->primaryKey) {
$this->id = $fieldValue;
}
}
if (is_array($y) || is_object($y)) {
$y = $this->deconstruct($x, $y);
if (is_array($fieldValue) || is_object($fieldValue)) {
$fieldValue = $this->deconstruct($fieldName, $fieldValue);
}
$this->data[$n][$x] = $y;
$this->data[$modelName][$fieldName] = $fieldValue;
}
}
}