| @@ 40-48 (lines=9) @@ | ||
| 37 | */ |
|
| 38 | class DeleteBatch extends Maintenance { |
|
| 39 | ||
| 40 | public function __construct() { |
|
| 41 | parent::__construct(); |
|
| 42 | $this->addDescription( 'Deletes a batch of pages' ); |
|
| 43 | $this->addOption( 'u', "User to perform deletion", false, true ); |
|
| 44 | $this->addOption( 'r', "Reason to delete page", false, true ); |
|
| 45 | $this->addOption( 'i', "Interval to sleep between deletions" ); |
|
| 46 | $this->addArg( 'listfile', 'File with titles to delete, separated by newlines. ' . |
|
| 47 | 'If not given, stdin will be used.', false ); |
|
| 48 | } |
|
| 49 | ||
| 50 | public function execute() { |
|
| 51 | global $wgUser; |
|
| @@ 36-46 (lines=11) @@ | ||
| 33 | * @ingroup Maintenance |
|
| 34 | */ |
|
| 35 | class GenerateJsonI18n extends Maintenance { |
|
| 36 | public function __construct() { |
|
| 37 | parent::__construct(); |
|
| 38 | $this->addDescription( 'Build JSON messages files from a PHP messages file' ); |
|
| 39 | ||
| 40 | $this->addArg( 'phpfile', 'PHP file defining a $messages array', false ); |
|
| 41 | $this->addArg( 'jsondir', 'Directory to write JSON files to', false ); |
|
| 42 | $this->addOption( 'extension', 'Perform default conversion on an extension', |
|
| 43 | false, true ); |
|
| 44 | $this->addOption( 'supplementary', 'Find supplementary i18n files in subdirs and convert those', |
|
| 45 | false, false ); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function execute() { |
|
| 49 | global $IP; |
|
| @@ 46-54 (lines=9) @@ | ||
| 43 | * @ingroup Maintenance |
|
| 44 | */ |
|
| 45 | class MoveBatch extends Maintenance { |
|
| 46 | public function __construct() { |
|
| 47 | parent::__construct(); |
|
| 48 | $this->addDescription( 'Moves a batch of pages' ); |
|
| 49 | $this->addOption( 'u', "User to perform move", false, true ); |
|
| 50 | $this->addOption( 'r', "Reason to move page", false, true ); |
|
| 51 | $this->addOption( 'i', "Interval to sleep between moves" ); |
|
| 52 | $this->addOption( 'noredirects', "Suppress creation of redirects" ); |
|
| 53 | $this->addArg( 'listfile', 'List of pages to move, newline delimited', false ); |
|
| 54 | } |
|
| 55 | ||
| 56 | public function execute() { |
|
| 57 | global $wgUser; |
|