summaryrefslogtreecommitdiff
path: root/itjs.class
diff options
context:
space:
mode:
authorUrban Müller2013-10-11 15:07:57 +0000
committerUrban Müller2013-10-11 15:07:57 +0000
commitfab282eb800ef5626f85f3c876e797b4fc472e0d (patch)
tree99a43ef414e26b8d14b8430559d4897f0abebfcf /itjs.class
parentfb31f42b294161a1f2686413f2cb710e5a1a609a (diff)
downloaditools-fab282eb800ef5626f85f3c876e797b4fc472e0d.tar.gz
itools-fab282eb800ef5626f85f3c876e797b4fc472e0d.tar.bz2
itools-fab282eb800ef5626f85f3c876e797b4fc472e0d.zip
use md5 for checksum, use long expire, always return not modified
Diffstat (limited to 'itjs.class')
-rw-r--r--itjs.class11
1 files changed, 3 insertions, 8 deletions
diff --git a/itjs.class b/itjs.class
index e8284ce..d9db666 100644
--- a/itjs.class
+++ b/itjs.class
@@ -158,7 +158,7 @@ static function strip($code)
if (!it::is_devel())
$code = preg_replace(array(
'|\s//.*$|m',
- '|\s+/\*.*?\*/|s', # MUST require at least one space before "/*" (jquery.js) but MUST NOT require space before "*/" (searchmap.js)
+ '|\s+/\*.*?\*/|s', # MUST require at least one space before /* (jquery.js) but MUST NOT require space before */ (searchmap.js)
'|^\s+|m'
), array(), $code);
if (EDC('print'))
@@ -179,14 +179,9 @@ static function checksum($files = array())
$service_itjs = glob($GLOBALS['ULTRAHOME'] . "/itjs/*.{js,css,php}", GLOB_BRACE);
foreach (array_merge($files, $service_itjs, $itools_itjs, array("$itjs/itjs.php", "$itjs/itjs.class")) as $file)
- {
- if (!it::is_devel())
- $result += @filesize($file);
- else
- $result = md5($result . @file_get_contents($file));
- }
+ $allfiles .= $file;
- return $result;
+ return substr(md5($allfiles), 0, 8); # UTF8SAFE
}
}