http://www.mediawiki.org/wiki/Special:Code/MediaWiki/61860
Revision: 61860 Author: ialex Date: 2010-02-02 15:59:47 +0000 (Tue, 02 Feb 2010) Log Message: ----------- * (bug 21518) Special:UserRights no longer displays the user name box for users that can only change their rights * changed empty() to !count() * break line at 80 chars in RELEASE-NOTES Modified Paths: -------------- trunk/phase3/RELEASE-NOTES trunk/phase3/includes/specials/SpecialUserrights.php Modified: trunk/phase3/RELEASE-NOTES =================================================================== --- trunk/phase3/RELEASE-NOTES 2010-02-02 15:26:20 UTC (rev 61859) +++ trunk/phase3/RELEASE-NOTES 2010-02-02 15:59:47 UTC (rev 61860) @@ -730,7 +730,10 @@ * (bug 21870) No longer include Google logo from an external server on wiki error. * (bug 22181) Do not truncate if the ellipsis actually make the string longer * (bug 16039) Text disappearing after a bad image -* (bug 18784) Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo' when Foo is not an image +* (bug 18784) Internal links like [[File:Foo|caption]] should read 'caption', + not 'File:Foo' when Foo is not an image +* (bug 21518) Special:UserRights no longer displays the user name box for users + that can only change their rights == API changes in 1.16 == Modified: trunk/phase3/includes/specials/SpecialUserrights.php =================================================================== --- trunk/phase3/includes/specials/SpecialUserrights.php 2010-02-02 15:26:20 UTC (rev 61859) +++ trunk/phase3/includes/specials/SpecialUserrights.php 2010-02-02 15:59:47 UTC (rev 61860) @@ -65,14 +65,15 @@ return; } + $available = $this->changeableGroups(); + if ( !$this->mTarget ) { /* * If the user specified no target, and they can only * edit their own groups, automatically set them as the * target. */ - $available = $this->changeableGroups(); - if ( empty( $available['add'] ) && empty( $available['remove'] ) ) + if ( !count( $available['add'] ) && !count( $available['remove'] ) ) $this->mTarget = $wgUser->getName(); } @@ -100,7 +101,8 @@ $this->setHeaders(); // show the general form - $this->switchForm(); + if ( count( $available['add'] ) || count( $available['remove'] ) ) + $this->switchForm(); if( $wgRequest->wasPosted() ) { // save settings _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs