DataObjects/Core_notify_recur.php
[Pman.Core] / Asset.php
index 77377d6..dfd511a 100644 (file)
--- a/Asset.php
+++ b/Asset.php
@@ -22,8 +22,7 @@
 require_once 'Pman.php';
 
 class Pman_Core_Asset extends Pman {
-    
-    
+     
     var $types = array(
         'css' => 'text/css',
         'js' => 'text/javascript',
@@ -204,7 +203,7 @@ trait Pman_Core_Asset_Trait {
             clearstatcache();
             if (!file_exists($compiledir.'/'.$output) ||
                 !filesize($compiledir.'/'.$output)) {
-                echo "<!-- compile did not generate files : {$compiledir}/{$output} -->\n";
+                echo "<!-- compile did not generate files : ". basename($compiledir)  ."/{$output} -->\n";
                 $this->assetArrayToHtml($files,'js');
                 return;
             } 
@@ -244,6 +243,7 @@ trait Pman_Core_Asset_Trait {
     
     function outputCssDir($path)
     {
+          
         $relpath = $this->rootURL . '/' . $path .'/';
         $ff = HTML_FlexyFramework::get();
         $dir =   $this->rootDir.'/' . $path;
@@ -274,7 +274,7 @@ trait Pman_Core_Asset_Trait {
         //$path = $this->rootURL ."/Pman/$mod/";
         
         //print_R($ar);exit;
-        
+        $missing_files  = false;
         $files = array();
         $arfiles = array();
         $relfiles = array(); // array of files without the path part...
@@ -284,6 +284,14 @@ trait Pman_Core_Asset_Trait {
             $relfiles[] = substr($fn, strlen($dir)+1);
             $f = basename($fn);
             // got the 'module file..'
+            
+            if (!file_exists($dir . '/'. $f)) {
+                echo "<!-- missing {$relpath}{$f} -->\n";
+                $files[] = $relpath  . $f . '?ts=0';
+                $missing_files = true;
+                continue;
+            }
+            
             $mtime = filemtime($dir . '/'. $f);
             $maxtime = max($mtime, $maxtime);
             $arfiles[$fn] = $mtime;
@@ -292,6 +300,12 @@ trait Pman_Core_Asset_Trait {
             
             
         }
+        if ($missing_files) {
+            $this->assetArrayToHtml($files, 'css');
+            return;
+            
+        }
+        
          
         //print_r($relfiles);
         
@@ -337,7 +351,7 @@ trait Pman_Core_Asset_Trait {
             clearstatcache();
             if (!file_exists($compiledir.'/'.$output) ||
                 !filesize($compiledir.'/'.$routput)) {
-                echo "<!-- compile did not generate files : {$compiledir}/{$output} -->\n";
+                echo "<!-- compile did not generate files : " . basename($compiledir) . "/{$output} -->\n";
                 $this->assetArrayToHtml($files,'css');
                 return;
             }