https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106354
Revision: 106354
Author: reedy
Date: 2011-12-15 18:57:53 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
* (bug 33101) Viewing a User or User talk of username resembling IP ending
with .xxx causes Internal error
Patch by Brad Jorsch
Also simplify double return null in method
Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES-1.19
trunk/phase3/includes/Block.php
Modified: trunk/phase3/RELEASE-NOTES-1.19
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.19 2011-12-15 18:51:59 UTC (rev 106353)
+++ trunk/phase3/RELEASE-NOTES-1.19 2011-12-15 18:57:53 UTC (rev 106354)
@@ -183,6 +183,8 @@
* (bug 32960) Remove EmailAuthenticationTimestamp from database when a
email address is removed.
* (bug 32414) Empty page get a empty bytes attribute in Export/Dump.
+* (bug 33101) Viewing a User or User talk of username resembling IP ending
+ with .xxx causes Internal error
=== API changes in 1.19 ===
* (bug 19838) siprop=interwikimap can now use the interwiki cache.
Modified: trunk/phase3/includes/Block.php
===================================================================
--- trunk/phase3/includes/Block.php 2011-12-15 18:51:59 UTC (rev 106353)
+++ trunk/phase3/includes/Block.php 2011-12-15 18:57:53 UTC (rev 106354)
@@ -430,7 +430,7 @@
$row = $this->getDatabaseArray();
$row['ipb_id'] = $dbw->nextSequenceValue("ipblocks_ipb_id_seq");
-
+
$dbw->insert(
'ipblocks',
$row,
@@ -969,7 +969,7 @@
*/
public static function formatExpiry( $encoded_expiry ) {
wfDeprecated( __METHOD__, '1.18' );
-
+
global $wgContLang;
static $msg = null;
@@ -1039,7 +1039,7 @@
# passed by some callers (bug 29116)
return null;
- } elseif( in_array( $type, array( Block::TYPE_USER,
Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {
+ } elseif( in_array( $type, array( Block::TYPE_USER,
Block::TYPE_IP, Block::TYPE_RANGE ) ) ) {
$block = new Block();
$block->fromMaster( $fromMaster );
@@ -1049,12 +1049,9 @@
if( $block->newLoad( $vagueTarget ) ){
return $block;
- } else {
- return null;
}
- } else {
- return null;
}
+ return null;
}
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs