X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdoMaintenance.php;h=4b9ad9c22d5adf31b41703e1d162358cac624be9;hb=4b983308cbd54b5e2f90d4fe05a4110c84608bcc;hp=e4380a7c4755c6a1a35f944dd02b4172989a07e7;hpb=c1fab2ba1ddffd689fc99a0651c3aa8e7dc4ac60;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index e4380a7c47..4b9ad9c22d 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -68,6 +68,7 @@ if ( file_exists( "$IP/StartProfiler.php" ) ) { // Some other requires require_once "$IP/includes/Defines.php"; require_once "$IP/includes/DefaultSettings.php"; +require_once "$IP/includes/GlobalFunctions.php"; # Load composer's autoloader if present if ( is_readable( "$IP/vendor/autoload.php" ) ) { @@ -91,29 +92,26 @@ if ( $maintenance->getDbType() === Maintenance::DB_NONE ) { } } -$maintenance->setConfig( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) ); $maintenance->finalSetup(); // Some last includes require_once "$IP/includes/Setup.php"; +// Initialize main config instance +$maintenance->setConfig( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) ); + // Do the work -try { - $maintenance->execute(); +$maintenance->execute(); - // Potentially debug globals - $maintenance->globals(); +// Potentially debug globals +$maintenance->globals(); - // Perform deferred updates. - DeferredUpdates::doUpdates( 'commit' ); +// Perform deferred updates. +DeferredUpdates::doUpdates( 'commit' ); - // log profiling info - wfLogProfilingData(); +// log profiling info +wfLogProfilingData(); - // Commit and close up! - $factory = wfGetLBFactory(); - $factory->commitMasterChanges(); - $factory->shutdown(); -} catch ( MWException $mwe ) { - echo $mwe->getText(); - exit( 1 ); -} +// Commit and close up! +$factory = wfGetLBFactory(); +$factory->commitMasterChanges(); +$factory->shutdown();