jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/357866 )

Change subject: Use short array syntax - pages
......................................................................


Use short array syntax - pages

Done by phpcbf over composer fix

Change-Id: Ib23b716a8efdbd589af96ed941f80fab18031c6e
---
M pages/IndividualThreadHistoryView.php
M pages/NewUserMessagesView.php
M pages/SpecialMergeThread.php
M pages/SpecialMoveThread.php
M pages/SpecialSplitThread.php
M pages/TalkpageHeaderView.php
M pages/TalkpageHistoryView.php
M pages/TalkpageView.php
M pages/ThreadActionPage.php
M pages/ThreadDiffView.php
M pages/ThreadHistoricalRevisionView.php
M pages/ThreadPermalinkView.php
12 files changed, 164 insertions(+), 164 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/pages/IndividualThreadHistoryView.php 
b/pages/IndividualThreadHistoryView.php
index 0a6bf8f..b5d7e24 100644
--- a/pages/IndividualThreadHistoryView.php
+++ b/pages/IndividualThreadHistoryView.php
@@ -41,7 +41,7 @@
                        return false;
                }
 
-               $wgHooks['PageHistoryBeforeList'][] = array( $this, 
'customizeSubtitle' );
+               $wgHooks['PageHistoryBeforeList'][] = [ $this, 
'customizeSubtitle' ];
 
                return true;
        }
diff --git a/pages/NewUserMessagesView.php b/pages/NewUserMessagesView.php
index 38ee3de..2abeea0 100644
--- a/pages/NewUserMessagesView.php
+++ b/pages/NewUserMessagesView.php
@@ -13,13 +13,13 @@
                $html .= Html::hidden( 'lqt_operand', $ids_s );
                $html .= Xml::submitButton(
                        $label,
-                       array(
+                       [
                                'name' => 'lqt_read_button',
                                'title' => $title,
                                'class' => 'lqt-read-button'
-                       )
+                       ]
                );
-               $html = Xml::tags( 'form', array( 'method' => 'post', 'class' 
=> $class ), $html );
+               $html = Xml::tags( 'form', [ 'method' => 'post', 'class' => 
$class ], $html );
 
                return $html;
        }
@@ -29,7 +29,7 @@
                        wfMessage( 'lqt-read-all' )->text(),
                        wfMessage( 'lqt-read-all-tooltip' )->text(),
                        'lqt_newmessages_read_all_button',
-                       array( 'all' )
+                       [ 'all' ]
                );
        }
 
@@ -52,15 +52,15 @@
                $html .= Html::hidden( 'lqt_operand', $operand );
                $html .= ' ' . Xml::submitButton(
                        wfMessage( 'lqt-email-undo' )->text(),
-                       array(
+                       [
                                'name' => 'lqt_read_button',
                                'title' => wfMessage( 'lqt-email-info-undo' 
)->text()
-                       )
+                       ]
                );
 
                $html = Xml::tags(
                        'form',
-                       array( 'method' => 'post', 'class' => 
'lqt_undo_mark_as_read' ),
+                       [ 'method' => 'post', 'class' => 
'lqt_undo_mark_as_read' ],
                        $html
                );
 
@@ -172,8 +172,8 @@
                $contextLink = $linkRenderer->makeKnownLink(
                        $title,
                        new HtmlArmor( wfMessage( 'lqt-newmessages-context' 
)->parse() ),
-                       array(),
-                       array( 'offset' => $offset )
+                       [],
+                       [ 'offset' => $offset ]
                );
 
                $talkpageLink = $linkRenderer->makeLink( 
$topmostThread->getTitle() );
@@ -183,14 +183,14 @@
                $leftColumn = Xml::tags( 'p', null, $read_button ) .
                                                Xml::tags( 'p', null, 
$contextLink ) .
                                                $talkpageInfo;
-               $leftColumn = Xml::tags( 'td', array( 'class' => 
'lqt-newmessages-left' ),
+               $leftColumn = Xml::tags( 'td', [ 'class' => 
'lqt-newmessages-left' ],
                                                                        
$leftColumn );
                $html = "<tr>$leftColumn<td class='lqt-newmessages-right'>";
                $this->output->addHTML( $html );
 
                $mustShowThreads = $this->highlightThreads;
 
-               $this->showThread( $t, 1, 1, array( 'mustShowThreads' => 
$mustShowThreads ) );
+               $this->showThread( $t, 1, 1, [ 'mustShowThreads' => 
$mustShowThreads ] );
                $this->output->addModules( 'ext.liquidThreads.newMessages' );
                $this->output->addHTML( "</td></tr>" );
        }
@@ -219,20 +219,20 @@
 
                $threads = Thread::bulkLoad( $rows );
                $thread_ids = array_keys( $threads );
-               $output = array();
+               $output = [];
 
                foreach ( $threads as $id => $thread ) {
-                       $output[$id] = array( 'top' => $thread, 'posts' => 
array() );
+                       $output[$id] = [ 'top' => $thread, 'posts' => [] ];
                }
 
                $dbr = wfGetDB( DB_SLAVE );
 
-               $res = $dbr->select( array( 'user_message_state' ),
-                                       array( 'ums_thread', 'ums_conversation' 
),
-                                       array(
+               $res = $dbr->select( [ 'user_message_state' ],
+                                       [ 'ums_thread', 'ums_conversation' ],
+                                       [
                                                'ums_user' => 
$this->user->getId(),
                                                'ums_conversation' => 
$thread_ids
-                                       ),
+                                       ],
                                        __METHOD__
                                        );
 
@@ -248,20 +248,20 @@
        function getQueryInfo() {
                $dbr = wfGetDB( DB_SLAVE );
 
-               $queryInfo = array(
-                       'tables' => array( 'thread', 'user_message_state' ),
-                       'fields' => array( $dbr->tableName( 'thread' ) . '.*', 
'ums_conversation' ),
-                       'conds' => array(
+               $queryInfo = [
+                       'tables' => [ 'thread', 'user_message_state' ],
+                       'fields' => [ $dbr->tableName( 'thread' ) . '.*', 
'ums_conversation' ],
+                       'conds' => [
                                'ums_user' => $this->user->getId(),
                                'thread_type != ' . $this->mDb->addQuotes( 
Threads::TYPE_DELETED ),
-                       ),
-                       'join_conds' => array(
-                               'thread' => array( 'join', 
'ums_conversation=thread_id' )
-                       ),
-                       'options' => array(
+                       ],
+                       'join_conds' => [
+                               'thread' => [ 'join', 
'ums_conversation=thread_id' ]
+                       ],
+                       'options' => [
                                'group by' => 'ums_conversation'
-                       )
-               );
+                       ]
+               ];
 
                return $queryInfo;
        }
@@ -275,6 +275,6 @@
        }
 
        function getIndexField() {
-               return array( 'ums_conversation' );
+               return [ 'ums_conversation' ];
        }
 }
diff --git a/pages/SpecialMergeThread.php b/pages/SpecialMergeThread.php
index fb9c6eb..f8eae74 100644
--- a/pages/SpecialMergeThread.php
+++ b/pages/SpecialMergeThread.php
@@ -3,24 +3,24 @@
 // @todo FIXME: access control
 class SpecialMergeThread extends ThreadActionPage {
        function getFormFields() {
-               $splitForm = array(
-                       'src' => array(
+               $splitForm = [
+                       'src' => [
                                'type' => 'info',
                                'label-message' => 'lqt-thread-merge-source',
                                'default' => $this->formatThreadField( 'src', 
$this->mThread->id() ),
                                'raw' => 1
-                       ),
-                       'dest' => array(
+                       ],
+                       'dest' => [
                                'type' => 'info',
                                'label-message' => 'lqt-thread-merge-dest',
                                'default' => $this->formatThreadField( 'dest', 
$this->request->getVal( 'dest' ) ),
                                'raw' => 1
-                       ),
-                       'reason' => array(
+                       ],
+                       'reason' => [
                                'label-message' => 'movereason',
                                'type' => 'text'
-                       )
-               );
+                       ]
+               ];
 
                return $splitForm;
        }
diff --git a/pages/SpecialMoveThread.php b/pages/SpecialMoveThread.php
index d6cd357..1c03d82 100644
--- a/pages/SpecialMoveThread.php
+++ b/pages/SpecialMoveThread.php
@@ -11,8 +11,8 @@
        }
 
        function getFormFields() {
-               $destAdditions = array();
-               $reasonAdditions = array();
+               $destAdditions = [];
+               $reasonAdditions = [];
                if ( $this->getRequest()->getCheck( 'dest' ) ) {
                        $destAdditions['default'] = 
$this->getRequest()->getText( 'dest' );
                        $reasonAdditions['autofocus'] = true;
@@ -20,17 +20,17 @@
                        $destAdditions['autofocus'] = true;
                }
 
-               return array(
-                       'dest-title' => array(
+               return [
+                       'dest-title' => [
                                'label-message' => 'lqt_move_destinationtitle',
                                'type' => 'text',
-                               'validation-callback' => array( $this, 
'validateTarget' ),
-                       ) + $destAdditions,
-                       'reason' => array(
+                               'validation-callback' => [ $this, 
'validateTarget' ],
+                       ] + $destAdditions,
+                       'reason' => [
                                'label-message' => 'movereason',
                                'type' => 'text',
-                       ) + $reasonAdditions,
-               );
+                       ] + $reasonAdditions,
+               ];
        }
 
        function getPageName() {
@@ -53,16 +53,16 @@
                $edit_link = 
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
                        $this->mThread->title(),
                        $edit_text,
-                       array(),
-                       array(
+                       [],
+                       [
                                'lqt_method' => 'edit',
                                'lqt_operand' => $this->mThread->id()
-                       )
+                       ]
                );
 
                $intro .= $this->msg(
                        'lqt_move_movingthread',
-                       array( '[[' . $this->mTarget . ']]', '[[' . $page . 
']]' )
+                       [ '[[' . $this->mTarget . ']]', '[[' . $page . ']]' ]
                )->parseAsBlock();
                $intro .= $this->msg( 'lqt_move_torename' )->rawParams( 
$edit_link )->parseAsBlock();
 
@@ -78,7 +78,7 @@
 
                // Custom merge/unique function because we don't have the 
second parameter to
                // array_unique on Wikimedia.
-               $mergedErrors = array();
+               $mergedErrors = [];
                foreach ( array_merge( $oldErrors, $newErrors ) as $key => 
$value ) {
                        if ( !is_numeric( $key ) ) {
                                $mergedErrors[$key] = $value;
@@ -119,8 +119,8 @@
                        $linkRenderer->makeLink(
                                SpecialPage::getTitleFor( 'MoveThread', 
$this->mThread->root()->getTitle() ),
                                wfMessage( 'revertmove' )->text(),
-                               array(),
-                               array( 'dest' => $oldtitle )
+                               [],
+                               [ 'dest' => $oldtitle ]
                        )
                )->parseAsBlock() );
 
diff --git a/pages/SpecialSplitThread.php b/pages/SpecialSplitThread.php
index 2f2dbb0..40fcf40 100644
--- a/pages/SpecialSplitThread.php
+++ b/pages/SpecialSplitThread.php
@@ -2,22 +2,22 @@
 // TODO access control
 class SpecialSplitThread extends ThreadActionPage {
        function getFormFields() {
-               $splitForm = array(
-                       'src' => array(
+               $splitForm = [
+                       'src' => [
                                'type' => 'info',
                                'label-message' => 'lqt-thread-split-thread',
                                'default' => LqtView::permalink( $this->mThread 
),
                                'raw' => 1,
-                       ),
-                       'subject' => array(
+                       ],
+                       'subject' => [
                                'type' => 'text',
                                'label-message' => 'lqt-thread-split-subject',
-                       ),
-                       'reason' => array(
+                       ],
+                       'reason' => [
                                'label-message' => 'movereason',
                                'type' => 'text',
-                       ),
-               );
+                       ],
+               ];
 
                return $splitForm;
        }
diff --git a/pages/TalkpageHeaderView.php b/pages/TalkpageHeaderView.php
index 99ee6a3..9f6eae8 100644
--- a/pages/TalkpageHeaderView.php
+++ b/pages/TalkpageHeaderView.php
@@ -3,23 +3,23 @@
 // Pass-through wrapper with an extra note at the top
 class TalkpageHeaderView extends LqtView {
        function customizeNavigation( $skin, &$links ) {
-               $remove = array(
+               $remove = [
                        'actions/edit',
                        'actions/addsection',
                        'views/history',
                        'actions/watch', 'actions/move'
-               );
+               ];
 
                foreach ( $remove as $rem ) {
                        list( $section, $item ) = explode( '/', $rem, 2 );
                        unset( $links[$section][$item] );
                }
 
-               $links['views']['header'] = array(
+               $links['views']['header'] = [
                        'class' => 'selected',
                        'text' => wfMessage( 'lqt-talkpage-history-tab' 
)->text(),
                        'href' => '',
-               );
+               ];
        }
 
        function show() {
@@ -49,7 +49,7 @@
                        $html .= wfMessage( 'lqt_header_warning_after_big' )
                                ->rawParams( $warn_bold, $warn_link )->parse();
 
-                       $html = Xml::tags( 'p', array( 'class' => 
'lqt_header_warning' ), $html );
+                       $html = Xml::tags( 'p', [ 'class' => 
'lqt_header_warning' ], $html );
 
                        $this->output->addHTML( $html );
                }
diff --git a/pages/TalkpageHistoryView.php b/pages/TalkpageHistoryView.php
index 17dd310..1229570 100644
--- a/pages/TalkpageHistoryView.php
+++ b/pages/TalkpageHistoryView.php
@@ -35,28 +35,28 @@
        }
 
        function getFieldMessages() {
-               $headers = array(
+               $headers = [
                        'th_timestamp' => $this->msg( 'lqt-history-time' 
)->text(),
                        'thread_subject' => $this->msg( 'lqt-history-thread' 
)->text(),
                        'th_user_text' => $this->msg( 'lqt-history-user' 
)->text(),
                        'th_change_type' => $this->msg( 'lqt-history-action' 
)->text(),
                        'th_change_comment' => $this->msg( 
'lqt-history-comment' )->text(),
-                       );
+                       ];
 
                return $headers;
        }
 
        function getQueryInfo() {
-               $queryInfo = array(
-                       'tables' => array( 'thread_history', 'thread', 'page' ),
+               $queryInfo = [
+                       'tables' => [ 'thread_history', 'thread', 'page' ],
                        'fields' => '*',
-                       'conds' => array( Threads::articleClause( 
$this->talkpage ) ),
-                       'options' => array( 'order by' => 'th_timestamp desc' ),
-                       'join_conds' => array(
-                               'thread' => array( 'LEFT JOIN', 
'thread_id=th_thread' ),
-                               'page' => array( 'LEFT JOIN', 
'thread_root=page_id' ),
-                       ),
-               );
+                       'conds' => [ Threads::articleClause( $this->talkpage ) 
],
+                       'options' => [ 'order by' => 'th_timestamp desc' ],
+                       'join_conds' => [
+                               'thread' => [ 'LEFT JOIN', 
'thread_id=th_thread' ],
+                               'page' => [ 'LEFT JOIN', 'thread_root=page_id' 
],
+                       ],
+               ];
 
                return $queryInfo;
        }
@@ -86,11 +86,11 @@
                                $link = $this->linkRenderer->makeKnownLink(
                                        $title,
                                        $value,
-                                       array(),
-                                       array()
+                                       [],
+                                       []
                                );
 
-                               return Html::rawElement( 'div', array( 'dir' => 
$wgContLang->getDir() ), $link );
+                               return Html::rawElement( 'div', [ 'dir' => 
$wgContLang->getDir() ], $link );
                        case 'th_timestamp':
                                $formatted = $wgLang->timeanddate( $value );
                                $title = Title::makeTitleSafe(
@@ -101,8 +101,8 @@
                                return $this->linkRenderer->makeLink(
                                        $title,
                                        $formatted,
-                                       array(),
-                                       array( 'lqt_oldid' => $row->th_id )
+                                       [],
+                                       [ 'lqt_oldid' => $row->th_id ]
                                );
                        default:
                                return parent::formatValue( $name, $value );
diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php
index ddea384..b031882 100644
--- a/pages/TalkpageView.php
+++ b/pages/TalkpageView.php
@@ -7,7 +7,7 @@
        const LQT_NEWEST_THREADS = 'nt';
        const LQT_OLDEST_THREADS = 'ot';
 
-       protected $mShowItems = array( 'toc', 'options', 'header' );
+       protected $mShowItems = [ 'toc', 'options', 'header' ];
        protected $talkpage;
 
        /**
@@ -27,7 +27,7 @@
        }
 
        static function customizeTalkpageNavigation( $skin, &$links, $view ) {
-               $remove = array( 'views/edit', 'views/viewsource', 
'actions/delete' );
+               $remove = [ 'views/edit', 'views/viewsource', 'actions/delete' 
];
 
                foreach ( $remove as $rem ) {
                        list( $section, $item ) = explode( '/', $rem, 2 );
@@ -59,28 +59,28 @@
 
                        $article->view();
 
-                       $actionLinks = array();
+                       $actionLinks = [];
                        $msgKey =  $article->getTitle()->quickUserCan( 'edit' ) 
? 'edit' : 'viewsource';
                        $actionLinks[] = $this->linkRenderer->makeLink(
                                $article->getTitle(),
                                new HtmlArmor( wfMessage( $msgKey )->parse() . 
"↑" ),
-                               array(),
-                               array( 'action' => 'edit' )
+                               [],
+                               [ 'action' => 'edit' ]
                        );
 
                        $actionLinks[] = $this->linkRenderer->makeLink(
                                $this->title,
                                new HtmlArmor( wfMessage( 'history_short' 
)->parse() . "↑" ),
-                               array(),
-                               array( 'action' => 'history' )
+                               [],
+                               [ 'action' => 'history' ]
                        );
 
                        if ( $wgUser->isAllowed( 'delete' ) ) {
                                $actionLinks[] = $this->linkRenderer->makeLink(
                                        $article->getTitle(),
                                        new HtmlArmor( wfMessage( 'delete' 
)->parse() . '↑' ),
-                                       array(),
-                                       array( 'action' => 'delete' )
+                                       [],
+                                       [ 'action' => 'delete' ]
                                );
                        }
 
@@ -88,10 +88,10 @@
                        foreach ( $actionLinks as $link ) {
                                $actions .= Xml::tags( 'li', null, "[$link]" ) 
. "\n";
                        }
-                       $actions = Xml::tags( 'ul', array( 'class' => 
'lqt_header_commands' ), $actions );
+                       $actions = Xml::tags( 'ul', [ 'class' => 
'lqt_header_commands' ], $actions );
                        $html .= $actions;
 
-                       $html = Xml::tags( 'div', array( 'class' => 
'lqt_header_content' ), $html );
+                       $html = Xml::tags( 'div', [ 'class' => 
'lqt_header_content' ], $html );
 
                        $this->output->addHTML( $html );
                } elseif ( $article->getTitle()->quickUserCan( 'edit' ) ) {
@@ -99,11 +99,11 @@
                        $editLink = $this->linkRenderer->makeLink(
                                $this->talkpage->getTitle(),
                                new HtmlArmor( wfMessage( 'lqt_add_header' 
)->parse() ),
-                               array(),
-                               array( 'action' => 'edit' )
+                               [],
+                               [ 'action' => 'edit' ]
                        );
 
-                       $html = Xml::tags( 'p', array( 'class' => 
'lqt_header_notice' ), "[$editLink]" );
+                       $html = Xml::tags( 'p', [ 'class' => 
'lqt_header_notice' ], "[$editLink]" );
 
                        $this->output->addHTML( $html );
                }
@@ -118,8 +118,8 @@
 
                // Header row
                $headerRow = '';
-               $headers = array( 'lqt_toc_thread_title',
-                               'lqt_toc_thread_replycount', 
'lqt_toc_thread_modified' );
+               $headers = [ 'lqt_toc_thread_title',
+                               'lqt_toc_thread_replycount', 
'lqt_toc_thread_modified' ];
                foreach ( $headers as $msg ) {
                        $headerRow .= Xml::tags( 'th', null, wfMessage( $msg 
)->parse() );
                }
@@ -127,7 +127,7 @@
                $headerRow = Xml::tags( 'thead', null, $headerRow );
 
                // Table body
-               $rows = array();
+               $rows = [];
                foreach ( $threads as $thread ) {
                        if ( $thread->root() && 
!$thread->root()->getPage()->getContent() &&
                                    !LqtView::threadContainsRepliesWithContent( 
$thread ) ) {
@@ -136,9 +136,9 @@
 
                        $row = '';
                        $anchor = '#' . $this->anchorName( $thread );
-                       $subject = Xml::tags( 'a', array( 'href' => $anchor ),
+                       $subject = Xml::tags( 'a', [ 'href' => $anchor ],
                                        Threads::stripHTML( 
$thread->formattedSubject() ) );
-                       $row .= Xml::tags( 'td', array( 'dir' => 
$wgContLang->getDir() ), $subject );
+                       $row .= Xml::tags( 'td', [ 'dir' => 
$wgContLang->getDir() ], $subject );
 
                        $row .= Xml::element( 'td', null, $wgLang->formatNum( 
$thread->replyCount() ) );
 
@@ -150,9 +150,9 @@
                }
 
                $html .= $headerRow . "\n" . Xml::tags( 'tbody', null, implode( 
"\n", $rows ) );
-               $html = $h2_header . Xml::tags( 'table', array( 'class' => 
'lqt_toc' ), $html );
+               $html = $h2_header . Xml::tags( 'table', [ 'class' => 'lqt_toc' 
], $html );
                // wrap our output in a div for containment
-               $html = Xml::tags( 'div', array( 'class' => 
'lqt-contents-wrapper' ), $html );
+               $html = Xml::tags( 'div', [ 'class' => 'lqt-contents-wrapper' 
], $html );
 
                return $html;
        }
@@ -162,14 +162,14 @@
                foreach ( $contents as $li ) {
                        $html .= Xml::tags( 'li', null, $li );
                }
-               $html = Xml::tags( $kind, array( 'class' => $class, 'id' => $id 
), $html );
+               $html = Xml::tags( $kind, [ 'class' => $class, 'id' => $id ], 
$html );
 
                return $html;
        }
 
        function getArchiveWidget() {
                $html = '';
-               $html = Xml::tags( 'div', array( 'class' => 
'lqt_archive_teaser' ), $html );
+               $html = Xml::tags( 'div', [ 'class' => 'lqt_archive_teaser' ], 
$html );
                return $html;
        }
 
@@ -199,20 +199,20 @@
 
                $html .= Xml::submitButton(
                        wfMessage( 'lqt-changesortorder' )->text(),
-                       array( 'class' => 'lqt_go_sort' )
+                       [ 'class' => 'lqt_go_sort' ]
                );
                $html .= Html::hidden( 'title', $this->title->getPrefixedText() 
);
 
                $html = Xml::tags(
                        'form',
-                       array(
+                       [
                                'action' => $form_action_url,
                                'method' => 'get',
                                'name' => 'lqt_sort'
-                       ),
+                       ],
                        $html
                );
-               $html = Xml::tags( 'div', array( 'class' => 'lqt_view_options' 
), $html );
+               $html = Xml::tags( 'div', [ 'class' => 'lqt_view_options' ], 
$html );
 
                return $html;
        }
@@ -230,11 +230,11 @@
 
                // Expose feed links.
                global $wgFeedClasses;
-               $apiParams = array( 'action' => 'feedthreads', 'type' => 
'replies|newthreads',
-                               'talkpage' => $this->title->getPrefixedText() );
+               $apiParams = [ 'action' => 'feedthreads', 'type' => 
'replies|newthreads',
+                               'talkpage' => $this->title->getPrefixedText() ];
                $urlPrefix = wfScript( 'api' ) . '?';
                foreach ( $wgFeedClasses as $format => $class ) {
-                       $theseParams = $apiParams + array( 'feedformat' => 
$format );
+                       $theseParams = $apiParams + [ 'feedformat' => $format ];
                        $url = $urlPrefix . wfArrayToCgi( $theseParams );
                        $this->output->addFeedLink( $format, $url );
                }
@@ -245,7 +245,7 @@
                }
 
                $this->output->addHTML(
-                       Xml::openElement( 'div', array( 'class' => 
'lqt-talkpage' ) )
+                       Xml::openElement( 'div', [ 'class' => 'lqt-talkpage' ] )
                );
 
                // Search!
@@ -253,12 +253,12 @@
                        $q = $this->request->getText( 'lqt_search' );
                        $q .= ' ondiscussionpage:' . 
$article->getTitle()->getPrefixedText();
 
-                       $params = array(
+                       $params = [
                                'search' => $q,
                                'fulltext' => 1,
                                'ns' . NS_LQT_THREAD => 1,
                                'srbackend' => 'LuceneSearch',
-                       );
+                       ];
 
                        $t = SpecialPage::getTitleFor( 'Search' );
                        $url = $t->getLocalURL( wfArrayToCgi( $params ) );
@@ -275,11 +275,11 @@
 
                // This closes the div of mw-content-ltr/rtl containing lang 
and dir attributes
                $this->output->addHTML(
-                       Html::closeElement( 'div' ) . Html::openElement( 'div', 
array(
+                       Html::closeElement( 'div' ) . Html::openElement( 'div', 
[
                                'class' => 'lqt-talkpage',
                                'lang' => $wgLang->getCode(),
                                'dir' => $wgLang->getDir()
-                       )
+                       ]
                ) );
 
                $html = '';
@@ -292,13 +292,13 @@
                        $newThreadText = new HtmlArmor( wfMessage( 
'lqt_new_thread' )->parse() );
                        $newThreadLink = $this->linkRenderer->makeKnownLink(
                                $this->title, $newThreadText,
-                               array( 'lqt_talkpage' => 
$this->talkpage->getTitle()->getPrefixedText() ),
-                               array( 'lqt_method' => 'talkpage_new_thread' )
+                               [ 'lqt_talkpage' => 
$this->talkpage->getTitle()->getPrefixedText() ],
+                               [ 'lqt_method' => 'talkpage_new_thread' ]
                        );
 
                        $newThreadLink = Xml::tags(
                                'strong',
-                               array( 'class' => 'lqt_start_discussion' ),
+                               [ 'class' => 'lqt_start_discussion' ],
                                $newThreadLink
                        );
 
@@ -307,14 +307,14 @@
 
                global $wgSearchTypeAlternatives, $wgSearchType;
                if ( $wgSearchType == "LuceneSearch"
-                       || in_array( "LuceneSearch", $wgSearchTypeAlternatives 
?: array() )
+                       || in_array( "LuceneSearch", $wgSearchTypeAlternatives 
?: [] )
                ) {
                        $talkpageHeader .= $this->getSearchBox();
                }
                $talkpageHeader .= $this->showTalkpageViewOptions( $article );
                $talkpageHeader = Xml::tags(
                        'div',
-                       array( 'class' => 'lqt-talkpage-header' ),
+                       [ 'class' => 'lqt-talkpage-header' ],
                        $talkpageHeader
                );
 
@@ -328,7 +328,7 @@
                        $this->showNewThreadForm( $this->talkpage );
                } else {
                        $this->output->addHTML( Xml::tags( 'div',
-                               array( 'class' => 'lqt-new-thread 
lqt-edit-form' ), '' ) );
+                               [ 'class' => 'lqt-new-thread lqt-edit-form' ], 
'' ) );
                }
 
                $pager = $this->getPager();
@@ -338,12 +338,12 @@
                if ( count( $threads ) > 0 && $this->shouldShow( 'toc' ) ) {
                        $html .= $this->getTOC( $threads );
                } elseif ( count( $threads ) == 0 ) {
-                       $html .= Xml::tags( 'div', array( 'class' => 
'lqt-no-threads' ),
+                       $html .= Xml::tags( 'div', [ 'class' => 
'lqt-no-threads' ],
                                wfMessage( 'lqt-no-threads' )->parse() );
                }
 
                $html .= $pager->getNavigationBar();
-               $html .= Xml::openElement( 'div', array( 'class' => 
'lqt-threads lqt-talkpage-threads' ) );
+               $html .= Xml::openElement( 'div', [ 'class' => 'lqt-threads 
lqt-talkpage-threads' ] );
 
                $this->output->addHTML( $html );
 
@@ -373,14 +373,14 @@
                $html .= Html::hidden( 'title', $this->title->getPrefixedText() 
);
                $html = Xml::tags(
                        'form',
-                       array(
+                       [
                                'action' => $this->title->getLocalURL(),
                                'method' => 'get'
-                       ),
+                       ],
                        $html
                );
 
-               $html = Xml::tags( 'div', array( 'class' => 
'lqt-talkpage-search' ), $html );
+               $html = Xml::tags( 'div', [ 'class' => 'lqt-talkpage-search' ], 
$html );
 
                return $html;
        }
@@ -471,15 +471,15 @@
        }
 
        function getQueryInfo() {
-               $queryInfo = array(
-                       'tables' => array( 'thread' ),
+               $queryInfo = [
+                       'tables' => [ 'thread' ],
                        'fields' => '*',
-                       'conds' => array(
+                       'conds' => [
                                Threads::articleClause( $this->article ),
                                Threads::topLevelClause(),
                                'thread_type != ' . $this->mDb->addQuotes( 
Threads::TYPE_DELETED ),
-                       ),
-               );
+                       ],
+               ];
 
                return $queryInfo;
        }
@@ -493,7 +493,7 @@
                # Don't use any extra rows returned by the query
                $numRows = min( $this->mResult->numRows(), $this->mLimit );
 
-               $rows = array();
+               $rows = [];
 
                if ( $numRows ) {
                        if ( $this->mIsBackwards ) {
@@ -554,32 +554,32 @@
                global $wgExtensionAssetsPath, $wgLang;
 
                $path = "$wgExtensionAssetsPath/LiquidThreads/images";
-               $labels = array(
+               $labels = [
                        'first' => 'table_pager_first',
                        'prev' => 'table_pager_prev',
                        'next' => 'table_pager_next',
                        'last' => 'table_pager_last',
-               );
-               $images = array(
+               ];
+               $images = [
                        'first' => 'arrow_first_25.png',
                        'prev' => 'arrow_left_25.png',
                        'next' => 'arrow_right_25.png',
                        'last' => 'arrow_last_25.png',
-               );
-               $disabledImages = array(
+               ];
+               $disabledImages = [
                        'first' => 'arrow_disabled_first_25.png',
                        'prev' => 'arrow_disabled_left_25.png',
                        'next' => 'arrow_disabled_right_25.png',
                        'last' => 'arrow_disabled_last_25.png',
-               );
+               ];
                if ( $wgLang->isRTL() ) {
                        $keys = array_keys( $labels );
                        $images = array_combine( $keys, array_reverse( $images 
) );
                        $disabledImages = array_combine( $keys, array_reverse( 
$disabledImages ) );
                }
 
-               $linkTexts = array();
-               $disabledTexts = array();
+               $linkTexts = [];
+               $disabledTexts = [];
                foreach ( $labels as $type => $label ) {
                        $msgLabel = wfMessage( $label )->escaped();
                        $linkTexts[$type] = "<img 
src=\"$path/{$images[$type]}\" " .
diff --git a/pages/ThreadActionPage.php b/pages/ThreadActionPage.php
index ab73037..61fa154 100644
--- a/pages/ThreadActionPage.php
+++ b/pages/ThreadActionPage.php
@@ -72,7 +72,7 @@
                $par = $this->mThread->title()->getPrefixedText();
 
                $form->setSubmitText( $this->getSubmitText() );
-               $form->setSubmitCallback( array( $this, 'trySubmit' ) );
+               $form->setSubmitCallback( [ $this, 'trySubmit' ] );
 
                return $form;
        }
diff --git a/pages/ThreadDiffView.php b/pages/ThreadDiffView.php
index 8cfe326..e944e18 100644
--- a/pages/ThreadDiffView.php
+++ b/pages/ThreadDiffView.php
@@ -2,7 +2,7 @@
 
 class ThreadDiffView extends LqtView {
        function customizeNavigation( $skin, &$links ) {
-               $remove = array( 'views/edit', 'views/viewsource' );
+               $remove = [ 'views/edit', 'views/viewsource' ];
 
                foreach ( $remove as $rem ) {
                        list( $section, $item ) = explode( '/', $rem, 2 );
diff --git a/pages/ThreadHistoricalRevisionView.php 
b/pages/ThreadHistoricalRevisionView.php
index bd18ae5..4df3e04 100644
--- a/pages/ThreadHistoricalRevisionView.php
+++ b/pages/ThreadHistoricalRevisionView.php
@@ -20,7 +20,7 @@
        }
 
        function getMessageForChangeType( $ct ) {
-               static $messages = array(
+               static $messages = [
                        Threads::CHANGE_NEW_THREAD => 'lqt_change_new_thread',
                        Threads::CHANGE_REPLY_CREATED => 
'lqt_change_reply_created',
                        Threads::CHANGE_DELETED => 'lqt_change_deleted',
@@ -34,7 +34,7 @@
                        Threads::CHANGE_EDITED_SUMMARY => 
'lqt_change_edited_summary',
                        Threads::CHANGE_ROOT_BLANKED => 
'lqt_change_root_blanked',
                        Threads::CHANGE_EDITED_ROOT => 'lqt_change_edited_root',
-               );
+               ];
 
                if ( isset( $messages[$ct] ) ) {
                        return $messages[$ct];
@@ -56,13 +56,13 @@
                $html .= '<br />';
                $html .=  $this->getChangeDescription();
 
-               $html = Xml::tags( 'div', array( 'class' => 'lqt_history_info' 
), $html );
+               $html = Xml::tags( 'div', [ 'class' => 'lqt_history_info' ], 
$html );
 
                $this->output->addHTML( $html );
        }
 
        function getChangeDescription() {
-               $args = array();
+               $args = [];
 
                $revision = $this->mDisplayRevision;
                $change_type = $revision->getChangeType();
@@ -132,11 +132,11 @@
                        $this->thread,
                        1,
                        1,
-                       array(
+                       [
                                'maxDepth' => - 1,
                                'maxCount' => - 1,
-                               'mustShowThreads' => array( 
$changedObject->id() )
-                       )
+                               'mustShowThreads' => [ $changedObject->id() ]
+                       ]
                );
 
                $this->output->setPageTitle( $this->thread->subject() );
diff --git a/pages/ThreadPermalinkView.php b/pages/ThreadPermalinkView.php
index 343bf25..09ffe7e 100644
--- a/pages/ThreadPermalinkView.php
+++ b/pages/ThreadPermalinkView.php
@@ -17,7 +17,7 @@
                        unset( $links['views']['edit'] );
                        unset( $links['views']['history'] );
 
-                       $links['actions'] = array();
+                       $links['actions'] = [];
 
                        unset( $links['namespaces'][$talkKey] );
                        return;
@@ -62,12 +62,12 @@
        // Pre-generates the tabs to be included, for customizeNavigation
        // to insert in the appropriate place
        static function getCustomTabs( $view ) {
-               $tabs = array();
+               $tabs = [];
 
                $articleTitle = $view->thread->getTitle()->getSubjectPage();
                $talkTitle = $view->thread->getTitle()->getTalkPage();
 
-               $articleClasses = array();
+               $articleClasses = [];
                if ( !$articleTitle->exists() ) {
                        $articleClasses[] = 'new';
                }
@@ -75,7 +75,7 @@
                        $articleClasses[] = 'selected';
                }
 
-               $talkClasses = array();
+               $talkClasses = [];
                if ( !$talkTitle->exists() ) {
                        $talkClasses[] = 'new';
                }
@@ -87,19 +87,19 @@
                }
 
                $tabs['article'] =
-                       array(
+                       [
                                'text' => $articleNamespaceText,
                                'href' => $articleTitle->getLocalURL(),
                                'class' => implode( ' ', $articleClasses ),
-                       );
+                       ];
 
                $tabs['lqt_talk'] =
-                       array(
+                       [
                                // talkpage certainly exists since this thread 
is from it.
                                'text' => wfMessage( 'talk' )->text(),
                                'href' => $talkTitle->getLocalURL(),
                                'class' => implode( ' ', $talkClasses ),
-                       );
+                       ];
 
                return $tabs;
        }
@@ -177,14 +177,14 @@
                        // Expose feed links.
                        global $wgFeedClasses;
                        $thread = $topmostThreadTitle->getPrefixedText();
-                       $apiParams = array(
+                       $apiParams = [
                                'action' => 'feedthreads',
                                'type' => 'replies|newthreads',
                                'thread' => $thread
-                       );
+                       ];
                        $urlPrefix = wfScript( 'api' ) . '?';
                        foreach ( $wgFeedClasses as $format => $class ) {
-                               $theseParams = $apiParams + array( 'feedformat' 
=> $format );
+                               $theseParams = $apiParams + [ 'feedformat' => 
$format ];
                                $url = $urlPrefix . wfArrayToCgi( $theseParams 
);
                                $this->output->addFeedLink( $format, $url );
                        }
@@ -198,7 +198,7 @@
                        $this->showSplitForm( $this->thread );
                }
 
-               $this->showThread( $this->thread, 1, 1, array( 'maxDepth' => - 
1, 'maxCount' => - 1 ) );
+               $this->showThread( $this->thread, 1, 1, [ 'maxDepth' => - 1, 
'maxCount' => - 1 ] );
 
                $this->output->setPageTitle( $this->thread->subject() );
                return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib23b716a8efdbd589af96ed941f80fab18031c6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to