r76382 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76381‎ | r76382 | r76383 >
Date:08:07, 9 November 2010
Author:raymond
Status:ok
Tags:
Comment:
Fix per Brion's CR r76342: Avoid spaces get normalized between the 2 different classes
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -739,9 +739,9 @@
740740 # Add the namespace and title of the block as part of the class
741741 if ( $block[0]->mAttribs['rc_log_type'] ) {
742742 # Log entry
743 - $classes = Sanitizer::escapeClass( 'mw-enhanced-rc mw-changeslist-log-' . $block[0]->mAttribs['rc_log_type'] . '-' . $block[0]->mAttribs['rc_title'] );
 743+ $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' . $block[0]->mAttribs['rc_log_type'] . '-' . $block[0]->mAttribs['rc_title'] );
744744 } else {
745 - $classes = Sanitizer::escapeClass( 'mw-enhanced-rc mw-changeslist-ns' . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
 745+ $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
746746 }
747747 $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
748748 Html::openElement( 'tr' );
@@ -1061,9 +1061,9 @@
10621062
10631063 if( $rc_log_type ) {
10641064 # Log entry
1065 - $classes = Sanitizer::escapeClass( 'mw-enhanced-rc mw-changeslist-log-' . $rc_log_type . '-' . $rcObj->mAttribs['rc_title'] );
 1065+ $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' . $rc_log_type . '-' . $rcObj->mAttribs['rc_title'] );
10661066 } else {
1067 - $classes = Sanitizer::escapeClass( 'mw-enhanced-rc mw-changeslist-ns' . $rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] );
 1067+ $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' . $rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] );
10681068 }
10691069 $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
10701070 Html::openElement( 'tr' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76342Add CSS classes (including namespace and pagename) to the enhanced recent cha...raymond21:21, 8 November 2010

Status & tagging log