mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
BC fix for css() and script() with identical resource names
This commit is contained in:
parent
7bea96f534
commit
a37e007d9f
1 changed files with 4 additions and 4 deletions
|
@ -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'));
|
||||
|
|
Loading…
Reference in a new issue