mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($options['once'] && isset($this->_includedAssets[$path])) {
|
if ($options['once'] && isset($this->_includedAssets[__METHOD__][$path])) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
unset($options['once']);
|
unset($options['once']);
|
||||||
$this->_includedAssets[$path] = true;
|
$this->_includedAssets[__METHOD__][$path] = true;
|
||||||
|
|
||||||
if (strpos($path, '//') !== false) {
|
if (strpos($path, '//') !== false) {
|
||||||
$url = $path;
|
$url = $path;
|
||||||
|
@ -552,10 +552,10 @@ class HtmlHelper extends AppHelper {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ($options['once'] && isset($this->_includedAssets[$url])) {
|
if ($options['once'] && isset($this->_includedAssets[__METHOD__][$url])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$this->_includedAssets[$url] = true;
|
$this->_includedAssets[__METHOD__][$url] = true;
|
||||||
|
|
||||||
if (strpos($url, '//') === false) {
|
if (strpos($url, '//') === false) {
|
||||||
$url = $this->assetUrl($url, $options + array('pathPrefix' => Configure::read('App.jsBaseUrl'), 'ext' => '.js'));
|
$url = $this->assetUrl($url, $options + array('pathPrefix' => Configure::read('App.jsBaseUrl'), 'ext' => '.js'));
|
||||||
|
|
Loading…
Reference in a new issue