r89679 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89678‎ | r89679 | r89680 >
Date:19:24, 7 June 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/phase3/includes/installer (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/Installer.php (modified) (history)
  • /branches/REL1_17/phase3/includes/installer/WebInstallerPage.php (modified) (history)
  • /branches/REL1_17/phase3/maintenance/install.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/maintenance/install.php
@@ -27,6 +27,7 @@
2828 }
2929
3030 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
 31+define( 'MEDIAWIKI_INSTALL', true );
3132
3233 require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" );
3334
Property changes on: branches/REL1_17/phase3/maintenance/install.php
___________________________________________________________________
Modified: svn:mergeinfo
3435 Merged /trunk/phase3/maintenance/install.php:r89529
Index: branches/REL1_17/phase3/includes/installer/DatabaseUpdater.php
@@ -66,6 +66,7 @@
6767 $this->maintenance = new FakeMaintenance;
6868 }
6969 $this->initOldGlobals();
 70+ $this->loadExtensions();
7071 wfRunHooks( 'LoadExtensionSchemaUpdates', array( $this ) );
7172 }
7273
@@ -88,7 +89,25 @@
8990 }
9091
9192 /**
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+ /**
93112 * @throws MWException
94113 * @param DatabaseBase $db
95114 * @param bool $shared
Index: branches/REL1_17/phase3/includes/installer/Installer.php
@@ -453,7 +453,7 @@
454454 *
455455 * @return Array
456456 */
457 - public function getExistingLocalSettings() {
 457+ public static function getExistingLocalSettings() {
458458 global $IP;
459459
460460 wfSuppressWarnings();
Property changes on: branches/REL1_17/phase3/includes/installer/Installer.php
___________________________________________________________________
Modified: svn:mergeinfo
461461 Merged /trunk/phase3/includes/installer/Installer.php:r89529
Index: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php
@@ -219,7 +219,7 @@
220220 class WebInstaller_ExistingWiki extends WebInstallerPage {
221221 public function execute() {
222222 // If there is no LocalSettings.php, continue to the installer welcome page
223 - $vars = $this->parent->getExistingLocalSettings();
 223+ $vars = Installer::getExistingLocalSettings();
224224 if ( !$vars ) {
225225 return 'skip';
226226 }
Property changes on: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php
___________________________________________________________________
Modified: svn:mergeinfo
227227 Merged /trunk/phase3/includes/installer/WebInstallerPage.php:r89529
Property changes on: branches/REL1_17/phase3/includes/installer
___________________________________________________________________
Modified: svn:mergeinfo
228228 Merged /trunk/phase3/includes/installer:r89529

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89529Follow-up r89254 and r89481: re-did loading extension updates properly, now u...maxsem19:52, 5 June 2011
r89532Followup r89529...reedy21:03, 5 June 2011

Comments

#Comment by Freakolowsky (talk | contribs)   14:30, 22 June 2011

Can somone check line 102 in DatabaseUpdater.php. Not sure, but i think it should be || instead of &&.

Works in trunk but in branch/REL1_17 i get a notice (missing index) on line 106.

Status & tagging log