Revision: 50893 Author: siebrand Date: 2009-05-22 14:01:45 +0000 (Fri, 22 May 2009)
Log Message: ----------- * add right- message * remove trailing whitespace, stylize.php * add version Modified Paths: -------------- trunk/extensions/PurgeCache/PurgeCache.i18n.php trunk/extensions/PurgeCache/PurgeCache.php trunk/extensions/PurgeCache/PurgeCache_body.php Modified: trunk/extensions/PurgeCache/PurgeCache.i18n.php =================================================================== --- trunk/extensions/PurgeCache/PurgeCache.i18n.php 2009-05-22 13:04:43 UTC (rev 50892) +++ trunk/extensions/PurgeCache/PurgeCache.i18n.php 2009-05-22 14:01:45 UTC (rev 50893) @@ -14,6 +14,7 @@ 'purgecache-warning' => 'This will purge the cache tables.', 'purgecache-purged' => 'The cache has been purged.', 'purgecache-button' => 'Purge', + 'right-purgecache' => 'Wipe the OBJECTCACHE table', ); /** Message documentation (Message documentation) Modified: trunk/extensions/PurgeCache/PurgeCache.php =================================================================== --- trunk/extensions/PurgeCache/PurgeCache.php 2009-05-22 13:04:43 UTC (rev 50892) +++ trunk/extensions/PurgeCache/PurgeCache.php 2009-05-22 14:01:45 UTC (rev 50893) @@ -2,14 +2,14 @@ /** * Special page used to wipe the OBJECTCACHE table - * I use it on test wikis when I'm fiddling about with things en masse that could be cached + * I use it on test wikis when I am fiddling about with things en masse that could be cached * * @addtogroup Extensions * @author Rob Church <robc...@gmail.com> * @licence Public domain */ -if( !defined( 'MEDIAWIKI' ) ) { +if ( !defined( 'MEDIAWIKI' ) ) { echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); exit( 1 ); } @@ -18,11 +18,12 @@ 'path' => __FILE__, 'name' => 'Purge Cache', 'author' => 'Rob Church', + 'version' => '0.1', 'description' => 'Special page used to wipe the OBJECTCACHE table', 'descriptionmsg' => 'purgecache-desc', ); -$dir = dirname(__FILE__) . '/'; +$dir = dirname( __FILE__ ) . '/'; $wgExtensionMessagesFiles['PurgeCache'] = $dir . 'PurgeCache.i18n.php'; $wgExtensionAliasesFiles['PurgeCache'] = $dir . 'PurgeCache.alias.php'; $wgAutoloadClasses['SpecialPurgeCache'] = $dir . 'PurgeCache_body.php'; Modified: trunk/extensions/PurgeCache/PurgeCache_body.php =================================================================== --- trunk/extensions/PurgeCache/PurgeCache_body.php 2009-05-22 13:04:43 UTC (rev 50892) +++ trunk/extensions/PurgeCache/PurgeCache_body.php 2009-05-22 14:01:45 UTC (rev 50893) @@ -1,5 +1,5 @@ <?php -if( !defined( 'MEDIAWIKI' ) ) { +if ( !defined( 'MEDIAWIKI' ) ) { echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); exit( 1 ); } @@ -13,16 +13,16 @@ function execute( $par ) { global $wgUser, $wgRequest, $wgOut; - wfLoadExtensionMessages('PurgeCache'); + wfLoadExtensionMessages( 'PurgeCache' ); $this->setHeaders(); - if( $wgUser->isAllowed( 'purgecache' ) ) { - if( $wgRequest->getCheck( 'purge' ) && $wgRequest->wasPosted() ) { + if ( $wgUser->isAllowed( 'purgecache' ) ) { + if ( $wgRequest->getCheck( 'purge' ) && $wgRequest->wasPosted() ) { $dbw =& wfGetDB( DB_MASTER ); $dbw->delete( 'objectcache', '*', 'PurgeCache::execute' ); - $wgOut->addWikiText( wfMsg('purgecache-purged') ); + $wgOut->addWikiText( wfMsg( 'purgecache-purged' ) ); } else { - $wgOut->addWikiText( wfMsg('purgecache-warning') ); + $wgOut->addWikiText( wfMsg( 'purgecache-warning' ) ); $wgOut->addHTML( $this->makeForm() ); } } else { @@ -33,7 +33,7 @@ function makeForm() { $self = $this->getTitle(); $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) ); - $form .= Xml::element( 'input', array( 'type' => 'submit', 'name' => 'purge', 'value' => wfMsg('purgecache-button') ) ); + $form .= Xml::element( 'input', array( 'type' => 'submit', 'name' => 'purge', 'value' => wfMsg( 'purgecache-button' ) ) ); $form .= Xml::closeElement( 'form' ); return $form; } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs