[JobQueue] Made the maximum number of job attempts configurable.
[lhc/web/wiklou.git] / includes / HttpFunctions.php
index 337beb4..6a348a6 100644 (file)
@@ -244,7 +244,7 @@ class MWHttpRequest {
                }
 
                $members = array( "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
-                                 "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" );
+                               "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" );
 
                foreach ( $members as $o ) {
                        if ( isset( $options[$o] ) ) {
@@ -284,7 +284,7 @@ class MWHttpRequest {
                        Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
                } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
                        throw new MWException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
-                                                                  ' Http::$httpEngine is set to "curl"' );
+                               ' Http::$httpEngine is set to "curl"' );
                }
 
                switch( Http::$httpEngine ) {
@@ -338,7 +338,7 @@ class MWHttpRequest {
                if ( Http::isLocalURL( $this->url ) || $this->noProxy ) {
                        $this->proxy = '';
                } elseif ( $wgHTTPProxy ) {
-                       $this->proxy = $wgHTTPProxy ;
+                       $this->proxy = $wgHTTPProxy;
                } elseif ( getenv( "http_proxy" ) ) {
                        $this->proxy = getenv( "http_proxy" );
                }
@@ -646,12 +646,12 @@ class MWHttpRequest {
                        $locations = $headers[ 'location' ];
                        $domain = '';
                        $foundRelativeURI = false;
-                       $countLocations = count($locations);
+                       $countLocations = count( $locations );
 
                        for ( $i = $countLocations - 1; $i >= 0; $i-- ) {
                                $url = parse_url( $locations[ $i ] );
 
-                               if ( isset($url[ 'host' ]) ) {
+                               if ( isset( $url['host'] ) ) {
                                        $domain = $url[ 'scheme' ] . '://' . $url[ 'host' ];
                                        break;  //found correct URI (with host)
                                } else {