r69330 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69329‎ | r69330 | r69331 >
Date:15:12, 14 July 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added handling for Oracle; ensured that Http::get() doesn't follow redirects
Modified paths:
  • /trunk/extensions/ExternalData/ED_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExternalData/ED_Utils.php
@@ -138,6 +138,8 @@
139139 $db = new DatabasePostgres( $db_server, $db_username, $db_password, $db_name );
140140 } elseif ( $db_type == "mssql" ) {
141141 $db = new DatabaseMssql( $db_server, $db_username, $db_password, $db_name );
 142+ } elseif ( $db_type == "oracle" ) {
 143+ $db = new DatabaseOracle( $db_server, $db_username, $db_password, $db_name );
142144 } else {
143145 echo ( wfMsgExt( "externaldata-db-unknown-type", array( 'parse', 'escape' ) ) );
144146 return;
@@ -296,7 +298,7 @@
297299
298300 if ( !isset( $edgCacheTable ) || is_null( $edgCacheTable ) ) {
299301 if ( $edgAllowSSL ) {
300 - return Http::get( $url, 'default', array( CURLOPT_SSL_VERIFYPEER => false ) );
 302+ return Http::get( $url, 'default', array( CURLOPT_SSL_VERIFYPEER => false, 'followRedirects' => false ) );
301303 } else {
302304 return Http::get( $url );
303305 }

Status & tagging log