https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112797

Revision: 112797
Author:   hashar
Date:     2012-03-01 12:04:42 +0000 (Thu, 01 Mar 2012)
Log Message:
-----------
MFT to 1.19wmf1 r111882

Bug 34835 - watchlist shows times in UTC

Modified Paths:
--------------
    branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php

Property Changed:
----------------
    branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php

Modified: branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php
===================================================================
--- branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php        
2012-03-01 11:54:00 UTC (rev 112796)
+++ branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php        
2012-03-01 12:04:42 UTC (rev 112797)
@@ -58,18 +58,18 @@
                        $output->setPageTitle( $this->msg( 'watchnologin' ) );
                        $llink = Linker::linkKnown(
                                SpecialPage::getTitleFor( 'Userlogin' ),
-                               wfMsgHtml( 'loginreqlink' ),
+                               $this->msg( 'loginreqlink' )->escaped(),
                                array(),
                                array( 'returnto' => 
$this->getTitle()->getPrefixedText() )
                        );
-                       $output->addHTML( wfMessage( 'watchlistanontext' 
)->rawParams( $llink )->parse() );
+                       $output->addHTML( $this->msg( 'watchlistanontext' 
)->rawParams( $llink )->parse() );
                        return;
                }
 
                $this->setHeaders();
                $this->outputHeader();
 
-               $output->addSubtitle( $this->msg( 'watchlistfor2', 
$this->getUser()->getName()
+               $output->addSubtitle( $this->msg( 'watchlistfor2', 
$user->getName()
                        )->rawParams( SpecialEditWatchlist::buildTools( null ) 
) );
 
                $request = $this->getRequest();
@@ -240,23 +240,21 @@
                        $output->showLagWarning( $lag );
                }
 
-               $lang = $this->getLanguage();
-
                # Create output form
-               $form  = Xml::fieldset( wfMsg( 'watchlist-options' ), false, 
array( 'id' => 'mw-watchlist-options' ) );
+               $form  = Xml::fieldset( $this->msg( 'watchlist-options' 
)->text(), false, array( 'id' => 'mw-watchlist-options' ) );
 
                # Show watchlist header
-               $form .= wfMsgExt( 'watchlist-details', array( 'parseinline' ), 
$lang->formatNum( $nitems ) );
+               $form .= $this->msg( 'watchlist-details' )->numParams( $nitems 
)->parse();
 
                if( $user->getOption( 'enotifwatchlistpages' ) && 
$wgEnotifWatchlist) {
-                       $form .= wfMsgExt( 'wlheader-enotif', 'parse' ) . "\n";
+                       $form .= $this->msg( 'wlheader-enotif' 
)->parseAsBlock() . "\n";
                }
                if( $wgShowUpdatedMarker ) {
                        $form .= Xml::openElement( 'form', array( 'method' => 
'post',
                                                'action' => 
$this->getTitle()->getLocalUrl(),
                                                'id' => 
'mw-watchlist-resetbutton' ) ) .
-                                       wfMsgExt( 'wlheader-showupdated', 
array( 'parseinline' ) ) . ' ' .
-                                       Xml::submitButton( wfMsg( 
'enotif_reset' ), array( 'name' => 'dummy' ) ) .
+                                       $this->msg( 'wlheader-showupdated' 
)->parse() . ' ' .
+                                       Xml::submitButton( $this->msg( 
'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) .
                                        Html::hidden( 'reset', 'all' ) .
                                        Xml::closeElement( 'form' );
                }
@@ -292,15 +290,12 @@
 
                /* Start bottom header */
 
+               $lang = $this->getLanguage();
                $wlInfo = '';
                if( $values['days'] > 0 ) {
                        $timestamp = wfTimestampNow();
-                       $wlInfo = wfMsgExt( 'wlnote', 'parseinline',
-                                       $lang->formatNum( $numRows ),
-                                       $lang->formatNum( round( 
$values['days'] * 24 ) ),
-                                       $lang->date( $timestamp, true ),
-                                       $lang->time( $timestamp, true )
-                               ) . '<br />';
+                       $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, 
round( $values['days'] * 24 ) )->params(
+                               $lang->userDate( $timestamp, $user ), 
$lang->userTime( $timestamp, $user ) )->parse() . '<br />';
                }
 
                $cutofflinks = "\n" . $this->cutoffLinks( $values['days'], 
$nondefaults ) . "<br />\n";
@@ -333,10 +328,10 @@
                $form .= $lang->pipeList( $links );
                $form .= Xml::openElement( 'form', array( 'method' => 'post', 
'action' => $this->getTitle()->getLocalUrl(), 'id' => 
'mw-watchlist-form-namespaceselector' ) );
                $form .= '<hr /><p>';
-               $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . 
'&#160;';
+               $form .= Xml::label( $this->msg( 'namespace' )->text(), 
'namespace' ) . '&#160;';
                $form .= Xml::namespaceSelector( $nameSpace, '' ) . '&#160;';
-               $form .= Xml::checkLabel( wfMsg('invert'), 'invert', 
'nsinvert', $invert ) . '&#160;';
-               $form .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . 
'</p>';
+               $form .= Xml::checkLabel( $this->msg( 'invert' )->text(), 
'invert', 'nsinvert', $invert ) . '&#160;';
+               $form .= Xml::submitButton( $this->msg( 'allpagessubmit' 
)->text() ) . '</p>';
                $form .= Html::hidden( 'days', $values['days'] );
                foreach ( $filters as $key => $msg ) {
                        if ( $values[$key] ) {
@@ -405,13 +400,10 @@
        }
 
        protected function showHideLink( $options, $message, $name, $value ) {
-               $showLinktext = wfMsgHtml( 'show' );
-               $hideLinktext = wfMsgHtml( 'hide' );
-
-               $label = $value ? $showLinktext : $hideLinktext;
+               $label = $this->msg( $value ? 'show' : 'hide' )->escaped();
                $options[$name] = 1 - (int) $value;
 
-               return wfMsgHtml( $message, Linker::linkKnown( 
$this->getTitle(), $label, array(), $options ) );
+               return $this->msg( $message )->rawParams( Linker::linkKnown( 
$this->getTitle(), $label, array(), $options ) )->escaped();
        }
 
        protected function hoursLink( $h, $options = array() ) {
@@ -427,7 +419,7 @@
 
        protected function daysLink( $d, $options = array() ) {
                $options['days'] = $d;
-               $message = ( $d ? $this->getLanguage()->formatNum( $d ) : 
wfMsgHtml( 'watchlistall2' ) );
+               $message = ( $d ? $this->getLanguage()->formatNum( $d ) : 
$this->msg( 'watchlistall2' )->escaped() );
 
                return Linker::linkKnown(
                        $this->getTitle(),
@@ -453,11 +445,10 @@
                foreach( $days as $d ) {
                        $days[$i++] = $this->daysLink( $d, $options );
                }
-               return wfMsgExt('wlshowlast',
-                       array('parseinline', 'replaceafter'),
+               return $this->msg( 'wlshowlast' )->rawParams(
                        $this->getLanguage()->pipeList( $hours ),
                        $this->getLanguage()->pipeList( $days ),
-                       $this->daysLink( 0, $options ) );
+                       $this->daysLink( 0, $options ) )->parse();
        }
 
        /**


Property changes on: 
branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/JSTesting/includes/specials/SpecialWatchlist.php:100352-107913
/branches/REL1_15/phase3/includes/specials/SpecialWatchlist.php:51646
/branches/sqlite/includes/specials/SpecialWatchlist.php:58211-58321
/branches/wmf-deployment/includes/specials/SpecialWatchlist.php:53381,56967
/trunk/phase3/includes/specials/SpecialWatchlist.php:111085,111128,111144,111251,111750,111882,112397,112408,112474


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to