From b9983cbb9c8ef967b4b86fc69f595bfd02df8dae Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 17 Aug 2011 10:47:46 +0800 Subject: [PATCH] JsCompile.php --- JsCompile.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/JsCompile.php b/JsCompile.php index 6a58b860..3268e780 100644 --- a/JsCompile.php +++ b/JsCompile.php @@ -74,7 +74,7 @@ class Pman_Core_JsCompile extends Pman * @param {Array} list of files (ontop of basedir) * @param {String} output url (path to basedir basically), or false * to not compile - * + * * */ @@ -251,7 +251,9 @@ class Pman_Core_JsCompile extends Pman if (!file_exists(dirname($output))) { mkdir(dirname($output), 0755, true); } - sort($ofiles); + $lsort = create_function('$a,$b','return strlen($a) > strlen($b) ? 1 : -1;'); + usort($ofiles, $lsort); + $eoutput = escapeshellarg($output); $cmd = "$seed {$o['jspacker']}/pack.js -o $eoutput " . implode($ofiles, ' ') . ' 2>&1'; //echo "
$cmd\n";
-- 
2.39.2