Skip to content

Commit

Permalink
Remove $confirmMessage param.
Browse files Browse the repository at this point in the history
Confirmation message can be set using 'confirm' key in options.
  • Loading branch information
ADmad committed Jul 5, 2014
1 parent f97ddb1 commit 8d197e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/View/Helper/HtmlHelper.php
Expand Up @@ -299,11 +299,10 @@ public function charset($charset = null) {
* @param string $title The content to be wrapped by <a> tags.
* @param string|array $url Cake-relative URL or array of URL parameters, or external URL (starts with http://)
* @param array $options Array of options and HTML attributes.
* @param string $confirmMessage JavaScript confirmation message.
* @return string An `<a />` element.
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#HtmlHelper::link
*/
public function link($title, $url = null, array $options = array(), $confirmMessage = false) {
public function link($title, $url = null, array $options = array()) {
$escapeTitle = true;
if ($url !== null) {
$url = $this->url($url);
Expand All @@ -327,7 +326,8 @@ public function link($title, $url = null, array $options = array(), $confirmMess
$title = htmlentities($title, ENT_QUOTES, $escapeTitle);
}

if (!empty($options['confirm'])) {
$confirmMessage = null;
if (isset($options['confirm'])) {
$confirmMessage = $options['confirm'];
unset($options['confirm']);
}
Expand Down

0 comments on commit 8d197e4

Please sign in to comment.