mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-01 23:29:45 +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'])) {
|
if (empty($options['url']) || is_array($options['url'])) {
|
||||||
$options = (array)$options;
|
$options = (array)$options;
|
||||||
if(!empty($this->plugin)) {
|
if (!empty($model) && $model != $defaultModel) {
|
||||||
$controller = $this->plugin;
|
|
||||||
} elseif (!empty($model) && $model != $defaultModel) {
|
|
||||||
$controller = Inflector::underscore(Inflector::pluralize($model));
|
$controller = Inflector::underscore(Inflector::pluralize($model));
|
||||||
} else {
|
} else {
|
||||||
$controller = Inflector::underscore($this->params['controller']);
|
$controller = Inflector::underscore($this->params['controller']);
|
||||||
|
@ -154,6 +152,7 @@ class FormHelper extends AppHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
$actionDefaults = array(
|
$actionDefaults = array(
|
||||||
|
'plugin' => $this->plugin,
|
||||||
'controller' => $controller,
|
'controller' => $controller,
|
||||||
'action' => $options['action'],
|
'action' => $options['action'],
|
||||||
'id' => $id
|
'id' => $id
|
||||||
|
|
Loading…
Add table
Reference in a new issue