From: Alan Knowles Date: Fri, 30 Aug 2013 06:27:48 +0000 (+0800) Subject: JsCompile.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=4f3fed81415a2c61f87a0ecfd03276959ad0d6c4 JsCompile.php --- diff --git a/JsCompile.php b/JsCompile.php index 074b1289..7070efb0 100644 --- a/JsCompile.php +++ b/JsCompile.php @@ -103,7 +103,7 @@ class Pman_Core_JsCompile extends Pman $ofiles[] = $f; continue; } - print_r(glob($basedir .'/' .$f.'/*.js')); + foreach(glob($basedir .'/' .$f.'/*.js') as $fx) { $arfiles[$fx] = filemtime($fx); @@ -111,8 +111,15 @@ class Pman_Core_JsCompile extends Pman } } $ofiles = usort($ofiles,function($a,$b) { - + $a = substr($a, -3); + $b= substr($b, -3); + if ($a == $b) { + return 0; + } + return ($a > $b) ? +1 : -1; }); + print_R($ofiles); + $output = md5(serialize($arfiles)) .'.js'; if ( $compile && !file_exists($basedir.'/_cache_/'.$output)) {