// Custom setup for Maintenance entry point
if ( !defined( 'MW_SETUP_CALLBACK' ) ) {
+
function wfMaintenanceSetup() {
// phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
global $maintenance, $wgLocalisationCacheConf, $wgCacheDirectory;
$maintenance->finalSetup();
}
+
define( 'MW_SETUP_CALLBACK', 'wfMaintenanceSetup' );
}
// This avoids having long running scripts just OOM and lose all the updates.
$maintenance->setAgentAndTriggers();
+$maintenance->validateParamsAndArgs();
+
// Do the work
$success = $maintenance->execute();