summaryrefslogtreecommitdiff
path: root/includes/HttpFunctions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/HttpFunctions.php')
-rw-r--r--includes/HttpFunctions.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index e6124426..3d4d77a9 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -200,6 +200,15 @@ class MWHttpRequest {
}
/**
+ * Simple function to test if we can make any sort of requests at all, using
+ * cURL or fopen()
+ * @return bool
+ */
+ public static function canMakeRequests() {
+ return function_exists( 'curl_init' ) || wfIniGetBool( 'allow_url_fopen' );
+ }
+
+ /**
* Generate a new request object
* @see MWHttpRequest::__construct
*/