maintenance: Allow having a nicer error message if an extension isn't enabled
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 28 Jul 2016 21:44:06 +0000 (14:44 -0700)
committerReedy <reedy@wikimedia.org>
Sat, 30 Jul 2016 10:38:51 +0000 (10:38 +0000)
commit4de667f3c2dd2fea0f246a313a9ed848a793ed2f
tree45b41d53bdff1c30c2c064f9f540aa8ae65acec3
parent277a233fc63a8802864e7feb1337f7864b43968c
maintenance: Allow having a nicer error message if an extension isn't enabled

Maintenance scripts can be invoked regardless of whether an extension is
enabled on a wiki or not. On wiki farms where some wikis may have an
extension or not, this can potentially be rather confusing. Especially
when the script bails out with a fatal class missing error or a database
table missing.

This allows maintenance scripts to specify that they require an
extension by calling:
 $this->requireExtension( 'ExtensionName' );
in the script's constructor.

Bug: T141531
Change-Id: Icfbf063bb9c9ac9e55c3a5a8ed815528a2c1ce1e
RELEASE-NOTES-1.28
maintenance/Maintenance.php
maintenance/doMaintenance.php