=== Configuration changes in 1.25 ===
* $wgPageShowWatchingUsers was removed.
+* $wgLocalVirtualHosts has been added to replace $wgConf->localVHosts.
=== New features in 1.25 ===
* (bug 58139) ResourceLoaderFileModule now supports language fallback
*/
$wgHTTPProxy = false;
+/**
+ * Local virtual hosts.
+ *
+ * This lists domains that are configured as virtual hosts on the same machine.
+ * If a request is to be made to a domain listed here, or any subdomain thereof,
+ * then no proxy will be used.
+ * Command-line scripts are not affected by this setting and will always use
+ * proxy if it is configured.
+ * @since 1.25
+ */
+$wgLocalVirtualHosts = array();
+
/**
* Timeout for connections done internally (in seconds)
* Only works for curl
* @return bool
*/
public static function isLocalURL( $url ) {
- global $wgCommandLineMode, $wgConf;
+ global $wgCommandLineMode, $wgLocalVirtualHosts, $wgConf;
if ( $wgCommandLineMode ) {
return false;
$host = $matches[1];
// Split up dotwise
$domainParts = explode( '.', $host );
- // Check if this domain or any superdomain is listed in $wgConf as a local virtual host
+ // Check if this domain or any superdomain is listed as a local virtual host
$domainParts = array_reverse( $domainParts );
$domain = '';
$domain = $domainPart . '.' . $domain;
}
- if ( $wgConf->isLocalVHost( $domain ) ) {
+ if ( in_array( $domain, $wgLocalVirtualHosts )
+ || $wgConf->isLocalVHost( $domain )
+ ) {
return true;
}
}
/**
* Array of domains that are local and can be handled by the same server
+ *
+ * @deprecated since 1.25; use $wgLocalVirtualHosts instead.
*/
public $localVHosts = array();
/**
* Returns true if the given vhost is handled locally.
+ *
+ * @deprecated since 1.25; check if the host is in $wgLocalVirtualHosts instead.
* @param string $vhost
* @return bool
*/