r81611 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81610‎ | r81611 | r81612 >
Date:22:36, 6 February 2011
Author:demon
Status:ok
Tags:
Comment:
Revert r66977 (removing $wgTitle from edit.php). This doesn't break core, but could quite possibly break extensions that expect $wgTitle to be set during editing. I hate $wgTitle :(
Modified paths:
  • /trunk/phase3/maintenance/edit.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/edit.php
@@ -36,7 +36,7 @@
3737 }
3838
3939 public function execute() {
40 - global $wgUser;
 40+ global $wgUser, $wgTitle;
4141
4242 $userName = $this->getOption( 'u', 'Maintenance script' );
4343 $summary = $this->getOption( 's', '' );
@@ -53,12 +53,12 @@
5454 $wgUser->addToDatabase();
5555 }
5656
57 - $title = Title::newFromText( $this->getArg() );
58 - if ( !$title ) {
 57+ $wgTitle = Title::newFromText( $this->getArg() );
 58+ if ( !$wgTitle ) {
5959 $this->error( "Invalid title", true );
6060 }
6161
62 - $article = new Article( $title );
 62+ $article = new Article( $wgTitle );
6363
6464 # Read the text
6565 $text = $this->getStdin( Maintenance::STDIN_ALL );

Follow-up revisions

RevisionCommit summaryAuthorDate
r816541.17: MFT r78372, r79324, r80841, r81430, r81488, r81496, r81554, r81561, r81...catrope22:28, 7 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66977edit.php: got rid of $wgTitlemaxsem18:04, 27 May 2010

Status & tagging log