aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/edit.php
diff options
context:
space:
mode:
authorChad Horohoe <chadh@wikimedia.org>2013-11-16 18:03:11 -0800
committerChad Horohoe <chadh@wikimedia.org>2013-11-16 18:04:11 -0800
commit41a6bd786ee27bbb9776ac0c0a7d7f5ecc91216c (patch)
tree156d23252a6e0d6164ae6c68fc9d06502dfc640d /maintenance/edit.php
parent2a0da3b5589e37c36219268d433b3e1d06d9669b (diff)
downloadmediawikicore-41a6bd786ee27bbb9776ac0c0a7d7f5ecc91216c.tar.gz
mediawikicore-41a6bd786ee27bbb9776ac0c0a7d7f5ecc91216c.zip
Remove ugly $wgTitle usage from edit.php maintenance script
Change-Id: Iae44d0945a10832a7f6585d3620c8e994783457b
Diffstat (limited to 'maintenance/edit.php')
-rw-r--r--maintenance/edit.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/maintenance/edit.php b/maintenance/edit.php
index 7c24f0fab7a6..6e696513b8fc 100644
--- a/maintenance/edit.php
+++ b/maintenance/edit.php
@@ -42,7 +42,7 @@ class EditCLI extends Maintenance {
}
public function execute() {
- global $wgUser, $wgTitle;
+ global $wgUser;
$userName = $this->getOption( 'user', 'Maintenance script' );
$summary = $this->getOption( 'summary', '' );
@@ -61,17 +61,17 @@ class EditCLI extends Maintenance {
$wgUser->addToDatabase();
}
- $wgTitle = Title::newFromText( $this->getArg() );
- if ( !$wgTitle ) {
+ $title = Title::newFromText( $this->getArg() );
+ if ( !$title ) {
$this->error( "Invalid title", true );
}
- $context->setTitle( $wgTitle );
+ $context->setTitle( $title );
- $page = WikiPage::factory( $wgTitle );
+ $page = WikiPage::factory( $title );
# Read the text
$text = $this->getStdin( Maintenance::STDIN_ALL );
- $content = ContentHandler::makeContent( $text, $wgTitle );
+ $content = ContentHandler::makeContent( $text, $title );
# Do the edit
$this->output( "Saving... " );