]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - includes/HttpFunctions.php
MediaWiki 1.17.1
[autoinstalls/mediawiki.git] / includes / HttpFunctions.php
index e612442663686bd67678ddaf0639594a839a2f69..3d4d77a9253e62fae65a6d362d79de19e85ffb1a 100644 (file)
@@ -199,6 +199,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