r69115 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69114‎ | r69115 | r69116 >
Date:21:34, 6 July 2010
Author:avar
Status:ok
Tags:
Comment:
new-installer: Make findExtensions() return a key-value array

Now we return e.g.:

array( 'Cite', 'LiquidThreads' );

Instead return:

array(
'Cite' => null,
'LiquidThreads' => $some_config
);

Where $some_config is a yet-to-be determined configuration. It's
intended for e.g. sourcing SQL tables that the extension needs.
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/WebInstaller.php
@@ -1387,7 +1387,7 @@
13881388 $extensions = $this->parent->findExtensions();
13891389 if( $extensions ) {
13901390 $extHtml = $this->parent->getFieldsetStart( 'config-extensions' );
1391 - foreach( $extensions as $ext ) {
 1391+ foreach( array_keys($extensions) as $ext ) {
13921392 $extHtml .= $this->parent->getCheckBox( array(
13931393 'var' => "ext-$ext",
13941394 'rawtext' => $ext,
Index: trunk/phase3/includes/installer/Installer.php
@@ -844,7 +844,7 @@
845845 $dh = opendir( $dir );
846846 while ( ( $file = readdir( $dh ) ) !== false ) {
847847 if( file_exists( "$dir/$file/$file.php" ) ) {
848 - $exts[] = $file;
 848+ $exts[$file] = null;
849849 }
850850 }
851851 $this->setVar( '_Extensions', $exts );

Status & tagging log