aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/template.php
diff options
context:
space:
mode:
authorVjacheslav Trushkin <cyberalien@gmail.com>2012-05-01 18:25:11 +0300
committerVjacheslav Trushkin <cyberalien@gmail.com>2012-05-01 18:25:11 +0300
commit63b41913a472a688b5b85bdbbd01e45366449781 (patch)
tree6bae19d35335c90d52cb3dc98e977d852b511a87 /phpBB/includes/template/template.php
parent2a92fee06d22eb54ee9373adca1c3b50b1d3e3d7 (diff)
downloadforums-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.php7
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'];