comparison cache_check.inc @ 22:ccfddd7fba1b

Cleanup.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Wed, 19 Sep 2012 16:15:38 +0200
parents 5dc5cc27471d
children 1ec0738a1623
comparison
equal deleted inserted replaced
21:5dc5cc27471d 22:ccfddd7fba1b
14 exit; 14 exit;
15 } 15 }
16 header("Last-Modified: $gmdate_mod"); 16 header("Last-Modified: $gmdate_mod");
17 } 17 }
18 18
19 function cache_time($path) { 19 function cache_time($path)
20 {
20 global $newest; 21 global $newest;
21 $mtime = filemtime($path); 22 $mtime = filemtime($path);
22 if ($mtime > $newest) { 23 if ($mtime > $newest) {
23 $newest = $mtime; 24 $newest = $mtime;
24 } 25 }
25 } 26 }
26 27
27 function include_with_mtime($path) { 28 function include_with_mtime($path)
29 {
28 cache_time($path); 30 cache_time($path);
29 include($path); 31 include($path);
30 } 32 }
31 33
32 cache_time(__FILE__); 34 cache_time(__FILE__);