r96838 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96837‎ | r96838 | r96839 >
Date:13:58, 12 September 2011
Author:yaron
Status:ok
Tags:
Comment:
Follow-up to r85273 - re-added use of $skin->mTitle if $skin->getTitle() doesn't exist, thus restoring support for MW 1.15
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_RefreshTab.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_RefreshTab.php
@@ -25,10 +25,12 @@
2626 global $wgUser;
2727 if ( $wgUser->isAllowed( 'purge' ) ) {
2828 smwfLoadExtensionMessages( 'SemanticMediaWiki' );
 29+ // Skin::getTitle() was added in MW 1.16
 30+ $title = is_callable( array( $skin, 'getTitle' ) ) ? $skin->getTitle() : $skin->mTitle;
2931 $content_actions['purge'] = array(
3032 'class' => false,
3133 'text' => wfMsg( 'smw_purge' ),
32 - 'href' => $skin->getTitle()->getLocalUrl( 'action=purge' )
 34+ 'href' => $title->getLocalUrl( 'action=purge' )
3335 );
3436 }
3537 return true; // always return true, in order not to stop MW's hook processing!
@@ -43,4 +45,4 @@
4446 smwfAddRefreshTab( $skin, $actions );
4547 $links['actions'] = $actions;
4648 return true;
47 -}
\ No newline at end of file
 49+}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85273follow up to r85250; use getTitle method as should have been donejeroendedauw19:53, 3 April 2011

Status & tagging log