Wikia code/includes/HttpFunctions.php

From mediawiki.org
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\HttpFunctions.php	2011-07-18 22:31:28.250976600 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\HttpFunctions.php	2011-08-17 15:28:46.609375000 +0100
@@ -37,6 +37,13 @@
 		if ( $status->isOK() ) {
 			return $req->getContent();
 		} else {
+			/* Wikia change - beg (Sean) */
+			//$errMsg = "Error getting page with Http class.\n";
+			//$errMsg .= "Requested URL was: " . $req->getFinalUrl() . "\n";
+			//$errMsg .= "Errors were: \n";
+			//$errMsg .= print_r($req->status->errors, true);
+			//trigger_error($errMsg, E_USER_WARNING);
+			/* Wikia change - end (Sean) */
 			return false;
 		}
 	}
@@ -169,6 +177,12 @@
 
 		$members = array( "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
 						  "method", "followRedirects", "maxRedirects" );
+
+		// Wikia change - @author: wladek - begin
+		// allow overriding of curl options
+		$members[] = "curlOptions";
+		// Wikia change - end
+
 		foreach ( $members as $o ) {
 			if ( isset($options[$o]) ) {
 				$this->$o = $options[$o];