r61860 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61859‎ | r61860 | r61861 >
Date:15:59, 2 February 2010
Author:ialex
Status:ok
Tags:
Comment:
* (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 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -65,14 +65,15 @@
6666 return;
6767 }
6868
 69+ $available = $this->changeableGroups();
 70+
6971 if ( !$this->mTarget ) {
7072 /*
7173 * If the user specified no target, and they can only
7274 * edit their own groups, automatically set them as the
7375 * target.
7476 */
75 - $available = $this->changeableGroups();
76 - if ( empty( $available['add'] ) && empty( $available['remove'] ) )
 77+ if ( !count( $available['add'] ) && !count( $available['remove'] ) )
7778 $this->mTarget = $wgUser->getName();
7879 }
7980
@@ -100,7 +101,8 @@
101102 $this->setHeaders();
102103
103104 // show the general form
104 - $this->switchForm();
 105+ if ( count( $available['add'] ) || count( $available['remove'] ) )
 106+ $this->switchForm();
105107
106108 if( $wgRequest->wasPosted() ) {
107109 // save settings
Index: trunk/phase3/RELEASE-NOTES
@@ -730,7 +730,10 @@
731731 * (bug 21870) No longer include Google logo from an external server on wiki error.
732732 * (bug 22181) Do not truncate if the ellipsis actually make the string longer
733733 * (bug 16039) Text disappearing after a bad image
734 -* (bug 18784) Internal links like [[File:Foo|caption]] should read 'caption', not 'File:Foo' when Foo is not an image
 734+* (bug 18784) Internal links like [[File:Foo|caption]] should read 'caption',
 735+ not 'File:Foo' when Foo is not an image
 736+* (bug 21518) Special:UserRights no longer displays the user name box for users
 737+ that can only change their rights
735738
736739 == API changes in 1.16 ==
737740

Status & tagging log