r62437 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62436‎ | r62437 | r62438 >
Date:15:23, 13 February 2010
Author:ialex
Status:ok
Tags:
Comment:
* Use $wgOut->addWikiMsg()
* 'PurgeCache::execute' -> __METHOD__
* Removed a PHP4-ism
Modified paths:
  • /trunk/extensions/PurgeCache/PurgeCache_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PurgeCache/PurgeCache_body.php
@@ -18,11 +18,11 @@
1919 $this->setHeaders();
2020 if ( $wgUser->isAllowed( 'purgecache' ) ) {
2121 if ( $wgRequest->getCheck( 'purge' ) && $wgRequest->wasPosted() ) {
22 - $dbw =& wfGetDB( DB_MASTER );
23 - $dbw->delete( 'objectcache', '*', 'PurgeCache::execute' );
24 - $wgOut->addWikiText( wfMsg( 'purgecache-purged' ) );
 22+ $dbw = wfGetDB( DB_MASTER );
 23+ $dbw->delete( 'objectcache', '*', __METHOD__ );
 24+ $wgOut->addWikiMsg( 'purgecache-purged' );
2525 } else {
26 - $wgOut->addWikiText( wfMsg( 'purgecache-warning' ) );
 26+ $wgOut->addWikiMsg( 'purgecache-warning' );
2727 $wgOut->addHTML( $this->makeForm() );
2828 }
2929 } else {

Status & tagging log