r63495 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63494‎ | r63495 | r63496 >
Date:19:47, 9 March 2010
Author:simetrical
Status:ok
Tags:
Comment:
Fix validity and correctness of r63342

The name attribute may only be used on <a> if an id attribute with
identical value is given on the same element. I moved the id to the tr
so it leaves a bit of space at the top, rather than using a name
attribute at all. Also, we need to call Sanitizer::escapeId() on the
group key, lest people use spaces or something in the group key (not
advisable, but possible).
Modified paths:
  • /trunk/phase3/includes/specials/SpecialListgrouprights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialListgrouprights.php
@@ -63,8 +63,7 @@
6464 } else {
6565 $grouppage = $this->skin->link(
6666 Title::newFromText( $grouppageLocalized ),
67 - htmlspecialchars($groupnameLocalized),
68 - array( 'name' => $group )
 67+ htmlspecialchars($groupnameLocalized)
6968 );
7069 }
7170
@@ -96,16 +95,17 @@
9796 $addgroupsSelf = isset( $wgGroupsAddToSelf[$group] ) ? $wgGroupsAddToSelf[$group] : array();
9897 $removegroupsSelf = isset( $wgGroupsRemoveFromSelf[$group] ) ? $wgGroupsRemoveFromSelf[$group] : array();
9998
100 - $wgOut->addHTML(
101 - '<tr>
102 - <td>' .
 99+ $id = $group == '*' ? false : Sanitizer::escapeId( $group );
 100+ $wgOut->addHTML( Html::rawElement( 'tr', array( 'id' => $id ),
 101+ '
 102+ <td>' .
103103 $grouppage . $grouplink .
104104 '</td>
105105 <td>' .
106106 self::formatPermissions( $permissions, $revoke, $addgroups, $removegroups, $addgroupsSelf, $removegroupsSelf ) .
107107 '</td>
108 - </tr>'
109 - );
 108+ '
 109+ ) );
110110 }
111111 $wgOut->addHTML(
112112 Xml::closeElement( 'table' ) . "\n<br /><hr />\n"

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63342* (bug 22748) Add anchors on Special:ListGroupRightsnikerabbit21:18, 6 March 2010

Status & tagging log