r84896 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84895‎ | r84896 | r84897 >
Date:04:35, 28 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
Don't require recent curl, WMF doesn't have it.
Modified paths:
  • /branches/wmf/1.17wmf1/includes/objectcache/EhcacheBagOStuff.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/objectcache/EhcacheBagOStuff.php
@@ -11,9 +11,6 @@
1212 var $curls = array();
1313
1414 function __construct( $params ) {
15 - if ( !defined( 'CURLOPT_TIMEOUT_MS' ) ) {
16 - throw new MWException( __CLASS__.' requires curl version 7.16.2 or later.' );
17 - }
1815 if ( !extension_loaded( 'zlib' ) ) {
1916 throw new MWException( __CLASS__.' requires the zlib extension' );
2017 }
@@ -34,6 +31,11 @@
3532 CURLOPT_POSTFIELDS => '',
3633 CURLOPT_HTTPHEADER => array(),
3734 );
 35+ if ( defined( 'CURLOPT_TIMEOUT_MS' ) ) {
 36+ $this->curlOptions[CURLOPT_TIMEOUT_MS] = intval( $this->timeout * 1000 );
 37+ } else {
 38+ $this->curlOptions[CURLOPT_TIMEOUT] = ceil( $this->timeout );
 39+ }
3840 }
3941
4042 public function get( $key ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r84897Minor fix for r84896tstarling04:43, 28 March 2011

Status & tagging log