From dd4a197e0f0da283ef40cc08b0808e586fcf7294 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 1 May 2013 07:20:10 +0100 Subject: [PATCH] MDL-39207 badges: don't use curl version depedent constant It seems that CURLOPT_CONNECTTIMEOUT_MS is depdendent on the version of curl compiled against. We don't need milliseconds here anyway, so switch to the seconds value. --- badges/lib/backpacklib.php | 2 +- lib/badgeslib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/badges/lib/backpacklib.php b/badges/lib/backpacklib.php index 3cc9f88e659..58a9b745e50 100644 --- a/badges/lib/backpacklib.php +++ b/badges/lib/backpacklib.php @@ -64,7 +64,7 @@ class OpenBadgesBackpackHandler { 'RETURNTRANSFER' => true, 'FORBID_REUSE' => true, 'HEADER' => 0, - 'CONNECTTIMEOUT_MS' => 3000, + 'CONNECTTIMEOUT' => 3, ); if ($action == 'user') { diff --git a/lib/badgeslib.php b/lib/badgeslib.php index 3713f94590f..194a0c76ed8 100644 --- a/lib/badgeslib.php +++ b/lib/badgeslib.php @@ -1279,7 +1279,7 @@ function badges_check_backpack_accessibility() { 'FRESH_CONNECT' => true, 'RETURNTRANSFER' => true, 'HEADER' => 0, - 'CONNECTTIMEOUT_MS' => 2000, + 'CONNECTTIMEOUT' => 2, ); $location = 'http://backpack.openbadges.org/baker'; $out = $curl->get($location, array('assertion' => $fakeassertion->out(false)), $options);