Index: trunk/extensions/EditSimilar/EditSimilar.php |
— | — | @@ -55,16 +55,17 @@ |
56 | 56 | |
57 | 57 | // view message depending on settings and the relevancy of the results |
58 | 58 | function wfEditSimilarViewMesg( &$out ) { |
59 | | - global $wgTitle, $wgUser, $wgEditSimilarAlwaysShowThanks; |
| 59 | + global $wgUser, $wgEditSimilarAlwaysShowThanks; |
60 | 60 | |
61 | 61 | wfLoadExtensionMessages( 'EditSimilar' ); |
62 | 62 | |
63 | 63 | if ( !empty( $_SESSION['ES_saved'] ) && ( 1 == $wgUser->getOption( 'edit-similar', 1 ) ) && $out->isArticle() ) { |
64 | 64 | if ( EditSimilar::checkCounter() ) { |
65 | 65 | $message_text = ''; |
66 | | - $article_title = $wgTitle->getText(); |
| 66 | + $title = $out->getTitle(); |
| 67 | + $article_title = $title->getText(); |
67 | 68 | // here we'll populate the similar articles and links |
68 | | - $instance = new EditSimilar( $wgTitle->getArticleId(), 'category' ); |
| 69 | + $instance = new EditSimilar( $title->getArticleId(), 'category' ); |
69 | 70 | $similarities = $instance->getSimilarArticles(); |
70 | 71 | |
71 | 72 | if ( !empty( $similarities ) ) { |
— | — | @@ -117,4 +118,4 @@ |
118 | 119 | 'label-message' => 'tog-edit-similar', |
119 | 120 | ); |
120 | 121 | return true; |
121 | | -} |
\ No newline at end of file |
| 122 | +} |