From a37e007d9fcf208cc6e2a3b796a07760ee5f8821 Mon Sep 17 00:00:00 2001 From: Rachman Chavik Date: Wed, 19 Nov 2014 10:56:15 +0700 Subject: [PATCH] BC fix for css() and script() with identical resource names --- lib/Cake/View/Helper/HtmlHelper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php index 4786fc306..6dfed4068 100644 --- a/lib/Cake/View/Helper/HtmlHelper.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -449,11 +449,11 @@ class HtmlHelper extends AppHelper { return; } - if ($options['once'] && isset($this->_includedAssets[$path])) { + if ($options['once'] && isset($this->_includedAssets[__METHOD__][$path])) { return ''; } unset($options['once']); - $this->_includedAssets[$path] = true; + $this->_includedAssets[__METHOD__][$path] = true; if (strpos($path, '//') !== false) { $url = $path; @@ -552,10 +552,10 @@ class HtmlHelper extends AppHelper { } return null; } - if ($options['once'] && isset($this->_includedAssets[$url])) { + if ($options['once'] && isset($this->_includedAssets[__METHOD__][$url])) { return null; } - $this->_includedAssets[$url] = true; + $this->_includedAssets[__METHOD__][$url] = true; if (strpos($url, '//') === false) { $url = $this->assetUrl($url, $options + array('pathPrefix' => Configure::read('App.jsBaseUrl'), 'ext' => '.js'));