diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-09-28 15:36:21 +0200 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-09-28 15:36:21 +0200 |
commit | 0c1b02bead38d5a58032a1c88cf3ca53bbc4a4d9 (patch) | |
tree | b9cb574a1964f28dda648795010a5be056b80618 /lib/exe/js.php | |
parent | 618191d008b98cb421694c541145c863d7b300ce (diff) | |
parent | da9572711f54d13ce3c5506971154b0bc359723f (diff) | |
download | rpg-0c1b02bead38d5a58032a1c88cf3ca53bbc4a4d9.tar.gz rpg-0c1b02bead38d5a58032a1c88cf3ca53bbc4a4d9.tar.bz2 |
Merge remote-tracking branch 'origin/master' into FS#2697searchpagereadonly
Conflicts:
inc/lang/hr/searchpage.txt
inc/lang/ko/searchpage.txt
Diffstat (limited to 'lib/exe/js.php')
-rw-r--r-- | lib/exe/js.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php index 04413b409..bec12ef7a 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -137,6 +137,9 @@ function js_out(){ $js = ob_get_contents(); ob_end_clean(); + // strip any source maps + stripsourcemaps($js); + // compress whitespace and comments if($conf['compress']){ $js = js_compress($js); @@ -163,7 +166,10 @@ function js_load($file){ // is it a include_once? if($match[1]){ $base = utf8_basename($ifile); - if($loaded[$base]) continue; + if($loaded[$base]){ + $data = str_replace($match[0], '' ,$data); + continue; + } $loaded[$base] = true; } @@ -220,6 +226,12 @@ function js_pluginstrings() { return $pluginstrings; } +/** + * Return an two-dimensional array with strings from the language file of current active template. + * + * - $lang['js'] must be an array. + * - Nothing is returned for template without an entry for $lang['js'] + */ function js_templatestrings() { global $conf; $templatestrings = array(); |