summaryrefslogtreecommitdiff
path: root/itjs.class
diff options
context:
space:
mode:
Diffstat (limited to 'itjs.class')
-rw-r--r--itjs.class7
1 files changed, 4 insertions, 3 deletions
diff --git a/itjs.class b/itjs.class
index f40a380..6a2053d 100644
--- a/itjs.class
+++ b/itjs.class
@@ -157,7 +157,7 @@ static function filecontents($filenames, $execphp = true)
{
ob_start(); # Needs to capture inside loop to guarantee file order
if (!(it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) && it::match('jquery-ui\.css', $filename)))
- $result .= it::replace(array('^1$' => ""), $execphp ? @include($filename) : file_get_contents($filename), array('utf8' => false));
+ $result .= it::replace(array('^1$' => ""), $execphp ? @include($filename) : @file_get_contents($filename), array('utf8' => false));
$result .= ob_get_clean();
}
@@ -190,9 +190,10 @@ static function strip($code)
*/
static function checksum($fnlist)
{
- $key = "itjs_" . md5(join("", it::map('"$v" . filemtime("$v")', is_array($fnlist) ? $fnlist : itjs::filenames($fnlist))));
+ $filenames = array_merge(is_array($fnlist) ? $fnlist : itjs::filenames($fnlist), array("/www/lib.search.ch/var/jquery-ui/dist/minified/jquery.ui.core.min.js", "/www/lib.search.ch/var/jquery/dist/jquery.min.js"));
+ $key = "itjs_" . md5(join("", it::map('"$v" . filemtime("$v")', $filenames)));
- return it_cache::get($key) ?: it_cache::put($key, substr(md5(self::filecontents(is_array($fnlist) ? $fnlist : itjs::filenames($fnlist), false)), 0, 8));
+ return it_cache::get($key) ?: it_cache::put($key, substr(md5(self::filecontents($filenames, false)), 0, 8));
}
}