Index: trunk/extensions/Comments/SpecialCommentIgnoreList.php |
— | — | @@ -43,6 +43,11 @@ |
44 | 44 | } else { |
45 | 45 | if( $wgRequest->wasPosted() ) { |
46 | 46 | $user_id = User::idFromName( $user_name ); |
| 47 | + // Anons can be comment-blocked, but idFromName returns nothing |
| 48 | + // for an anon, so... |
| 49 | + if ( !$user_id ) { |
| 50 | + $user_id = 0; |
| 51 | + } |
47 | 52 | $c = new Comment( 0 ); |
48 | 53 | $c->deleteBlock( $wgUser->getID(), $user_id ); |
49 | 54 | if( $user_id && class_exists( 'UserStatsTrack' ) ) { |
— | — | @@ -108,7 +113,7 @@ |
109 | 114 | '</div> |
110 | 115 | <div> |
111 | 116 | <form action="" method="post" name="comment_block"> |
112 | | - <input type="hidden" name="' . $user_name . '" /> |
| 117 | + <input type="hidden" name="user" value="' . $user_name . '" /> |
113 | 118 | <input type="button" class="site-button" value="' . wfMsg( 'comment-ignore-unblock' ) . '" onclick="document.comment_block.submit()" /> |
114 | 119 | <input type="button" class="site-button" value="' . wfMsg( 'comment-ignore-cancel' ) . '" onclick="history.go(-1)" /> |
115 | 120 | </form> |