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 "wfEmptyMsg() was removed"
[lhc/web/wiklou.git]
/
maintenance
/
deleteBatch.php
diff --git
a/maintenance/deleteBatch.php
b/maintenance/deleteBatch.php
index
e6321e1
..
6c89e67
100644
(file)
--- a/
maintenance/deleteBatch.php
+++ b/
maintenance/deleteBatch.php
@@
-55,11
+55,15
@@
class DeleteBatch extends Maintenance {
chdir( $oldCwd );
# Options processing
chdir( $oldCwd );
# Options processing
- $username = $this->getOption( 'u',
'Delete page script'
);
+ $username = $this->getOption( 'u',
false
);
$reason = $this->getOption( 'r', '' );
$interval = $this->getOption( 'i', 0 );
$reason = $this->getOption( 'r', '' );
$interval = $this->getOption( 'i', 0 );
- $user = User::newFromName( $username );
+ if ( $username === false ) {
+ $user = User::newSystemUser( 'Delete page script', array( 'steal' => true ) );
+ } else {
+ $user = User::newFromName( $username );
+ }
if ( !$user ) {
$this->error( "Invalid username", true );
}
if ( !$user ) {
$this->error( "Invalid username", true );
}
@@
-76,7
+80,7
@@
class DeleteBatch extends Maintenance {
$this->error( "Unable to read file, exiting", true );
}
$this->error( "Unable to read file, exiting", true );
}
- $dbw =
wfG
etDB( DB_MASTER );
+ $dbw =
$this->g
etDB( DB_MASTER );
# Handle each entry
// @codingStandardsIgnoreStart Ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
# Handle each entry
// @codingStandardsIgnoreStart Ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed