summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/php/web/ClientScriptManager.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/php/web/ClientScriptManager.php b/app/php/web/ClientScriptManager.php
index 1a73b3e..0dbdffa 100644
--- a/app/php/web/ClientScriptManager.php
+++ b/app/php/web/ClientScriptManager.php
@@ -137,6 +137,12 @@ class ClientScriptManager extends TClientScriptManager {
);
}
+ private function _getCompressedScript($path) {
+ return trim(TJavaScript::JSMin(
+ file_get_contents($path)
+ ));
+ }
+
private function _compileScriptFiles($files) {
foreach ($files as $file) {
$this->markScriptFileAsRendered($file);
@@ -151,13 +157,7 @@ class ClientScriptManager extends TClientScriptManager {
$scriptContent = implode(
PHP_EOL,
array_map(
- function($path) {
- return trim(
- TJavaScript::JSMin(
- file_get_contents($path)
- )
- );
- },
+ [$this, '_getCompressedScript'],
$paths
)
);