IAlex has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/49986


Change subject: Add line breaks to the output of Special:Watchlist
......................................................................

Add line breaks to the output of Special:Watchlist

This makes the source code of the page much more readable.

Change-Id: Ia9e0e382a362d95678cf37844651ff0c28115e5e
---
M includes/specials/SpecialWatchlist.php
1 file changed, 17 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/49986/1

diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 2132b65..bf2d08b 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -245,7 +245,7 @@
                $form = Xml::fieldset( $this->msg( 'watchlist-options' 
)->text(), false, array( 'id' => 'mw-watchlist-options' ) );
 
                # Show watchlist header
-               $form .= $this->msg( 'watchlist-details' )->numParams( $nitems 
)->parse();
+               $form .= $this->msg( 'watchlist-details' )->numParams( $nitems 
)->parse() . "\n";
 
                if( $user->getOption( 'enotifwatchlistpages' ) && 
$wgEnotifWatchlist) {
                        $form .= $this->msg( 'wlheader-enotif' 
)->parseAsBlock() . "\n";
@@ -253,16 +253,16 @@
                if( $wgShowUpdatedMarker ) {
                        $form .= Xml::openElement( 'form', array( 'method' => 
'post',
                                                'action' => 
$this->getTitle()->getLocalUrl(),
-                                               'id' => 
'mw-watchlist-resetbutton' ) ) .
-                                       $this->msg( 'wlheader-showupdated' 
)->parse() . ' ' .
-                                       Xml::submitButton( $this->msg( 
'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) .
-                                       Html::hidden( 'reset', 'all' );
+                                               'id' => 
'mw-watchlist-resetbutton' ) ) . "\n" .
+                                       $this->msg( 'wlheader-showupdated' 
)->parse() .
+                                       Xml::submitButton( $this->msg( 
'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) . "\n" .
+                                       Html::hidden( 'reset', 'all' ) . "\n";
                                        foreach ( $nondefaults as $key => 
$value ) {
-                                               $form .= Html::hidden( $key, 
$value );
+                                               $form .= Html::hidden( $key, 
$value ) . "\n";
                                        }
-                                       $form .= Xml::closeElement( 'form' );
+                                       $form .= Xml::closeElement( 'form' ) . 
"\n";
                }
-               $form .= '<hr />';
+               $form .= "<hr />\n";
 
                $tables = array( 'recentchanges', 'watchlist' );
                $fields = RecentChange::selectFields();
@@ -306,10 +306,10 @@
                if( $values['days'] > 0 ) {
                        $timestamp = wfTimestampNow();
                        $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, 
round( $values['days'] * 24 ) )->params(
-                               $lang->userDate( $timestamp, $user ), 
$lang->userTime( $timestamp, $user ) )->parse() . '<br />';
+                               $lang->userDate( $timestamp, $user ), 
$lang->userTime( $timestamp, $user ) )->parse() . "<br />\n";
                }
 
-               $cutofflinks = "\n" . $this->cutoffLinks( $values['days'], 
$nondefaults ) . "<br />\n";
+               $cutofflinks = $this->cutoffLinks( $values['days'], 
$nondefaults ) . "<br />\n";
 
                # Spit out some control panel links
                $filters = array(
@@ -341,9 +341,9 @@
                # Namespace filter and put the whole form together.
                $form .= $wlInfo;
                $form .= $cutofflinks;
-               $form .= $lang->pipeList( $links );
-               $form .= Xml::openElement( 'form', array( 'method' => 'post', 
'action' => $this->getTitle()->getLocalUrl(), 'id' => 
'mw-watchlist-form-namespaceselector' ) );
-               $form .= '<hr /><p>';
+               $form .= $lang->pipeList( $links ) . "\n";
+               $form .= Xml::openElement( 'form', array( 'method' => 'post', 
'action' => $this->getTitle()->getLocalUrl(), 'id' => 
'mw-watchlist-form-namespaceselector' ) ) . "\n";
+               $form .= "<hr />\n<p>";
                $form .= Html::namespaceSelector(
                        array(
                                'selected' => $nameSpace,
@@ -369,12 +369,12 @@
                        $associated,
                        array( 'title' => $this->msg( 
'tooltip-namespace_association' )->text() )
                ) . '&#160;';
-               $form .= Xml::submitButton( $this->msg( 'allpagessubmit' 
)->text() ) . '</p>';
+               $form .= Xml::submitButton( $this->msg( 'allpagessubmit' 
)->text() ) . "</p>\n";
                foreach ( $hiddenFields as $key => $value ) {
-                       $form .= Html::hidden( $key, $value );
+                       $form .= Html::hidden( $key, $value ) . "\n";
                }
-               $form .= Xml::closeElement( 'form' );
-               $form .= Xml::closeElement( 'fieldset' );
+               $form .= Xml::closeElement( 'form' ) . "\n";
+               $form .= Xml::closeElement( 'fieldset' ) . "\n";
                $output->addHTML( $form );
 
                # If there's nothing to show, stop here

-- 
To view, visit https://gerrit.wikimedia.org/r/49986
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9e0e382a362d95678cf37844651ff0c28115e5e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <ialex.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to