http://www.mediawiki.org/wiki/Special:Code/MediaWiki/76299
Revision: 76299
Author: ialex
Date: 2010-11-08 11:32:40 +0000 (Mon, 08 Nov 2010)
Log Message:
-----------
* (bug 25175) HTML file cache now honor $wgCacheDirectory if
$wgFileCacheDirectory is not set
This reverts part of r74797
Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/HTMLFileCache.php
Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES 2010-11-08 11:07:05 UTC (rev 76298)
+++ trunk/phase3/RELEASE-NOTES 2010-11-08 11:32:40 UTC (rev 76299)
@@ -405,6 +405,8 @@
* (bug 25713) SpecialPage::resolveAlias() now normalise spaces to underscores
* (bug 25829) Special:Mypage and Special:Mytalk now forward oldid, diff and dir
parameters
+* (bug 25175) HTML file cache now honor $wgCacheDirectory if
+ $wgFileCacheDirectory is not set
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
Modified: trunk/phase3/includes/HTMLFileCache.php
===================================================================
--- trunk/phase3/includes/HTMLFileCache.php 2010-11-08 11:07:05 UTC (rev
76298)
+++ trunk/phase3/includes/HTMLFileCache.php 2010-11-08 11:32:40 UTC (rev
76299)
@@ -32,7 +32,11 @@
if( !$this->mFileCache ) {
global $wgCacheDirectory, $wgFileCacheDirectory;
- if ( !$wgFileCacheDirectory && !$wgCacheDirectory ) {
+ if ( $wgFileCacheDirectory ) {
+ $dir = $wgFileCacheDirectory;
+ } elseif ( $wgCacheDirectory ) {
+ $dir = "$wgCacheDirectory/html";
+ } else {
throw new MWException( 'Please set
$wgCacheDirectory in LocalSettings.php if you wish to use the HTML file cache'
);
}
@@ -45,7 +49,7 @@
$hash1 = substr( $hash, 0, 1 );
$hash2 = substr( $hash, 0, 2 );
- $this->mFileCache =
"{$wgFileCacheDirectory}/{$subdir}{$hash1}/{$hash2}/{$key}.html";
+ $this->mFileCache =
"{$dir}/{$subdir}{$hash1}/{$hash2}/{$key}.html";
if( $this->useGzip() ) {
$this->mFileCache .= '.gz';
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs