Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix coding standards.

  • Loading branch information...
commit 771cfde19631b7cb147b9c9af06b064f0b15d635 1 parent eb33929
Mark Story markstory authored
2  lib/Cake/Test/Case/View/Helper/FormHelperTest.php
View
@@ -6125,7 +6125,7 @@ public function testPostLink() {
'/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',
2  lib/Cake/Test/Case/View/Helper/RssHelperTest.php
View
@@ -647,7 +647,7 @@ public function testItemEnclosureLength() {
} else {
$type = mime_content_type($tmpFile);
}
-
+
$expected = array(
'<item',
'<title',
13 lib/Cake/View/Helper/FormHelper.php
View
@@ -1599,7 +1599,7 @@ public function postButton($title, $url, $options = array()) {
* @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 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
$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();
Please sign in to comment.
Something went wrong with that request. Please try again.