Asset.php
authorjohn <john@roojs.com>
Wed, 15 Aug 2018 06:23:49 +0000 (14:23 +0800)
committerjohn <john@roojs.com>
Wed, 15 Aug 2018 06:23:49 +0000 (14:23 +0800)
Asset.php

index 0aa186d..7b0a3ea 100644 (file)
--- a/Asset.php
+++ b/Asset.php
@@ -125,10 +125,19 @@ class Pman_Core_Asset extends Pman {
      
     static function getCompileDir($type)
     {
+        $ui = posix_getpwuid(posix_geteuid());
+        
+        $ff = HTML_FlexyFramework::get();
+        
         switch($type) {
             case 'js':
             case 'css':
-                $suffix = 'csscompile';
+                $compile_dir = session_save_path() . '/' . implode("-", array(
+                    $ui['name'],
+                    $ff->project,
+                    $ff->version,
+                    "{$type}compile"
+                ));
                 break;
             case 'template':
                 break;
@@ -138,16 +147,9 @@ class Pman_Core_Asset extends Pman {
         
         exit;
         
-        $ui = posix_getpwuid(posix_geteuid());
         
-        $ff = HTML_FlexyFramework::get();
         
-        $compile_dir = session_save_path() . '/' . implode("-", array(
-            $ui['name'],
-            $ff->project,
-            $ff->version,
-            "{$type}compile"
-        ));
+        
         
         if (file_exists($compile_dir)) {
             return $compile_dir;