r15784 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r15783‎ | r15784 | r15785 >
Date:18:32, 22 July 2006
Author:tstarling
Status:old
Tags:
Comment:
Compare page title with $wgUser->getTitleKey() not $wgUser->getName(). New talk notifications were being erroneously inserted when a user with spaces in their name edited their own user talk page. Bug had been present for at least 18 months, hidden by the fact that the subsequent page view clears the notification.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2147,7 +2147,7 @@
21482148 # If this is another user's talk page, update newtalk
21492149 # Don't do this if $changed = false otherwise some idiot can null-edit a
21502150 # load of user talk pages and piss people off
2151 - if( $this->mTitle->getNamespace() == NS_USER_TALK && $shortTitle != $wgUser->getName() && $changed ) {
 2151+ if( $this->mTitle->getNamespace() == NS_USER_TALK && $shortTitle != $wgUser->getTitleKey() && $changed ) {
21522152 if (wfRunHooks('ArticleEditUpdateNewTalk', array(&$this)) ) {
21532153 $other = User::newFromName( $shortTitle );
21542154 if( is_null( $other ) && User::isIP( $shortTitle ) ) {