comparison CacheTimeCheck.inc @ 52:3898353ed1d8

Include fixes. sitemap don't print before everything has been processed. Make a class of accept-language.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Thu, 11 Oct 2012 00:48:46 +0200
parents 2d0cda52f43f
children 164268b4e0d9
comparison
equal deleted inserted replaced
50:2d0cda52f43f 52:3898353ed1d8
1 <?php 1 <?php
2 $baseDir = dirname(__FILE__);
3
4 include_once 'logger.inc';
5 include_once 'common-functions.inc';
6 $cache = CacheTimeCheck::instance(__FILE__);
7 $cache->cache_time("${baseDir}/logger.inc");
8 $cache->cache_time("${baseDir}/common-functions.inc");
9
2 /** 10 /**
3 * CacheTimeCheck provides a set of functions to enable generating a 11 * CacheTimeCheck provides a set of functions to enable generating a
4 * correct time for the latest update for a given file. 12 * correct time for the latest update for a given file.
5 * 13 *
6 * @author Tom Fredrik Blenning Klaussen 14 * @author Tom Fredrik Blenning Klaussen
86 */ 94 */
87 function cache_time($path) 95 function cache_time($path)
88 { 96 {
89 if (!file_exists($path)) { 97 if (!file_exists($path)) {
90 warn("${path} does not exist"); 98 warn("${path} does not exist");
91 errorPage("Resource not available"); 99 errorPage("Resource is not available");
92 } 100 }
93 101
94 array_push($this->files, $path); 102 array_push($this->files, $path);
95 $mtime = filemtime($path); 103 $mtime = filemtime($path);
96 if ($mtime > $this->newest) { 104 if ($mtime > $this->newest) {