diff options
author | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-07-16 08:02:34 +0200 |
---|---|---|
committer | Gerry Weißbach <gerry.w@gammaproduction.de> | 2014-07-16 08:02:34 +0200 |
commit | 0bd5b90b4c1294b3c9abc1977060f971dc2e2744 (patch) | |
tree | ac79a7402ffef718685f16dbba6692a0c9b5f458 /lib/exe/js.php | |
parent | 1858e4d7685782550789fd8c228e55ae319bc37a (diff) | |
parent | 80679bafa1a5ed611bafc603afd0ae7b2b5954a7 (diff) | |
download | rpg-0bd5b90b4c1294b3c9abc1977060f971dc2e2744.tar.gz rpg-0bd5b90b4c1294b3c9abc1977060f971dc2e2744.tar.bz2 |
Merge remote-tracking branch 'splitbrain/master'
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(); |