From 38596258f1ab14bd22864016d159f8c4d08199f1 Mon Sep 17 00:00:00 2001 From: dho Date: Sun, 26 Nov 2006 15:24:58 +0000 Subject: [PATCH] Fixing undefined variable errors git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3981 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/scaffold.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/controller/scaffold.php b/cake/libs/controller/scaffold.php index 651fa4e66..f6b7e0466 100644 --- a/cake/libs/controller/scaffold.php +++ b/cake/libs/controller/scaffold.php @@ -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) {