mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix coding standards.
This commit is contained in:
parent
eb33929829
commit
771cfde196
3 changed files with 12 additions and 5 deletions
|
@ -6125,7 +6125,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
'/a'
|
||||
));
|
||||
|
||||
$result = $this->Form->postLink('Delete', '/posts/delete/1', array('method'=>'delete'));
|
||||
$result = $this->Form->postLink('Delete', '/posts/delete/1', array('method' => 'delete'));
|
||||
$this->assertTags($result, array(
|
||||
'form' => array(
|
||||
'method' => 'post', 'action' => '/posts/delete/1',
|
||||
|
|
|
@ -647,7 +647,7 @@ class RssHelperTest extends CakeTestCase {
|
|||
} else {
|
||||
$type = mime_content_type($tmpFile);
|
||||
}
|
||||
|
||||
|
||||
$expected = array(
|
||||
'<item',
|
||||
'<title',
|
||||
|
|
|
@ -1599,7 +1599,7 @@ class FormHelper extends AppHelper {
|
|||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::postLink
|
||||
*/
|
||||
public function postLink($title, $url = null, $options = array(), $confirmMessage = false) {
|
||||
$requestMethod = 'POST';
|
||||
$requestMethod = 'POST';
|
||||
if (!empty($options['method'])) {
|
||||
$requestMethod = strtoupper($options['method']);
|
||||
unset($options['method']);
|
||||
|
@ -1611,8 +1611,15 @@ class FormHelper extends AppHelper {
|
|||
|
||||
$formName = uniqid('post_');
|
||||
$formUrl = $this->url($url);
|
||||
$out = $this->Html->useTag('form', $formUrl, array('name' => $formName, 'id' => $formName, 'style' => 'display:none;', 'method' => 'post'));
|
||||
$out .= $this->Html->useTag('hidden', '_method', ' value="' . $requestMethod . '"');
|
||||
$out = $this->Html->useTag('form', $formUrl, array(
|
||||
'name' => $formName,
|
||||
'id' => $formName,
|
||||
'style' => 'display:none;',
|
||||
'method' => 'post'
|
||||
));
|
||||
$out .= $this->Html->useTag('hidden', '_method', array(
|
||||
'value' => $requestMethod
|
||||
));
|
||||
$out .= $this->_csrfField();
|
||||
|
||||
$fields = array();
|
||||
|
|
Loading…
Reference in a new issue