diff options
| author | Vjacheslav Trushkin <cyberalien@gmail.com> | 2012-05-01 18:25:11 +0300 |
|---|---|---|
| committer | Vjacheslav Trushkin <cyberalien@gmail.com> | 2012-05-01 18:25:11 +0300 |
| commit | 63b41913a472a688b5b85bdbbd01e45366449781 (patch) | |
| tree | 6bae19d35335c90d52cb3dc98e977d852b511a87 /phpBB/includes/template/template.php | |
| parent | 2a92fee06d22eb54ee9373adca1c3b50b1d3e3d7 (diff) | |
| download | forums-63b41913a472a688b5b85bdbbd01e45366449781.tar forums-63b41913a472a688b5b85bdbbd01e45366449781.tar.gz forums-63b41913a472a688b5b85bdbbd01e45366449781.tar.bz2 forums-63b41913a472a688b5b85bdbbd01e45366449781.tar.xz forums-63b41913a472a688b5b85bdbbd01e45366449781.zip | |
[ticket/10799] Removing global variable from includejs
Removing global $phpbb_root_path from includejs implementation
PHPBB3-10799
Diffstat (limited to 'phpBB/includes/template/template.php')
| -rw-r--r-- | phpBB/includes/template/template.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php index e6512c8417..8ab3c44be3 100644 --- a/phpBB/includes/template/template.php +++ b/phpBB/includes/template/template.php @@ -496,14 +496,19 @@ class phpbb_template * * @param string $file file name * @param bool $locate True if file needs to be located + * @param bool $relative True if path is relative to phpBB root directory. Ignored if $locate == true */ - public function _js_include($file, $locate = false) + public function _js_include($file, $locate = false, $relative = false) { // Locate file if ($locate) { $file = $this->locator->get_first_file_location(array($file), true, true); } + else if ($relative) + { + $file = $this->phpbb_root_path . $file; + } $file .= (strpos($file, '?') === false) ? '?' : '&'; $file .= 'assets_version=' . $this->config['assets_version']; |
