Allow classes to be registered properly from installer
authorChad Horohoe <chadh@wikimedia.org>
Wed, 2 Jul 2014 22:40:49 +0000 (15:40 -0700)
committerLegoktm <legoktm.wikipedia@gmail.com>
Fri, 1 Aug 2014 20:49:54 +0000 (20:49 +0000)
Because otherwise extensions can cause the installer to explode when
they can't find their own classes at entry point.

I feel dirty.

Bug: 67440
Change-Id: I235fe58125fd49319963d949faffe024684755bd

includes/installer/Installer.php

index 28304c2..7d77416 100644 (file)
@@ -529,6 +529,13 @@ abstract class Installer {
        public static function getExistingLocalSettings() {
                global $IP;
 
+               // You might be wondering why this is here. Well if you don't do this
+               // then some poorly-formed extensions try to call their own classes
+               // after immediately registering them. We really need to get extension
+               // registration out of the global scope and into a real format.
+               // @see https://bugzilla.wikimedia.org/67440
+               global $wgAutoloadClasses;
+
                wfSuppressWarnings();
                $_lsExists = file_exists( "$IP/LocalSettings.php" );
                wfRestoreWarnings();