projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
471bfa7
)
Asset.php
author
Alan Knowles
<alan@roojs.com>
Thu, 24 Dec 2015 03:41:24 +0000
(11:41 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 24 Dec 2015 03:41:24 +0000
(11:41 +0800)
Asset.php
patch
|
blob
|
history
diff --git
a/Asset.php
b/Asset.php
index
3f25a66
..
6f2230b
100644
(file)
--- a/
Asset.php
+++ b/
Asset.php
@@
-275,7
+275,7
@@
trait Pman_Core_Asset_Trait {
//$path = $this->rootURL ."/Pman/$mod/";
//print_R($ar);exit;
//$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...
$files = array();
$arfiles = array();
$relfiles = array(); // array of files without the path part...
@@
-285,14
+285,27
@@
trait Pman_Core_Asset_Trait {
$relfiles[] = substr($fn, strlen($dir)+1);
$f = basename($fn);
// got the 'module file..'
$relfiles[] = substr($fn, strlen($dir)+1);
$f = basename($fn);
// got the 'module file..'
+
+ if (!file_exists($dir . '/'. $f)) {
+ echo "<!-- missing {$dir}/{$f}>\n";
+ $files[] = $relpath . $f . '?ts='.$mtime;
+ $missing_files = true;
+ }
+
$mtime = filemtime($dir . '/'. $f);
$maxtime = max($mtime, $maxtime);
$arfiles[$fn] = $mtime;
$mtime = filemtime($dir . '/'. $f);
$maxtime = max($mtime, $maxtime);
$arfiles[$fn] = $mtime;
- $files[] = $relpath . $f . '?ts='.$mtime;
+
}
}
+ if ($missing_files) {
+ $this->assetArrayToHtml($files, 'css');
+ return;
+
+ }
+
//print_r($relfiles);
//print_r($relfiles);