r106354 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106353‎ | r106354 | r106355 >
Date:18:57, 15 December 2011
Author:reedy
Status:ok
Tags:
Comment:
* (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 (modified) (history)
  • /trunk/phase3/includes/Block.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -183,6 +183,8 @@
184184 * (bug 32960) Remove EmailAuthenticationTimestamp from database when a
185185 email address is removed.
186186 * (bug 32414) Empty page get a empty bytes attribute in Export/Dump.
 187+* (bug 33101) Viewing a User or User talk of username resembling IP ending
 188+ with .xxx causes Internal error
187189
188190 === API changes in 1.19 ===
189191 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/Block.php
@@ -430,7 +430,7 @@
431431
432432 $row = $this->getDatabaseArray();
433433 $row['ipb_id'] = $dbw->nextSequenceValue("ipblocks_ipb_id_seq");
434 -
 434+
435435 $dbw->insert(
436436 'ipblocks',
437437 $row,
@@ -969,7 +969,7 @@
970970 */
971971 public static function formatExpiry( $encoded_expiry ) {
972972 wfDeprecated( __METHOD__, '1.18' );
973 -
 973+
974974 global $wgContLang;
975975 static $msg = null;
976976
@@ -1039,7 +1039,7 @@
10401040 # passed by some callers (bug 29116)
10411041 return null;
10421042
1043 - } elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {
 1043+ } elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE ) ) ) {
10441044 $block = new Block();
10451045 $block->fromMaster( $fromMaster );
10461046
@@ -1049,12 +1049,9 @@
10501050
10511051 if( $block->newLoad( $vagueTarget ) ){
10521052 return $block;
1053 - } else {
1054 - return null;
10551053 }
1056 - } else {
1057 - return null;
10581054 }
 1055+ return null;
10591056 }
10601057
10611058 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r106355* (bug 33101) Viewing a User or User talk of username resembling IP ending w...reedy18:58, 15 December 2011

Status & tagging log