r114208 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114207‎ | r114208 | r114209 >
Date:22:37, 19 March 2012
Author:jeroendedauw
Status:reverted
Tags:gerritmigration 
Comment:
only init if not already done so
Modified paths:
  • /trunk/phase3/includes/specials/SpecialCachedPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialCachedPage.php
@@ -78,19 +78,21 @@
7979 * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
8080 */
8181 public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
82 - if ( !is_null( $cacheExpiry ) ) {
83 - $this->cacheExpiry = $cacheExpiry;
84 - }
 82+ if ( is_null( $this->hasCached ) ) {
 83+ if ( !is_null( $cacheExpiry ) ) {
 84+ $this->cacheExpiry = $cacheExpiry;
 85+ }
8586
86 - if ( !is_null( $cacheEnabled ) ) {
87 - $this->setCacheEnabled( $cacheEnabled );
88 - }
 87+ if ( !is_null( $cacheEnabled ) ) {
 88+ $this->setCacheEnabled( $cacheEnabled );
 89+ }
8990
90 - if ( $this->getRequest()->getText( 'action' ) === 'purge' ) {
91 - $this->hasCached = false;
 91+ if ( $this->getRequest()->getText( 'action' ) === 'purge' ) {
 92+ $this->hasCached = false;
 93+ }
 94+
 95+ $this->initCaching();
9296 }
93 -
94 - $this->initCaching();
9597 }
9698
9799 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r114326Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086......catrope23:03, 20 March 2012

Status & tagging log