From 83ff1577b70b90bef3d50180f66310762d6fe985 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 6 Jul 2010 21:34:20 +0000 Subject: [PATCH] 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. --- includes/installer/Installer.php | 2 +- includes/installer/WebInstaller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 4124028ddd..9ab53fa747 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -844,7 +844,7 @@ abstract class Installer { $dh = opendir( $dir ); while ( ( $file = readdir( $dh ) ) !== false ) { if( file_exists( "$dir/$file/$file.php" ) ) { - $exts[] = $file; + $exts[$file] = null; } } $this->setVar( '_Extensions', $exts ); diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index c5bc3dd855..ff6609ae8f 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -1387,7 +1387,7 @@ class WebInstaller_Options extends WebInstallerPage { $extensions = $this->parent->findExtensions(); if( $extensions ) { $extHtml = $this->parent->getFieldsetStart( 'config-extensions' ); - foreach( $extensions as $ext ) { + foreach( array_keys($extensions) as $ext ) { $extHtml .= $this->parent->getCheckBox( array( 'var' => "ext-$ext", 'rawtext' => $ext, -- 2.20.1