r76299 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76298‎ | r76299 | r76300 >
Date:11:32, 8 November 2010
Author:ialex
Status:ok
Tags:
Comment:
* (bug 25175) HTML file cache now honor $wgCacheDirectory if $wgFileCacheDirectory is not set

This reverts part of r74797
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/HTMLFileCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLFileCache.php
@@ -32,7 +32,11 @@
3333 if( !$this->mFileCache ) {
3434 global $wgCacheDirectory, $wgFileCacheDirectory;
3535
36 - if ( !$wgFileCacheDirectory && !$wgCacheDirectory ) {
 36+ if ( $wgFileCacheDirectory ) {
 37+ $dir = $wgFileCacheDirectory;
 38+ } elseif ( $wgCacheDirectory ) {
 39+ $dir = "$wgCacheDirectory/html";
 40+ } else {
3741 throw new MWException( 'Please set $wgCacheDirectory in LocalSettings.php if you wish to use the HTML file cache' );
3842 }
3943
@@ -45,7 +49,7 @@
4650
4751 $hash1 = substr( $hash, 0, 1 );
4852 $hash2 = substr( $hash, 0, 2 );
49 - $this->mFileCache = "{$wgFileCacheDirectory}/{$subdir}{$hash1}/{$hash2}/{$key}.html";
 53+ $this->mFileCache = "{$dir}/{$subdir}{$hash1}/{$hash2}/{$key}.html";
5054
5155 if( $this->useGzip() ) {
5256 $this->mFileCache .= '.gz';
Index: trunk/phase3/RELEASE-NOTES
@@ -405,6 +405,8 @@
406406 * (bug 25713) SpecialPage::resolveAlias() now normalise spaces to underscores
407407 * (bug 25829) Special:Mypage and Special:Mytalk now forward oldid, diff and dir
408408 parameters
 409+* (bug 25175) HTML file cache now honor $wgCacheDirectory if
 410+ $wgFileCacheDirectory is not set
409411
410412 === API changes in 1.17 ===
411413 * (bug 22738) Allow filtering by action type on query=logevent.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74797Big attack on unused variables...reedy20:53, 14 October 2010

Status & tagging log