mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing undefined variable errors
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3981 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
59049a0fa8
commit
38596258f1
1 changed files with 3 additions and 3 deletions
|
@ -255,7 +255,7 @@ class Scaffold extends Object {
|
|||
$this->controller->set('fieldNames', $this->controller->generateFieldNames());
|
||||
$this->controller->cleanUpFields();
|
||||
|
||||
if ($type == 'create') {
|
||||
if ($action == 'create') {
|
||||
$this->ScaffoldModel->create();
|
||||
$viewFileName = 'add';
|
||||
$formName = 'Add';
|
||||
|
@ -263,7 +263,7 @@ class Scaffold extends Object {
|
|||
}
|
||||
|
||||
if ($this->ScaffoldModel->save($this->controller->data)) {
|
||||
if ($this->controller->_afterScaffoldSave($type)) {
|
||||
if ($this->controller->_afterScaffoldSave($action)) {
|
||||
if (isset($this->controller->Session) && $this->controller->Session->valid != false) {
|
||||
$this->controller->Session->setFlash('The ' . Inflector::humanize($this->modelClass) . ' has been ' . $success . '.');
|
||||
$this->controller->redirect('/' . $this->viewPath);
|
||||
|
@ -271,7 +271,7 @@ class Scaffold extends Object {
|
|||
return $this->controller->flash('The ' . Inflector::humanize($this->modelClass) . ' has been ' . $success. '.','/' . $this->viewPath);
|
||||
}
|
||||
} else {
|
||||
return $this->controller->_afterScaffoldSaveError($type);
|
||||
return $this->controller->_afterScaffoldSaveError($action);
|
||||
}
|
||||
} else {
|
||||
if (isset($this->controller->Session) && $this->controller->Session->valid != false) {
|
||||
|
|
Loading…
Add table
Reference in a new issue