Merge "Stop using SiteConfiguration::isLocalVHost()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 16 Feb 2016 23:19:38 +0000 (23:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 16 Feb 2016 23:19:38 +0000 (23:19 +0000)
1  2 
includes/HttpFunctions.php

@@@ -95,7 -95,7 +95,7 @@@ class Http 
         * @param string $url
         * @param array $options
         * @param string $caller The method making this request, for profiling
 -       * @return string
 +       * @return string|bool false on error
         */
        public static function get( $url, $options = array(), $caller = __METHOD__ ) {
                $args = func_get_args();
         * @param string $url
         * @param array $options
         * @param string $caller The method making this request, for profiling
 -       * @return string
 +       * @return string|bool false on error
         */
        public static function post( $url, $options = array(), $caller = __METHOD__ ) {
                return Http::request( 'POST', $url, $options, $caller );
         * @return bool
         */
        public static function isLocalURL( $url ) {
-               global $wgCommandLineMode, $wgLocalVirtualHosts, $wgConf;
+               global $wgCommandLineMode, $wgLocalVirtualHosts;
  
                if ( $wgCommandLineMode ) {
                        return false;
                                        $domain = $domainPart . '.' . $domain;
                                }
  
-                               if ( in_array( $domain, $wgLocalVirtualHosts )
-                                       || $wgConf->isLocalVHost( $domain )
-                               ) {
+                               if ( in_array( $domain, $wgLocalVirtualHosts ) ) {
                                        return true;
                                }
                        }
@@@ -818,7 -816,7 +816,7 @@@ class CurlHttpRequest extends MWHttpReq
                        MediaWiki\suppressWarnings();
                        if ( !curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
                                wfDebug( __METHOD__ . ": Couldn't set CURLOPT_FOLLOWLOCATION. " .
 -                                      "Probably safe_mode or open_basedir is set.\n" );
 +                                      "Probably open_basedir is set.\n" );
                                // Continue the processing. If it were in curl_setopt_array,
                                // processing would have halted on its entry
                        }
                }
  
                if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
 -                      if ( strval( ini_get( 'open_basedir' ) ) !== '' || wfIniGetBool( 'safe_mode' ) ) {
 -                              wfDebug( "Cannot follow redirects in safe mode\n" );
 +                      if ( strval( ini_get( 'open_basedir' ) ) !== '' ) {
 +                              wfDebug( "Cannot follow redirects when open_basedir is set\n" );
                                return false;
                        }
                }