mirror of
https://github.com/mrclay/minify.git
synced 2025-08-19 04:11:20 +02:00
+ "//" filepath shortcut in Build.php
+ 'getContentFunc' option in Source.php for lazy loading content only when needed (e.g. from DB)
This commit is contained in:
@@ -86,8 +86,13 @@ class Minify_Build {
|
||||
foreach ((array)$sources as $source) {
|
||||
if ($source instanceof Minify_Source) {
|
||||
$max = max($max, $source->lastModified);
|
||||
} elseif (is_string($source) && is_file($source)) {
|
||||
$max = max($max, filemtime($source));
|
||||
} elseif (is_string($source)) {
|
||||
if (0 === strpos($source, '//')) {
|
||||
$source = $_SERVER['DOCUMENT_ROOT'] . substr($source, 1);
|
||||
}
|
||||
if (is_file($source)) {
|
||||
$max = max($max, filemtime($source));
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->lastModified = $max;
|
||||
|
Reference in New Issue
Block a user