Refactoring switch in Scaffold.

This commit is contained in:
mark_story 2009-10-31 16:16:25 -04:00
parent 3a59bf5ed6
commit cab64b780c

View file

@ -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;