r71106 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71105‎ | r71106 | r71107 >
Date:09:28, 15 August 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed small issue that occurred for installs without any extensions
Modified paths:
  • /trunk/extensions/Deployment/includes/DistributionRepository.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Deployment/includes/DistributionRepository.php
@@ -146,14 +146,16 @@
147147
148148 $extensionParams = array();
149149
150 - foreach ( $extensions as $extensionName => $extensionVersion ) {
151 - $extensionParams[] = urlencode( $extensionName ) . ';' . urlencode( $extensionVersion );
 150+ if ( count( $extensions ) > 0 ) {
 151+ foreach ( $extensions as $extensionName => $extensionVersion ) {
 152+ $extensionParams[] = urlencode( $extensionName ) . ';' . urlencode( $extensionVersion );
 153+ }
 154+
 155+ $extensionParams = '&extensions=' . urlencode( implode( '|', $extensionParams ) );
152156 }
153 -
154 - $extensionParams = urlencode( implode( '|', $extensionParams ) );
155 -
 157+
156158 $response = Http::get(
157 - "$this->location?format=json&action=updates&mediawiki=$coreVersion&extensions=$extensionParams&state=$states",
 159+ "$this->location?format=json&action=updates&mediawiki=$coreVersion{$extensionParams}&state=$states",
158160 'default',
159161 array( 'sslVerifyHost' => true, 'sslVerifyCert' => true )
160162 );

Status & tagging log