Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -37,11 +37,6 @@ |
38 | 38 | $this->user_color_index = 1; |
39 | 39 | } |
40 | 40 | |
41 | | - static function getView() { |
42 | | - global $wgOut, $wgArticle, $wgTitle, $wgUser, $wgRequest; |
43 | | - return new LqtView( $wgOut, $wgArticle, $wgTitle, $wgUser, $wgRequest ); |
44 | | - } |
45 | | - |
46 | 41 | function setHeaderLevel( $int ) { |
47 | 42 | $this->headerLevel = $int; |
48 | 43 | } |
Index: trunk/extensions/LiquidThreads/pages/SpecialHotTopics.php |
— | — | @@ -5,12 +5,13 @@ |
6 | 6 | } |
7 | 7 | |
8 | 8 | function execute( $par ) { |
9 | | - global $wgOut; |
| 9 | + global $wgOut, $wgUser, $wgRequest; |
10 | 10 | |
11 | 11 | $this->setHeaders(); |
12 | 12 | |
13 | 13 | $wgOut->setPageTitle( wfMsg( 'lqt-hot-topics' ) ); |
14 | | - $view = LqtView::getView(); |
| 14 | + $title = $this->getTitle(); |
| 15 | + $view = new LqtView( $wgOut, new Article( $title ), $title, $wgUser, $wgRequest ); |
15 | 16 | |
16 | 17 | // Get hot topics |
17 | 18 | $topics = LqtHotTopicsController::getHotThreads(); |
Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php |
— | — | @@ -310,7 +310,7 @@ |
311 | 311 | * Injects handling of the 'feed' action. |
312 | 312 | * Usage: $wgHooks['UnknownAction'][] = 'wfWikiArticleFeedsAction'; |
313 | 313 | * @param $action Handle to an action string (presumably same as global $action). |
314 | | - * @param $article Article to be converted to rss or atom feed (presumably same as $wgArticle). |
| 314 | + * @param $article Article to be converted to rss or atom feed |
315 | 315 | */ |
316 | 316 | function wfWikiArticleFeedsAction( $action, $article ) { |
317 | 317 | |
Index: trunk/extensions/FlaggedRevs/presentation/FlaggedRevsUI.hooks.php |
— | — | @@ -219,7 +219,6 @@ |
220 | 220 | // *sigh*...skip, dealt with in setNavigation() |
221 | 221 | return true; |
222 | 222 | } |
223 | | - // Note: $wgArticle sometimes not set here |
224 | 223 | if ( FlaggedPageView::globalArticleInstance() != null ) { |
225 | 224 | $view = FlaggedPageView::singleton(); |
226 | 225 | $view->setActionTabs( $skin, $contentActions ); |
— | — | @@ -230,7 +229,6 @@ |
231 | 230 | |
232 | 231 | // Vector et al: $links is all the tabs (2 levels) |
233 | 232 | public static function onSkinTemplateNavigation( Skin $skin, array &$links ) { |
234 | | - // Note: $wgArticle sometimes not set here |
235 | 233 | if ( FlaggedPageView::globalArticleInstance() != null ) { |
236 | 234 | $view = FlaggedPageView::singleton(); |
237 | 235 | $view->setActionTabs( $skin, $links['actions'] ); |
— | — | @@ -579,7 +577,6 @@ |
580 | 578 | } |
581 | 579 | |
582 | 580 | public static function injectPostEditURLParams( $article, &$sectionAnchor, &$extraQuery ) { |
583 | | - // Note: $wgArticle sometimes not set here |
584 | 581 | if ( FlaggedPageView::globalArticleInstance() != null ) { |
585 | 582 | $view = FlaggedPageView::singleton(); |
586 | 583 | $view->injectPostEditURLParams( $sectionAnchor, $extraQuery ); |
Index: trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | | - * Get the FlaggedPage instance associated with $wgArticle/$wgTitle, |
| 59 | + * Get the FlaggedPage instance associated with $wgTitle, |
60 | 60 | * or false if there isn't such a title |
61 | 61 | */ |
62 | 62 | public static function globalArticleInstance() { |
Index: trunk/extensions/MultilingualLiquidThreads/LiquidThreads/classes/View.php |
— | — | @@ -37,11 +37,6 @@ |
38 | 38 | $this->user_color_index = 1; |
39 | 39 | } |
40 | 40 | |
41 | | - static function getView() { |
42 | | - global $wgOut, $wgArticle, $wgTitle, $wgUser, $wgRequest; |
43 | | - return new LqtView( $wgOut, $wgArticle, $wgTitle, $wgUser, $wgRequest ); |
44 | | - } |
45 | | - |
46 | 41 | function setHeaderLevel( $int ) { |
47 | 42 | $this->headerLevel = $int; |
48 | 43 | } |
Index: trunk/extensions/MultilingualLiquidThreads/LiquidThreads/pages/SpecialHotTopics.php |
— | — | @@ -5,12 +5,13 @@ |
6 | 6 | } |
7 | 7 | |
8 | 8 | function execute( $par ) { |
9 | | - global $wgOut; |
| 9 | + global $wgOut, $wgUser, $wgRequest; |
10 | 10 | |
11 | 11 | $this->setHeaders(); |
12 | 12 | |
13 | 13 | $wgOut->setPageTitle( wfMsg( 'lqt-hot-topics' ) ); |
14 | | - $view = LqtView::getView(); |
| 14 | + $title = $this->getTitle(); |
| 15 | + $view = new LqtView( $wgOut, new Article( $title ), $title, $wgUser, $wgRequest ); |
15 | 16 | |
16 | 17 | LqtView::addJsAndCss(); |
17 | 18 | |