mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Making ViewTask always refresh model schema so baked views reflect current schema.
This commit is contained in:
parent
ec88bd9c8c
commit
31fff5e390
1 changed files with 2 additions and 2 deletions
|
@ -283,7 +283,7 @@ class ViewTask extends Shell {
|
||||||
$displayField = $modelObj->displayField;
|
$displayField = $modelObj->displayField;
|
||||||
$singularVar = Inflector::variable($modelClass);
|
$singularVar = Inflector::variable($modelClass);
|
||||||
$singularHumanName = $this->_singularHumanName($modelClass);
|
$singularHumanName = $this->_singularHumanName($modelClass);
|
||||||
$schema = $modelObj->schema();
|
$schema = $modelObj->schema(true);
|
||||||
$fields = array_keys($schema);
|
$fields = array_keys($schema);
|
||||||
$associations = $this->__associations($modelObj);
|
$associations = $this->__associations($modelObj);
|
||||||
} else {
|
} else {
|
||||||
|
@ -469,7 +469,7 @@ class ViewTask extends Shell {
|
||||||
$associations[$type][$assocKey]['displayField'] = $model->{$assocKey}->displayField;
|
$associations[$type][$assocKey]['displayField'] = $model->{$assocKey}->displayField;
|
||||||
$associations[$type][$assocKey]['foreignKey'] = $assocData['foreignKey'];
|
$associations[$type][$assocKey]['foreignKey'] = $assocData['foreignKey'];
|
||||||
$associations[$type][$assocKey]['controller'] = Inflector::pluralize(Inflector::underscore($assocData['className']));
|
$associations[$type][$assocKey]['controller'] = Inflector::pluralize(Inflector::underscore($assocData['className']));
|
||||||
$associations[$type][$assocKey]['fields'] = array_keys($model->{$assocKey}->schema());
|
$associations[$type][$assocKey]['fields'] = array_keys($model->{$assocKey}->schema(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $associations;
|
return $associations;
|
||||||
|
|
Loading…
Add table
Reference in a new issue