X-Git-Url: http://git.cyclocoop.org/%24action?a=blobdiff_plain;f=includes%2FCacheManager.php;h=90b9677be9fec0bd9172dc839fa72c568bc942c1;hb=7bbe971aec2d548de981a12ed08a7b56a536dcdb;hp=b9d164f1d1d12b1a9d473c7dc386744ff09386de;hpb=90155b8a9719ada6522a320a3315b4e698fdd970;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CacheManager.php b/includes/CacheManager.php index b9d164f1d1..90b9677be9 100644 --- a/includes/CacheManager.php +++ b/includes/CacheManager.php @@ -1,6 +1,8 @@ mFileCache ) { - $hash = md5( $key = $this->mTitle->getDbkey() ); - if( $this->mTitle->getNamespace() ) - $key = $wgLang->getNsText( $this->mTitle->getNamespace() ) . ":" . $key; + $key = $this->mTitle->getPrefixedDbkey(); + $hash = md5( $key ); $key = str_replace( '.', '%2E', urlencode( $key ) ); $hash1 = substr( $hash, 0, 1 ); @@ -53,7 +55,7 @@ class CacheManager { } function fileCacheTime() { - return wfUnix2Timestamp( filemtime( $this->fileCacheName() ) ); + return wfTimestamp( TS_MW, filemtime( $this->fileCacheName() ) ); } function isFileCacheGood( $timestamp ) { @@ -90,11 +92,14 @@ class CacheManager { /* Working directory to/from output */ function loadFromFileCache() { - global $wgOut; + global $wgOut, $wgMimeType, $wgOutputEncoding, $wgContLanguageCode; wfDebug(" loadFromFileCache()\n"); $filename=$this->fileCacheName(); $wgOut->sendCacheControl(); + + header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" ); + header( "Content-language: $wgContLanguageCode" ); if( $this->useGzip() ) { if( wfClientAcceptsGzip() ) {