summaryrefslogtreecommitdiff
path: root/maintenance/doMaintenance.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /maintenance/doMaintenance.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'maintenance/doMaintenance.php')
-rw-r--r--maintenance/doMaintenance.php36
1 files changed, 17 insertions, 19 deletions
diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php
index 46844c9d..4b9ad9c2 100644
--- a/maintenance/doMaintenance.php
+++ b/maintenance/doMaintenance.php
@@ -56,8 +56,8 @@ $self = $maintenance->getName();
# Start the autoloader, so that extensions can derive classes from core files
require_once "$IP/includes/AutoLoader.php";
-# Stub the profiler
-require_once "$IP/includes/profiler/Profiler.php";
+# Grab profiling functions
+require_once "$IP/includes/profiler/ProfilerFunctions.php";
# Start the profiler
$wgProfiler = array();
@@ -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();