From: Ryan Schmidt Date: Wed, 20 Jul 2011 20:12:48 +0000 (+0000) Subject: * $wgDnsBlacklistUrls now accepts an array with url and key as the elements to work... X-Git-Tag: 1.31.0-rc.0~28713 X-Git-Url: http://git.cyclocoop.org/data/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=a9a452980b7c719af308107884e483b9aa47ab92;p=lhc%2Fweb%2Fwiklou.git * $wgDnsBlacklistUrls now accepts an array with url and key as the elements to work with DNSBLs that require keys, such as Project Honeypot. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 5efd328487..287c08456d 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -15,6 +15,9 @@ production. === New features in 1.19 === * (bug 19838) Possibility to get all interwiki prefixes if the interwiki cache is used. +* $wgDnsBlacklistUrls now accepts an array with url and key as the + elements to work with DNSBLs that require keys, such as + Project Honeypot. === Bug fixes in 1.19 === * $wgUploadNavigationUrl should be used for file redlinks if diff --git a/includes/User.php b/includes/User.php index 3d273c4c0c..b011be446f 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1339,7 +1339,17 @@ class User { foreach( (array)$bases as $base ) { # Make hostname - $host = "$ipReversed.$base"; + # If we have an access key, use that too (ProjectHoneypot, etc.) + if( is_array( $base ) ) { + if( count( $base ) >= 2 ) { + # Access key is 1, base URL is 0 + $host = "{$base[1]}.$ipReversed.{$base[0]}"; + } else { + $host = "$ipReversed.{$base[0]}"; + } + } else { + $host = "$ipReversed.$base"; + } # Send query $ipList = gethostbynamel( $host );