mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 03:52:41 +00:00
Fixing JavascriptHelper::link() for script files outside of webroot/js (i.e. plugins), fixes #3799
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6313 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
181aa97ca1
commit
93f034b9bd
2 changed files with 8 additions and 1 deletions
|
@ -162,7 +162,10 @@ class JavascriptHelper extends AppHelper {
|
|||
}
|
||||
|
||||
if (strpos($url, '://') === false) {
|
||||
$url = $this->webroot(JS_URL . $url);
|
||||
if ($url{0} !== '/') {
|
||||
$url = JS_URL . $url;
|
||||
}
|
||||
$url = $this->webroot($url);
|
||||
|
||||
if (Configure::read('Asset.filter.js')) {
|
||||
$url = str_replace(JS_URL, 'cjs/', $url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue