Skip to content

Commit

Permalink
fixes postLink form last action
Browse files Browse the repository at this point in the history
  • Loading branch information
bancer committed Sep 5, 2016
1 parent 0feb93f commit 5253f0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -1888,7 +1888,7 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
}

$previousLastAction = $this->_lastAction;
$this->_lastAction($url);
$this->_lastAction($formUrl);

$out = $this->Html->useTag('form', $formUrl, $formOptions);
$out .= $this->Html->useTag('hidden', '_method', array(
Expand Down

5 comments on commit 5253f0b

@oscar-ol
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I have activated the Security component, this change blackholes postLinks.

@bancer
Copy link
Contributor Author

@bancer bancer commented on 5253f0b Sep 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your $url and $formUrl values?

@oscar-ol
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in a clean installation with Security C., cake bake, delete postLink blackholed.
debug($url);
array(
'action' => 'delete',
(int) 0 => '2'
)
debug($formUrl);
'/test/tests/delete/2'

@markstory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oscar-ol Please open a new issue. Commit comments get lost very easily and are not suitable for reporting issues.

@bancer
Copy link
Contributor Author

@bancer bancer commented on 5253f0b Sep 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'/test/tests/delete/2'

Is it delete method in a plugin or is it the project installed in test subfolder?

Please sign in to comment.