r57613 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57612‎ | r57613 | r57614 >
Date:09:29, 10 October 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 21073) "User does not exist" message no longer displayed on sub-sub-pages of existing users
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1209,11 +1209,13 @@
12101210
12111211 # Show info in user (talk) namespace. Does the user exist?
12121212 if ( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) {
1213 - $id = User::idFromName( $this->mTitle->getBaseText() );
1214 - $ip = User::isIP( $this->mTitle->getBaseText() );
 1213+ $parts = explode( '/', $this->mTitle->getText() );
 1214+ $rootPart = $parts[0];
 1215+ $id = User::idFromName( $rootPart );
 1216+ $ip = User::isIP( $rootPart );
12151217 if ( $id == 0 && !$ip ) { # User does not exist
12161218 $wgOut->wrapWikiMsg( '<div class="mw-userpage-userdoesnotexist error">$1</div>',
1217 - array( 'userpage-userdoesnotexist-view', $this->mTitle->getBaseText() ) );
 1219+ array( 'userpage-userdoesnotexist-view', $rootPart ) );
12181220 }
12191221 }
12201222 wfRunHooks( 'ShowMissingArticle', array( $this ) );
Index: trunk/phase3/RELEASE-NOTES
@@ -243,6 +243,8 @@
244244 * (bug 19741) Moved the XCF files out of the main MediaWiki distribution, for
245245 a smaller subversion checkout.
246246 * (bug 13750) First letter capitalization can now be a per-namespace setting
 247+* (bug 21073) "User does not exist" message no longer displayed on sub-sub-pages
 248+ of existing users
247249
248250 === Bug fixes in 1.16 ===
249251

Status & tagging log