r42264 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42263‎ | r42264 | r42265 >
Date:14:21, 20 October 2008
Author:btongminh
Status:old (Comments)
Tags:
Comment:
(bug 15806) Added html ids to certain tags. Patch by Pathoschild.
Modified paths:
  • /trunk/extensions/CentralAuth/SpecialCentralAuth.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/SpecialCentralAuth.php
@@ -247,7 +247,7 @@
248248 'hidden' => $globalUser->isHidden() ? wfMsg( 'centralauth-admin-yes' ) : wfMsg( 'centralauth-admin-no' ) );
249249 $out = '<ul>';
250250 foreach( $attribs as $tag => $data ) {
251 - $out .= Xml::element( 'li', array(), wfMsg( "centralauth-admin-info-$tag" ) . ' ' . $data );
 251+ $out .= Xml::element( 'li', array( 'id'=>"info_$tag" ), wfMsg( "centralauth-admin-info-$tag" ) . ' ' . $data );
252252 }
253253 $out .= '</ul>';
254254 $wgOut->addHtml( $out );
@@ -273,7 +273,7 @@
274274
275275 function listRemainder( $list ) {
276276 ksort( $list );
277 - $s = '<ul>';
 277+ $s = '<ul id="list_unattached">';
278278 foreach ( $list as $row ) {
279279 $s .= '<li>' . $this->foreignUserLink( $row['wiki'] ) . "</li>\n";
280280 }
@@ -288,7 +288,8 @@
289289 Xml::openElement( 'form',
290290 array(
291291 'method' => 'post',
292 - 'action' => $this->getTitle( $this->mUserName )->getLocalUrl( 'action=submit' ) ) ) .
 292+ 'action' => $this->getTitle( $this->mUserName )->getLocalUrl( 'action=submit' ),
 293+ 'id' => 'form_merged' ) ) .
293294 Xml::hidden( 'wpMethod', $action ) .
294295 Xml::hidden( 'wpEditToken', $wgUser->editToken() ) .
295296 '<table>' .
@@ -359,7 +360,8 @@
360361 Xml::element( 'h2', array(), wfMsg( "centralauth-admin-{$action}-title" ) ) .
361362 Xml::openElement( 'form', array(
362363 'method' => 'POST',
363 - 'action' => $this->getTitle()->getFullUrl( 'target=' . urlencode( $this->mUserName ) ) ) ) .
 364+ 'action' => $this->getTitle()->getFullUrl( 'target=' . urlencode( $this->mUserName ) ),
 365+ 'id' => "form_$action" ) ) .
364366 Xml::hidden( 'wpMethod', $action ) .
365367 Xml::hidden( 'wpEditToken', $wgUser->editToken() ) .
366368 wfMsgExt( "centralauth-admin-{$action}-description", 'parse' ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r42431Revert r42264 "(bug 15806) Added html ids to certain tags. Patch by Pathoschi...brion23:26, 23 October 2008
r42665(bug 15806) Add html IDs to tags. This time let's follow naming standards and...demon18:27, 27 October 2008

Comments

#Comment by Raymond (talk | contribs)   14:45, 20 October 2008

Don't we have a convention for CSS id? Something like 'mw-centralauth-info-$tag' etc.

#Comment by Simetrical (talk | contribs)   15:47, 20 October 2008

All new id's and classes should be prefixed with "mw-", and you should use hyphens to separate words, not underscores. Prefixing with "mw-centralauth-" or something might be a good idea, but it's probably not *really* necessary, since this is an officially-maintained extension.

#Comment by Brion VIBBER (talk | contribs)   23:26, 23 October 2008

Reverted in r42431

Status & tagging log