From 6cd3995f11c36ab3a58fd7d59f8c0320e15480a3 Mon Sep 17 00:00:00 2001 From: jarry1250 Date: Fri, 23 Mar 2012 20:33:45 +0000 Subject: [PATCH] Resolve bug #18704 ("Add an unique CSS class or ID to the tagfilter table row at RecentChanges") Effectively followup previous attempt (r111186) Change-Id: If11e2351ae7553da9ce010fce30354dbaf82b2dd --- 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 bef93eeb7e..d4533aac3b 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -50,6 +50,7 @@ production. * (bug 34735) Updated compressOld.php documentation to mention the different usages of -s and -n parameters depending on compression type * (bug 13896) Rendering of devanagari numbers in automatic '#' number lists +* (bug 18704) Add an 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..01b93ad494 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