Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
contractor-progress.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
made css_mangler.php handle versioning (strips numerical postfixes) and made contract...
[contractor-progress.git]
/
css_mangler.php
diff --git
a/css_mangler.php
b/css_mangler.php
index
03e55f9
..
40f0e8e
100644
(file)
--- a/
css_mangler.php
+++ b/
css_mangler.php
@@
-13,7
+13,18
@@
function css_mangler() {
$file = substr($file, 1);
$file = substr($file, 1);
+ $file = ereg_replace('_[0-9]*[.]css', '.css', $file);
+
+ $mtime = filemtime($file);
+ if($mtime === false) {
+ header('Content-Type: text/plain');
+ print("cannot stat $file");
+ return;
+ }
+
header('Content-Type: text/css');
header('Content-Type: text/css');
+ header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime) . ' GMT');
+ header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mtime) . ' GMT');
if(ie5or6()) {
echo(ereg_replace("\n[^\n]*remove this line for IE 5.5 and 6[^\n]*\n", "\n", read_whole_file($file)));
if(ie5or6()) {
echo(ereg_replace("\n[^\n]*remove this line for IE 5.5 and 6[^\n]*\n", "\n", read_whole_file($file)));