r40017 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40016‎ | r40017 | r40018 >
Date:14:21, 26 August 2008
Author:raymond
Status:old
Tags:
Comment:
Make the elements of the watchlist fieldset identical to the elements of the recent changes fieldset.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -220,25 +220,21 @@
221221 $numRows = $dbr->numRows( $res );
222222
223223 /* Start bottom header */
224 - $wgOut->addHTML( "<hr />\n" );
225224
226 - if($days >= 1) {
227 - $wgOut->addHTML(
228 - wfMsgExt( 'rcnote', 'parseinline',
 225+ $wlInfo = '';
 226+ if( $days >= 1 ) {
 227+ $wlInfo = wfMsgExt( 'rcnote', 'parseinline',
229228 $wgLang->formatNum( $numRows ),
230229 $wgLang->formatNum( $days ),
231230 $wgLang->timeAndDate( wfTimestampNow(), true ),
232231 $wgLang->date( wfTimestampNow(), true ),
233232 $wgLang->time( wfTimestampNow(), true )
234 - ) . '<br />'
235 - );
236 - } elseif($days > 0) {
237 - $wgOut->addHtml(
238 - wfMsgExt( 'wlnote', 'parseinline',
 233+ ) . '<br />';
 234+ } elseif( $days > 0 ) {
 235+ $wlInfo = wfMsgExt( 'wlnote', 'parseinline',
239236 $wgLang->formatNum( $numRows ),
240237 $wgLang->formatNum( round($days*24) )
241 - ) . '<br />'
242 - );
 238+ ) . '<br />';
243239 }
244240
245241 $cutofflinks = "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "<br />\n";
@@ -277,6 +273,7 @@
278274 $form .= Xml::openElement( 'legend', array( 'id' => 'mw-watchlist-legend' ) );
279275 $form .= wfMsgExt( 'watchlist-options', array('escape') );
280276 $form .= Xml::closeElement( 'legend' );
 277+ $form .= $wlInfo;
281278 $form .= $cutofflinks;
282279 $form .= implode( ' | ', $links );
283280 $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );

Status & tagging log