Skip to content
Permalink
Browse files

Fixing failing tests in JsHelper caused by changed API in HtmlHelper.

  • Loading branch information...
markstory committed Sep 16, 2009
1 parent dc013da commit 05f908d36d22289402bf8caf9f917790f3e70ded
Showing with 8 additions and 2 deletions.
  1. +8 −2 cake/libs/view/helpers/js.php
@@ -175,7 +175,9 @@ function writeBuffer($options = array()) {
$script = $this->{$this->__engineName}->domReady($script);
}
if (!$options['cache'] && $options['inline']) {
return $this->Html->scriptBlock($script, $options);
$opts = $options;
unset($opts['onDomReady'], $opts['cache'], $opts['clear']);
return $this->Html->scriptBlock($script, $opts);
}
if ($options['cache'] && $options['inline']) {
$filename = md5($script);
@@ -247,7 +249,11 @@ function link($title, $url = null, $options = array()) {
$event = $this->event('click', $requestString, $options);
}
if (isset($options['buffer']) && $options['buffer'] == false) {
$out .= $this->Html->scriptBlock($event, $options);
$opts = array();
if (isset($options['safe'])) {
$opts['safe'] = $options['safe'];
}
$out .= $this->Html->scriptBlock($event, $opts);
}
return $out;
}

0 comments on commit 05f908d

Please sign in to comment.
You can’t perform that action at this time.