mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 20:46:24 +00:00
minor optimization to save one call to Helper::model() when creating forms.
This commit is contained in:
parent
99e5f4a49f
commit
8ef2a82a89
1 changed files with 3 additions and 2 deletions
|
@ -216,8 +216,9 @@ class FormHelper extends AppHelper {
|
||||||
$object =& $this->_introspectModel($model);
|
$object =& $this->_introspectModel($model);
|
||||||
$this->setEntity($model . '.', true);
|
$this->setEntity($model . '.', true);
|
||||||
|
|
||||||
if (isset($this->fieldset[$this->model()]['key'])) {
|
$modelEntity = $this->model()
|
||||||
$data = $this->fieldset[$this->model()];
|
if (isset($this->fieldset[$modelEntity]['key'])) {
|
||||||
|
$data = $this->fieldset[$modelEntity];
|
||||||
$recordExists = (
|
$recordExists = (
|
||||||
isset($this->data[$model]) &&
|
isset($this->data[$model]) &&
|
||||||
!empty($this->data[$model][$data['key']])
|
!empty($this->data[$model][$data['key']])
|
||||||
|
|
Loading…
Add table
Reference in a new issue