diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index a62434eca..f625536db 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -399,7 +399,7 @@ class Bootstrap // Detect by creating a temporary file // Try to use system's temporary directory as random name // shouldn't exist - $temp_file = tempnam(G::encryptOld(uniqid(rand(), true)), ''); + $temp_file = tempnam(Bootstrap::encryptOld(uniqid(rand(), true)), ''); if ($temp_file) { $temp_dir = realpath(dirname($temp_file)); unlink($temp_file); @@ -1077,7 +1077,7 @@ class Bootstrap $mtime = date('U'); $gmt_mtime = gmdate("D, d M Y H:i:s", $mtime) . " GMT"; header('Pragma: cache'); - header('ETag: "' . G::encryptOld($mtime . $filename) . '"'); + header('ETag: "' . Bootstrap::encryptOld($mtime . $filename) . '"'); header("Last-Modified: " . $gmt_mtime); header('Cache-Control: public'); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 30 * 60 * 60 * 24) . " GMT"); //1 month @@ -1090,7 +1090,7 @@ class Bootstrap } if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) { - if (str_replace('"', '', stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) == G::encryptOld($mtime . $filename)) { + if (str_replace('"', '', stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) == Bootstrap::encryptOld($mtime . $filename)) { header("HTTP/1.1 304 Not Modified"); exit(); } @@ -1216,7 +1216,7 @@ class Bootstrap $mtime = date('U'); } $gmt_mtime = gmdate("D, d M Y H:i:s", $mtime) . " GMT"; - header('ETag: "' . G::encryptOld($mtime . $filename) . '"'); + header('ETag: "' . Bootstrap::encryptOld($mtime . $filename) . '"'); header("Last-Modified: " . $gmt_mtime); header('Cache-Control: public'); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 60 * 10) . " GMT"); // ten @@ -1234,7 +1234,7 @@ class Bootstrap $mtime = date('U'); } $gmt_mtime = gmdate("D, d M Y H:i:s", $mtime) . " GMT"; - header('ETag: "' . G::encryptOld($mtime . $filename) . '"'); + header('ETag: "' . Bootstrap::encryptOld($mtime . $filename) . '"'); header("Last-Modified: " . $gmt_mtime); header('Cache-Control: public'); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 90 * 60 * 60 * 24) . " GMT"); @@ -1246,7 +1246,7 @@ class Bootstrap } if (isset($_SERVER ['HTTP_IF_NONE_MATCH'])) { - if (str_replace('"', '', stripslashes($_SERVER ['HTTP_IF_NONE_MATCH'])) == G::encryptOld($mtime . $filename)) { + if (str_replace('"', '', stripslashes($_SERVER ['HTTP_IF_NONE_MATCH'])) == Bootstrap::encryptOld($mtime . $filename)) { header("HTTP/1.1 304 Not Modified"); exit(); } @@ -1276,7 +1276,7 @@ class Bootstrap $checkSum .= md5_file($file); } } - return G::encryptOld($checkSum . $key); + return Bootstrap::encryptOld($checkSum . $key); } /** @@ -2922,5 +2922,16 @@ class Bootstrap } return false; } + /** + * encryptOld + * + * @param string $string + * + * @return md5($string) + */ + public function encryptOld ($string) + { + return md5($string); + } } diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index c57009bfa..56cf5734a 100755 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -151,7 +151,7 @@ if (file_exists($requestFile)) { header ( 'Pragma: cache' ); $mtime = filemtime ( $requestFile ); $gmt_mtime = gmdate ( "D, d M Y H:i:s", $mtime ) . " GMT"; - header ( 'ETag: "' . G::encryptOld ( $mtime . $requestFile ) . '"' ); + header ( 'ETag: "' . Bootstrap::encryptOld ( $mtime . $requestFile ) . '"' ); header ( "Last-Modified: " . $gmt_mtime ); header ( 'Cache-Control: public' ); $userAgent = strtolower ( $_SERVER ['HTTP_USER_AGENT'] ); @@ -165,7 +165,7 @@ if (file_exists($requestFile)) { } } if (isset ( $_SERVER ['HTTP_IF_NONE_MATCH'] )) { - if (str_replace ( '"', '', stripslashes ( $_SERVER ['HTTP_IF_NONE_MATCH'] ) ) == G::encryptOld ( $mtime . $requestFile )) { + if (str_replace ( '"', '', stripslashes ( $_SERVER ['HTTP_IF_NONE_MATCH'] ) ) == Bootstrap::encryptOld ( $mtime . $requestFile )) { header ( "HTTP/1.1 304 Not Modified" ); } }