r107858 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107857‎ | r107858 | r107859 >
Date:00:31, 3 January 2012
Author:dantman
Status:ok
Tags:
Comment:
Update Extension:Purge to use getRelevantTitle so it will work with improved special pages like Special:MovePage in 1.18. Also drop a bit from the description that doesn't seam correct.
Modified paths:
  • /trunk/extensions/Purge/Purge.i18n.php (modified) (history)
  • /trunk/extensions/Purge/Purge.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Purge/Purge.i18n.php
@@ -12,8 +12,8 @@
1313 * @author Ævar Arnfjörð Bjarmason
1414 */
1515 $messages['en'] = array(
16 - 'purge' => 'purge',
17 - 'purge-desc' => 'Adds a purge tab on all normal pages, and bypasses the purge check for anonymous users allowing for quick purging of the cache',
 16+ 'purge' => 'Purge',
 17+ 'purge-desc' => 'Adds a purge tab on all normal pages allowing for quick purging of the cache',
1818 );
1919
2020 /** Message documentation (Message documentation)
Index: trunk/extensions/Purge/Purge.php
@@ -23,7 +23,9 @@
2424 public static function contentHook( $skin, array &$content_actions ) {
2525 global $wgRequest, $wgUser;
2626
27 - $title = $skin->getTitle();
 27+ // Use getRelevantTitle if present so that this will work on some special pages
 28+ $title = method_exists( $skin, 'getRelevantTitle' ) ?
 29+ $skin->getRelevantTitle() : $skin->getTitle();
2830 if ( $title->getNamespace() !== NS_SPECIAL && $wgUser->isAllowed( 'purge' ) ) {
2931 $action = $wgRequest->getText( 'action' );
3032

Status & tagging log