r112766 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112765‎ | r112766 | r112767 >
Date:03:11, 1 March 2012
Author:johnduhart
Status:ok
Tags:
Comment:
ContextSource in the Special page
Modified paths:
  • /trunk/extensions/ArticleCreationWorkflow/SpecialArticleCreationLanding.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/SpecialArticleCreationLanding.php
@@ -15,8 +15,9 @@
1616 }
1717
1818 public function execute( $par ) {
19 - global $wgOut, $wgUser, $wgRequest;
 19+ global $wgUser, $wgRequest;
2020
 21+ $out = $this->getOutput();
2122 $title = Title::newFromText( $par );
2223
2324 // bad title
@@ -25,18 +26,18 @@
2627 }
2728 // title exists
2829 if ( $title->exists() ) {
29 - $wgOut->redirect( $title->getFullURL() );
 30+ $out->redirect( $title->getFullURL() );
3031 return;
3132 }
3233
3334 $this->pageTitle = wfMsg( 'ac-landing-page-title', $title );
34 - $wgOut->setPageTitle( $this->pageTitle );
35 - $wgOut->setRobotPolicy( 'noindex,nofollow' );
36 - $wgOut->addModules( 'ext.articleCreation.core' );
37 - $wgOut->addModules( 'ext.articleCreation.user' );
38 - $wgOut->addHtml( ArticleCreationTemplates::getLandingPage($par) );
 35+ $out->setPageTitle( $this->pageTitle );
 36+ $out->setRobotPolicy( 'noindex,nofollow' );
 37+ $out->addModules( 'ext.articleCreation.core' );
 38+ $out->addModules( 'ext.articleCreation.user' );
 39+ $out->addHtml( ArticleCreationTemplates::getLandingPage($par) );
3940
40 - ArticleCreationUtil::TrackSpecialLandingPage( $wgRequest, $wgUser, $par );
 41+ ArticleCreationUtil::TrackSpecialLandingPage( $wgRequest, $wgUser, $par );
4142 }
4243
4344 }

Status & tagging log