30require_once __DIR__ .
'/Maintenance.php';
42 parent::__construct();
45 $this->
addOption(
'tag',
'Tag to add',
true,
true );
46 $this->
addOption(
'reason',
'Reason for adding the tag',
true,
true );
50 $user = User::newSystemUser( User::MAINTENANCE_SCRIPT_USER, [
'steal' =>
true ] );
60 if ( !$status->isGood() ) {
64 $this->
output(
"$tag was created.\n" );
70require_once RUN_MAINTENANCE_IF_MAIN;
Adds a change tag to the wiki.
__construct()
Default constructor.
execute()
Do the actual work.
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
output( $out, $channel=null)
Throw some output to the user.
fatalError( $msg, $exitCode=1)
Output a message and terminate the current script.
addOption( $name, $description, $required=false, $withArg=false, $shortName=false, $multiOccurrence=false)
Add a parameter to the script.
getOption( $name, $default=null)
Get an option, or return the default.
addDescription( $text)
Set the description text.