Asset.php
[Pman.Core] / Asset.php
index bc0475f..85abf79 100644 (file)
--- a/Asset.php
+++ b/Asset.php
@@ -100,8 +100,7 @@ class Pman_Core_Asset extends Pman {
             $content = gzencode( file_get_contents($fn) , 9);
             
             header('Content-Encoding: gzip');
-                header('Vary: Accept-Encoding');
-
+            header('Vary: Accept-Encoding');
             header('Content-Length: '. strlen($content));
             
             echo $content;
@@ -124,5 +123,19 @@ class Pman_Core_Asset extends Pman {
         die('invalid');
     }
      
-    
+    static function getCompileDir($type)
+    {
+        if(empty($type)) {
+            return false;
+        }
+        
+        $ui = posix_getpwuid(posix_geteuid());
+        
+        $compiledir = session_save_path() . '/' .
+                $ui['name'] . '-' . $ff->project . '-' . $ff->version . '-jscompile';
+        
+        if (!file_exists($compiledir)) {
+            mkdir($compiledir,0700,true);
+        }
+    }
 }