Index: branches/REL1_17/phase3/maintenance/install.php |
— | — | @@ -27,6 +27,7 @@ |
28 | 28 | } |
29 | 29 | |
30 | 30 | define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); |
| 31 | +define( 'MEDIAWIKI_INSTALL', true ); |
31 | 32 | |
32 | 33 | require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" ); |
33 | 34 | |
Property changes on: branches/REL1_17/phase3/maintenance/install.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
34 | 35 | Merged /trunk/phase3/maintenance/install.php:r89529 |
Index: branches/REL1_17/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -66,6 +66,7 @@ |
67 | 67 | $this->maintenance = new FakeMaintenance; |
68 | 68 | } |
69 | 69 | $this->initOldGlobals(); |
| 70 | + $this->loadExtensions(); |
70 | 71 | wfRunHooks( 'LoadExtensionSchemaUpdates', array( $this ) ); |
71 | 72 | } |
72 | 73 | |
— | — | @@ -88,7 +89,25 @@ |
89 | 90 | } |
90 | 91 | |
91 | 92 | /** |
92 | | - * @static |
| 93 | + * Loads LocalSettings.php, if needed, and initialises everything needed for LoadExtensionSchemaUpdates hook |
| 94 | + */ |
| 95 | + private function loadExtensions() { |
| 96 | + if ( !defined( 'MEDIAWIKI_INSTALL' ) ) { |
| 97 | + return; // already loaded |
| 98 | + } |
| 99 | + $vars = Installer::getExistingLocalSettings(); |
| 100 | + if ( !$vars ) { |
| 101 | + return; // no LocalSettings found |
| 102 | + } |
| 103 | + if ( !isset( $vars['wgHooks'] ) && !isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { |
| 104 | + return; |
| 105 | + } |
| 106 | + global $wgHooks, $wgAutoloadClasses; |
| 107 | + $wgHooks['LoadExtensionSchemaUpdates'] = $vars['wgHooks']['LoadExtensionSchemaUpdates']; |
| 108 | + $wgAutoloadClasses = $wgAutoloadClasses + $vars['wgAutoloadClasses']; |
| 109 | + } |
| 110 | + |
| 111 | + /** |
93 | 112 | * @throws MWException |
94 | 113 | * @param DatabaseBase $db |
95 | 114 | * @param bool $shared |
Index: branches/REL1_17/phase3/includes/installer/Installer.php |
— | — | @@ -453,7 +453,7 @@ |
454 | 454 | * |
455 | 455 | * @return Array |
456 | 456 | */ |
457 | | - public function getExistingLocalSettings() { |
| 457 | + public static function getExistingLocalSettings() { |
458 | 458 | global $IP; |
459 | 459 | |
460 | 460 | wfSuppressWarnings(); |
Property changes on: branches/REL1_17/phase3/includes/installer/Installer.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
461 | 461 | Merged /trunk/phase3/includes/installer/Installer.php:r89529 |
Index: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | class WebInstaller_ExistingWiki extends WebInstallerPage { |
221 | 221 | public function execute() { |
222 | 222 | // If there is no LocalSettings.php, continue to the installer welcome page |
223 | | - $vars = $this->parent->getExistingLocalSettings(); |
| 223 | + $vars = Installer::getExistingLocalSettings(); |
224 | 224 | if ( !$vars ) { |
225 | 225 | return 'skip'; |
226 | 226 | } |
Property changes on: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
227 | 227 | Merged /trunk/phase3/includes/installer/WebInstallerPage.php:r89529 |
Property changes on: branches/REL1_17/phase3/includes/installer |
___________________________________________________________________ |
Modified: svn:mergeinfo |
228 | 228 | Merged /trunk/phase3/includes/installer:r89529 |