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
resourceloader: Remove obsolete msg_resource_links table
[lhc/web/wiklou.git]
/
maintenance
/
importSiteScripts.php
diff --git
a/maintenance/importSiteScripts.php
b/maintenance/importSiteScripts.php
index
6566a60
..
5dfd2a8
100644
(file)
--- a/
maintenance/importSiteScripts.php
+++ b/
maintenance/importSiteScripts.php
@@
-41,7
+41,12
@@
class ImportSiteScripts extends Maintenance {
public function execute() {
global $wgUser;
public function execute() {
global $wgUser;
- $user = User::newFromName( $this->getOption( 'username', 'ScriptImporter' ) );
+ $username = $this->getOption( 'username', false );
+ if ( $username === false ) {
+ $user = User::newSystemUser( 'ScriptImporter', array( 'steal' => true ) );
+ } else {
+ $user = User::newFromName( $username );
+ }
$wgUser = $user;
$baseUrl = $this->getArg( 1 );
$wgUser = $user;
$baseUrl = $this->getArg( 1 );