mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
ce66c9863e
commit
1db295f366
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue