diff options
author | Urban Müller | 2013-10-11 15:07:57 +0000 |
---|---|---|
committer | Urban Müller | 2013-10-11 15:07:57 +0000 |
commit | fab282eb800ef5626f85f3c876e797b4fc472e0d (patch) | |
tree | 99a43ef414e26b8d14b8430559d4897f0abebfcf /itjs.class | |
parent | fb31f42b294161a1f2686413f2cb710e5a1a609a (diff) | |
download | itools-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.class | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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 } } |