From: Tim Starling Date: Sun, 26 Jun 2005 06:34:13 +0000 (+0000) Subject: Made a SiteConfiguration object generally available. Added functions for performing... X-Git-Tag: 1.5.0beta1~10 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=bf452fdc633917f3ee85a63b99fc09068b150d09;p=lhc%2Fweb%2Fwiklou.git Made a SiteConfiguration object generally available. Added functions for performing an HTTP client request using curl. This will be used in the SpamBlacklist extension, and hopefully Lucene as well. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7418a9deb7..f0d0cd2ecd 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -17,6 +17,13 @@ if( !defined( 'MEDIAWIKI' ) ) { die( "This file is part of MediaWiki and is not a valid entry point\n" ); } +/** + * Create a site configuration object + * Not used for much in a default install + */ +require_once( 'includes/SiteConfiguration.php' ); +$wgConf = new SiteConfiguration; + /** MediaWiki version number */ $wgVersion = '1.5beta1'; @@ -1540,5 +1547,9 @@ $wgTrustedMediaFormats= array( */ $wgAllowSpecialInclusion = true; +/** + * Timeout for HTTP requests done via CURL + */ +$wgHTTPTimeout = 3; ?> diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php new file mode 100644 index 0000000000..2daa3acf08 --- /dev/null +++ b/includes/HttpFunctions.php @@ -0,0 +1,63 @@ +isLocalVHost( $domain ) ) { + return true; + } + } + } + return false; +} + +?> diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index 1abe48d8e9..c7c78a6157 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -1,8 +1,6 @@ settings[$setting] ) ) { @@ -92,6 +93,10 @@ class SiteConfiguration { } return array( $site, $lang ); } + + function isLocalVHost( $vhost ) { + return in_array( $vhost, $this->localVHosts ); + } } }