Skip to content
Browse files

Fixing failing tests in JavascriptHelper.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7944 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent a12fd86 commit e2c087f34b350615b3ce7726e143ac896e39aef3 @nateabele nateabele committed Dec 19, 2008
Showing with 6 additions and 3 deletions.
  1. +6 −3 cake/libs/view/helpers/javascript.php
View
9 cake/libs/view/helpers/javascript.php
@@ -433,16 +433,19 @@ function writeEvents($inline = true, $options = array()) {
$out = '';
$rules = array();
+ if (!$this->_cacheEvents) {
+ return;
+ }
$data = $this->getCache();
- if (!$this->_cacheEvents || empty($data)) {
+
+ if (empty($data)) {
return;
}
if ($this->_cacheToFile) {
$filename = md5($data);
if (!file_exists(JS . $filename . '.js')) {
- $filePath = str_replace(WWW_ROOT, '', JS) . $filename . '.js';
- cache($filePath, $data, '+999 days', 'public');
+ cache(str_replace(WWW_ROOT, '', JS) . $filename . '.js', $data, '+999 days', 'public');
}
$out = $this->link($filename);
} else {

0 comments on commit e2c087f

Please sign in to comment.
Something went wrong with that request. Please try again.