Index: trunk/phase3/includes/User.php |
— | — | @@ -540,8 +540,14 @@ |
541 | 541 | return false; |
542 | 542 | } |
543 | 543 | |
| 544 | + static $reservedUsernames = false; |
| 545 | + if ( !$reservedUsernames ) { |
| 546 | + $reservedUsernames = $wgReservedUsernames; |
| 547 | + wfRunHooks( 'UserGetReservedNames', array( &$reservedUsernames ) ); |
| 548 | + } |
| 549 | + |
544 | 550 | // Certain names may be reserved for batch processes. |
545 | | - foreach ( $wgReservedUsernames as $reserved ) { |
| 551 | + foreach ( $reservedUsernames as $reserved ) { |
546 | 552 | if ( substr( $reserved, 0, 4 ) == 'msg:' ) { |
547 | 553 | $reserved = wfMsgForContent( substr( $reserved, 4 ) ); |
548 | 554 | } |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -2767,13 +2767,13 @@ |
2768 | 2768 | && !($minoredit && $wgUser->isAllowed('nominornewtalk') ) ) { |
2769 | 2769 | if (wfRunHooks('ArticleEditUpdateNewTalk', array(&$this)) ) { |
2770 | 2770 | $other = User::newFromName( $shortTitle ); |
2771 | | - if( is_null( $other ) && User::isIP( $shortTitle ) ) { |
| 2771 | + if( User::isIP( $shortTitle ) ) { |
2772 | 2772 | // An anonymous user |
2773 | | - $other = new User(); |
2774 | | - $other->setName( $shortTitle ); |
2775 | | - } |
2776 | | - if( $other ) { |
2777 | 2773 | $other->setNewtalk( true ); |
| 2774 | + } elseif( $other->isLoggedIn() ) { |
| 2775 | + $other->setNewtalk( true ); |
| 2776 | + } else { |
| 2777 | + wfDebug( __METHOD__. ": don't need to notify a nonexistent user\n" ); |
2778 | 2778 | } |
2779 | 2779 | } |
2780 | 2780 | } |