X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FaddSite.php;h=7bc292ec9048eae17d289f7309895960915873c8;hb=82ffec0c97354a7694eb1758ef943f312ed64f0e;hp=1ebc4f6643814ff4d673ee1471e39c1e8d9885ff;hpb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/addSite.php b/maintenance/addSite.php index 1ebc4f6643..7bc292ec90 100644 --- a/maintenance/addSite.php +++ b/maintenance/addSite.php @@ -21,13 +21,13 @@ class AddSite extends Maintenance { $this->addArg( 'globalid', 'The global id of the site to add, e.g. "wikipedia".', true ); $this->addArg( 'group', 'In which group this site should be sorted in.', true ); - $this->addOption( 'language', 'The language code of the site, e.g. "de".' ); - $this->addOption( 'interwiki-id', 'The interwiki ID of the site.' ); - $this->addOption( 'navigation-id', 'The navigation ID of the site.' ); + $this->addOption( 'language', 'The language code of the site, e.g. "de".', false, true ); + $this->addOption( 'interwiki-id', 'The interwiki ID of the site.', false, true ); + $this->addOption( 'navigation-id', 'The navigation ID of the site.', false, true ); $this->addOption( 'pagepath', 'The URL to pages of this site, e.g.' . - ' https://example.com/wiki/\$1.' ); - $this->addOption( 'filepath', 'The URL to files of this site, e.g. https://example - .com/w/\$1.' ); + ' https://example.com/wiki/\$1.', false, true ); + $this->addOption( 'filepath', 'The URL to files of this site, e.g. https://example' . + '.com/w/\$1.', false, true ); parent::__construct(); } @@ -35,6 +35,7 @@ class AddSite extends Maintenance { /** * Imports the site described by the parameters (see self::__construct()) passed to this * maintenance sccript into the sites table of MediaWiki. + * @return bool */ public function execute() { $siteStore = MediaWikiServices::getInstance()->getSiteStore(); @@ -87,5 +88,5 @@ class AddSite extends Maintenance { } } -$maintClass = 'AddSite'; +$maintClass = AddSite::class; require_once RUN_MAINTENANCE_IF_MAIN;