From cab64b780c5a3480e884a2ea63469f7e6bcb1cfc Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 31 Oct 2009 16:16:25 -0400 Subject: [PATCH] Refactoring switch in Scaffold. --- cake/libs/controller/scaffold.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cake/libs/controller/scaffold.php b/cake/libs/controller/scaffold.php index 04102c4d9..54db20119 100644 --- a/cake/libs/controller/scaffold.php +++ b/cake/libs/controller/scaffold.php @@ -469,23 +469,17 @@ class Scaffold extends Object { } switch ($params['action']) { case 'index': + case 'list': $this->__scaffoldIndex($params); break; case 'view': $this->__scaffoldView($params); break; - case 'list': - $this->__scaffoldIndex($params); - break; case 'add': - $this->__scaffoldSave($params, 'add'); - break; - case 'edit': - $this->__scaffoldSave($params, 'edit'); - break; case 'create': $this->__scaffoldSave($params, 'add'); break; + case 'edit': case 'update': $this->__scaffoldSave($params, 'edit'); break;