require_once 'Pman.php';
class Pman_Core_Asset extends Pman {
-
-
+
var $types = array(
'css' => 'text/css',
'js' => 'text/javascript',
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;
}
function outputCssDir($path)
{
+
$relpath = $this->rootURL . '/' . $path .'/';
$ff = HTML_FlexyFramework::get();
$dir = $this->rootDir.'/' . $path;
//$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...
$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;
}
+ if ($missing_files) {
+ $this->assetArrayToHtml($files, 'css');
+ return;
+
+ }
+
//print_r($relfiles);
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;
}