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:
nate 2008-01-02 19:32:46 +00:00
parent 181aa97ca1
commit 93f034b9bd
2 changed files with 8 additions and 1 deletions

View file

@ -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);