r92673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92672‎ | r92673 | r92674 >
Date:20:12, 20 July 2011
Author:skizzerz
Status:resolved (Comments)
Tags:
Comment:
* $wgDnsBlacklistUrls now accepts an array with url and key as the elements to work with DNSBLs that require keys, such as Project Honeypot.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -15,6 +15,9 @@
1616 === New features in 1.19 ===
1717 * (bug 19838) Possibility to get all interwiki prefixes if the interwiki
1818 cache is used.
 19+* $wgDnsBlacklistUrls now accepts an array with url and key as the
 20+ elements to work with DNSBLs that require keys, such as
 21+ Project Honeypot.
1922
2023 === Bug fixes in 1.19 ===
2124 * $wgUploadNavigationUrl should be used for file redlinks if
Index: trunk/phase3/includes/User.php
@@ -1339,7 +1339,17 @@
13401340
13411341 foreach( (array)$bases as $base ) {
13421342 # Make hostname
1343 - $host = "$ipReversed.$base";
 1343+ # If we have an access key, use that too (ProjectHoneypot, etc.)
 1344+ if( is_array( $base ) ) {
 1345+ if( count( $base ) >= 2 ) {
 1346+ # Access key is 1, base URL is 0
 1347+ $host = "{$base[1]}.$ipReversed.{$base[0]}";
 1348+ } else {
 1349+ $host = "$ipReversed.{$base[0]}";
 1350+ }
 1351+ } else {
 1352+ $host = "$ipReversed.$base";
 1353+ }
13441354
13451355 # Send query
13461356 $ipList = gethostbynamel( $host );

Follow-up revisions

RevisionCommit summaryAuthorDate
r94488* Follow-up r92673: add documentation on how to use $wgDnsBlacklistUrls to De...skizzerz05:12, 15 August 2011

Comments

#Comment by 😂 (talk | contribs)   23:18, 2 August 2011

Should update the docs in DefaultSettings.

#Comment by Skizzerz (talk | contribs)   23:45, 2 August 2011

The docs in DefaultSettings don't have usage information or any mention of syntax, which is why I didn't.

#Comment by 😂 (talk | contribs)   12:46, 8 August 2011

Well then this is a perfect time to add said docs :)

Status & tagging log