From 179e0b4d9c21343300abb5d46e59eeac807fd389 Mon Sep 17 00:00:00 2001 From: jarry1250 Date: Mon, 9 Apr 2012 19:33:28 +0100 Subject: [PATCH] Resolve bug #18704 ("Add an unique CSS class or ID to the tagfilter table row at RecentChanges") Effectively followup previous attempts which suffered from incorrect placement of brackets (SVN r111186, Git r3659) Change-Id: Ie52be2c3c92e5e89896ac063acfc95b15f77533a --- RELEASE-NOTES-1.20 | 1 + includes/ChangeTags.php | 4 ++-- includes/specials/SpecialRecentchanges.php | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index 81de85a2a9..0b6cd177e0 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -78,6 +78,7 @@ production. Subversion when invoked with the --modified option. * (bug 35069) On history pages, the " . . " separator after the number of characters changed in a revision is now suppressed if no text would follow. +* (bug 18704) Add a unique CSS class or ID to the tagfilter table row at RecentChanges === API changes in 1.20 === * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 63d3732707..0dbaac698c 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -210,7 +210,7 @@ class ChangeTags { return $fullForm ? '' : array(); $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMsgExt( 'tag-filter', 'parseinline' ) ), - Xml::input( 'tagfilter', 20, $selected ) ); + Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'mw-tagfilter-input' ) ) ); if ( !$fullForm ) { return $data; @@ -219,7 +219,7 @@ class ChangeTags { $html = implode( ' ', $data ); $html .= "\n" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'tag-filter-submit' ) ) ); $html .= "\n" . Html::hidden( 'title', $title->getPrefixedText() ); - $html = Xml::tags( 'form', array( 'action' => $title->getLocalURL(), 'method' => 'get' ), $html ); + $html = Xml::tags( 'form', array( 'action' => $title->getLocalURL(), 'class' => 'mw-tagfilter-form', 'method' => 'get' ), $html ); return $html; } diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index bfc5248dda..c05aaad6f2 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -568,14 +568,14 @@ class SpecialRecentChanges extends IncludableSpecialPage { $submit = ' ' . Xml::submitbutton( wfMsg( 'allpagessubmit' ) ); $out = Xml::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) ); - foreach( $extraOpts as $optionRow ) { + foreach( $extraOpts as $name => $optionRow ) { # Add submit button to the last row only ++$count; - $addSubmit = $count === $extraOptsCount ? $submit : ''; + $addSubmit = ( $count === $extraOptsCount ) ? $submit : ''; $out .= Xml::openElement( 'tr' ); if( is_array( $optionRow ) ) { - $out .= Xml::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] ); + $out .= Xml::tags( 'td', array( 'class' => 'mw-label mw-' . $name . '-label' ), $optionRow[0] ); $out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit ); } else { $out .= Xml::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit ); -- 2.20.1