https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114208
Revision: 114208
Author: jeroendedauw
Date: 2012-03-19 22:37:05 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
only init if not already done so
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialCachedPage.php
Modified: trunk/phase3/includes/specials/SpecialCachedPage.php
===================================================================
--- trunk/phase3/includes/specials/SpecialCachedPage.php 2012-03-19
22:28:20 UTC (rev 114207)
+++ trunk/phase3/includes/specials/SpecialCachedPage.php 2012-03-19
22:37:05 UTC (rev 114208)
@@ -78,19 +78,21 @@
* @param boolean|null $cacheEnabled Sets if the cache should be
enabled or not.
*/
public function startCache( $cacheExpiry = null, $cacheEnabled = null )
{
- if ( !is_null( $cacheExpiry ) ) {
- $this->cacheExpiry = $cacheExpiry;
- }
+ if ( is_null( $this->hasCached ) ) {
+ if ( !is_null( $cacheExpiry ) ) {
+ $this->cacheExpiry = $cacheExpiry;
+ }
- if ( !is_null( $cacheEnabled ) ) {
- $this->setCacheEnabled( $cacheEnabled );
- }
+ if ( !is_null( $cacheEnabled ) ) {
+ $this->setCacheEnabled( $cacheEnabled );
+ }
- if ( $this->getRequest()->getText( 'action' ) === 'purge' ) {
- $this->hasCached = false;
+ if ( $this->getRequest()->getText( 'action' ) ===
'purge' ) {
+ $this->hasCached = false;
+ }
+
+ $this->initCaching();
}
-
- $this->initCaching();
}
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs