http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97978
Revision: 97978
Author: aaron
Date: 2011-09-24 00:37:11 +0000 (Sat, 24 Sep 2011)
Log Message:
-----------
Removed action=raw support from HTMLFileCache. Obsolete due to RL.
Modified Paths:
--------------
trunk/phase3/includes/cache/HTMLFileCache.php
Modified: trunk/phase3/includes/cache/HTMLFileCache.php
===================================================================
--- trunk/phase3/includes/cache/HTMLFileCache.php 2011-09-24 00:14:53 UTC
(rev 97977)
+++ trunk/phase3/includes/cache/HTMLFileCache.php 2011-09-24 00:37:11 UTC
(rev 97978)
@@ -29,7 +29,7 @@
public function __construct( $title, $type = 'view' ) {
$this->mTitle = $title;
- $this->mType = ($type == 'raw' || $type == 'view' ) ? $type :
false;
+ $this->mType = ( $type == 'view' ) ? $type : false;
$this->fileCacheName(); // init name
}
@@ -45,8 +45,8 @@
throw new MWException( 'Please set
$wgCacheDirectory in LocalSettings.php if you wish to use the HTML file cache'
);
}
- # Store raw pages (like CSS hits) elsewhere
- $subdir = ($this->mType === 'raw') ? 'raw/' : '';
+ # Store other views of aspects of pages elsewhere
+ $subdir = ($this->mType === 'view') ? '' :
"{$this->mType}/";
$key = $this->mTitle->getPrefixedDbkey();
if ( $wgFileCacheDepth > 0 ) {
@@ -92,15 +92,13 @@
$queryVals = $wgRequest->getValues();
foreach( $queryVals as $query => $val ) {
if( $query == 'title' || $query == 'curid' ) {
- continue;
+ continue; // note: curid sets title
// Normal page view in query form can have action=view.
// Raw hits for pages also stored, like .css pages for
example.
} elseif( $query == 'action' && $val == 'view' ) {
continue;
- } elseif( $query == 'usemsgcache' && $val == 'yes' ) {
- continue;
// Below are header setting params
- } elseif( $query == 'maxage' || $query == 'smaxage' ||
$query == 'ctype' || $query == 'gen' ) {
+ } elseif( $query == 'maxage' || $query == 'smaxage' ) {
continue;
} else {
return false;
@@ -158,14 +156,9 @@
global $wgOut, $wgMimeType, $wgLanguageCode;
wfDebug( __METHOD__ . "()\n");
$filename = $this->fileCacheName();
- // Raw pages should handle cache control on their own,
- // even when using file cache. This reduces hits from clients.
- if( $this->mType !== 'raw' ) {
- $wgOut->sendCacheControl();
- header( "Content-Type: $wgMimeType; charset=UTF-8" );
- header( "Content-Language: $wgLanguageCode" );
- }
-
+ $wgOut->sendCacheControl();
+ header( "Content-Type: $wgMimeType; charset=UTF-8" );
+ header( "Content-Language: $wgLanguageCode" );
if( $this->useGzip() ) {
if( wfClientAcceptsGzip() ) {
header( 'Content-Encoding: gzip' );
@@ -240,9 +233,6 @@
$fc = new self( $title, 'view' );
unlink( $fc->fileCacheName() );
- $fc = new self( $title, 'raw' );
- unlink( $fc->fileCacheName() );
-
wfRestoreWarnings();
return true;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs