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
Return the page_id in list=langbacklinks as an int
[lhc/web/wiklou.git]
/
maintenance
/
createAndPromote.php
diff --git
a/maintenance/createAndPromote.php
b/maintenance/createAndPromote.php
index
1872716
..
d3efca6
100644
(file)
--- a/
maintenance/createAndPromote.php
+++ b/
maintenance/createAndPromote.php
@@
-63,15
+63,15
@@
class CreateAndPromote extends Maintenance {
$user = User::newFromName( $username );
if ( !is_object( $user ) ) {
$user = User::newFromName( $username );
if ( !is_object( $user ) ) {
- $this->
error( "invalid username.", true
);
+ $this->
fatalError( "invalid username."
);
}
$exists = ( 0 !== $user->idForName() );
if ( $exists && !$force ) {
}
$exists = ( 0 !== $user->idForName() );
if ( $exists && !$force ) {
- $this->
error( "Account exists. Perhaps you want the --force option?", true
);
+ $this->
fatalError( "Account exists. Perhaps you want the --force option?"
);
} elseif ( !$exists && !$password ) {
} elseif ( !$exists && !$password ) {
- $this->error( "Argument <password> required!"
, false
);
+ $this->error( "Argument <password> required!" );
$this->maybeHelp( true );
} elseif ( $exists ) {
$inGroups = $user->getGroups();
$this->maybeHelp( true );
} elseif ( $exists ) {
$inGroups = $user->getGroups();
@@
-133,7
+133,7
@@
class CreateAndPromote extends Maintenance {
$user->saveSettings();
}
} catch ( PasswordError $pwe ) {
$user->saveSettings();
}
} catch ( PasswordError $pwe ) {
- $this->
error( $pwe->getText(), true
);
+ $this->
fatalError( $pwe->getText()
);
}
}
}
}
@@
-150,5
+150,5
@@
class CreateAndPromote extends Maintenance {
}
}
}
}
-$maintClass =
"CreateAndPromote"
;
+$maintClass =
CreateAndPromote::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;