Mercurial > SimpleWebPresenter
diff CacheTimeCheck.inc @ 47:66382989353f
Extract baseDir only once.
Function for generating cacheset.
Added logger functionality.
Removed hardcoded location for flagScript.
BUGFIX: masterdocument was not added to the cacheset.
BUGFIX: When two options existed next to eachother, the last was not
read.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Mon, 08 Oct 2012 17:35:08 +0200 |
| parents | fbbb82ced6de |
| children | c6d0892f81ff |
line wrap: on
line diff
--- a/CacheTimeCheck.inc Mon Oct 08 15:49:28 2012 +0200 +++ b/CacheTimeCheck.inc Mon Oct 08 17:35:08 2012 +0200 @@ -12,6 +12,19 @@ $this->cache_time(__FILE__); } + function cacheSet($humanReadable = False) + { + $retVal = array(); + foreach($this->files as $file) { + $mtime = filemtime($file); + if ($humanReadable) + $mtime = gmdate('D, d M Y H:i:s', $mtime) . ' GMT'; + + $retVal[$file] = $mtime; + } + return $retVal; + } + function instance($filename = False) { if (! self::$myInstance) @@ -44,9 +57,7 @@ function cache_time($path, $basedir = False) { if (!file_exists($path)) { - if (DEBUG_LEVEL >= VERBOSITY_WARNING) - print "${path} does not exist"; - var_dump($_SERVER); + warn("${path} does not exist"); errorPage("Resource not available"); }
