Adding patch from #2610, fixes Scaffold plugin produces incorrect form "action"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5142 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-05-21 04:27:42 +00:00
parent ce66c9863e
commit 1db295f366

View file

@ -142,9 +142,7 @@ class FormHelper extends AppHelper {
if (empty($options['url']) || is_array($options['url'])) {
$options = (array)$options;
if(!empty($this->plugin)) {
$controller = $this->plugin;
} elseif (!empty($model) && $model != $defaultModel) {
if (!empty($model) && $model != $defaultModel) {
$controller = Inflector::underscore(Inflector::pluralize($model));
} else {
$controller = Inflector::underscore($this->params['controller']);
@ -154,6 +152,7 @@ class FormHelper extends AppHelper {
}
$actionDefaults = array(
'plugin' => $this->plugin,
'controller' => $controller,
'action' => $options['action'],
'id' => $id
@ -1179,4 +1178,4 @@ class FormHelper extends AppHelper {
return $this->__options[$name];
}
}
?>
?>