dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "objectcache: replace debugLog() calls with faster debug() calls in MemcachedPe...
[lhc/web/wiklou.git]
/
maintenance
/
edit.php
diff --git
a/maintenance/edit.php
b/maintenance/edit.php
index
a279cda
..
3609cf2
100644
(file)
--- a/
maintenance/edit.php
+++ b/
maintenance/edit.php
@@
-21,6
+21,8
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\Revision\SlotRecord;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
@@
-55,7
+57,7
@@
class EditCLI extends Maintenance {
$bot = $this->hasOption( 'bot' );
$autoSummary = $this->hasOption( 'autosummary' );
$noRC = $this->hasOption( 'no-rc' );
$bot = $this->hasOption( 'bot' );
$autoSummary = $this->hasOption( 'autosummary' );
$noRC = $this->hasOption( 'no-rc' );
- $slot = $this->getOption( 'slot',
'main'
);
+ $slot = $this->getOption( 'slot',
SlotRecord::MAIN
);
if ( $userName === false ) {
$wgUser = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] );
if ( $userName === false ) {
$wgUser = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] );
@@
-69,7
+71,7
@@
class EditCLI extends Maintenance {
$wgUser->addToDatabase();
}
$wgUser->addToDatabase();
}
- $title = Title::newFromText( $this->getArg() );
+ $title = Title::newFromText( $this->getArg(
0
) );
if ( !$title ) {
$this->fatalError( "Invalid title" );
}
if ( !$title ) {
$this->fatalError( "Invalid title" );
}
@@
-83,7
+85,7
@@
class EditCLI extends Maintenance {
$page = WikiPage::factory( $title );
if ( $remove ) {
$page = WikiPage::factory( $title );
if ( $remove ) {
- if ( $slot ===
'main'
) {
+ if ( $slot ===
SlotRecord::MAIN
) {
$this->fatalError( "Cannot remove main slot! Use --slot to specify." );
}
$this->fatalError( "Cannot remove main slot! Use --slot to specify." );
}