r82338 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82337‎ | r82338 | r82339 >
Date:16:48, 17 February 2011
Author:ialex
Status:ok
Tags:
Comment:
Use OutputPage::getTitle() instead of $wgTitle
Modified paths:
  • /trunk/extensions/EditSimilar/EditSimilar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EditSimilar/EditSimilar.php
@@ -55,16 +55,17 @@
5656
5757 // view message depending on settings and the relevancy of the results
5858 function wfEditSimilarViewMesg( &$out ) {
59 - global $wgTitle, $wgUser, $wgEditSimilarAlwaysShowThanks;
 59+ global $wgUser, $wgEditSimilarAlwaysShowThanks;
6060
6161 wfLoadExtensionMessages( 'EditSimilar' );
6262
6363 if ( !empty( $_SESSION['ES_saved'] ) && ( 1 == $wgUser->getOption( 'edit-similar', 1 ) ) && $out->isArticle() ) {
6464 if ( EditSimilar::checkCounter() ) {
6565 $message_text = '';
66 - $article_title = $wgTitle->getText();
 66+ $title = $out->getTitle();
 67+ $article_title = $title->getText();
6768 // here we'll populate the similar articles and links
68 - $instance = new EditSimilar( $wgTitle->getArticleId(), 'category' );
 69+ $instance = new EditSimilar( $title->getArticleId(), 'category' );
6970 $similarities = $instance->getSimilarArticles();
7071
7172 if ( !empty( $similarities ) ) {
@@ -117,4 +118,4 @@
118119 'label-message' => 'tog-edit-similar',
119120 );
120121 return true;
121 -}
\ No newline at end of file
 122+}

Status & tagging log