Cleanup form for history
authorAmir Sarabadani <ladsgroup@gmail.com>
Sun, 17 Sep 2017 13:20:34 +0000 (17:20 +0400)
committerAmir Sarabadani <ladsgroup@gmail.com>
Mon, 18 Sep 2017 18:17:36 +0000 (22:17 +0400)
Also fixing regression caused by Ie119c92aa4936e2f8982163d4b00d08949f49264

Change-Id: I59f623d2dc43f83cfca3ff31ef79fed0230f68af

includes/actions/HistoryAction.php

index 7460340..fe84852 100644 (file)
@@ -192,27 +192,26 @@ class HistoryAction extends FormlessAction {
 
                // Add the general form
                $action = htmlspecialchars( wfScript() );
+               $content = Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n";
+               $content .= Html::hidden( 'action', 'history' ) . "\n";
+               $content .= Xml::dateMenu(
+                       ( $year == null ? MWTimestamp::getLocalInstance()->format( 'Y' ) : $year ),
+                       $month
+               ) . '&#160;';
+               $content .= $tagSelector ? ( implode( '&#160;', $tagSelector ) . '&#160;' ) : '';
+               $content .= $checkDeleted . Html::submitButton(
+                       $this->msg( 'historyaction-submit' )->text(),
+                       [],
+                       [ 'mw-ui-progressive' ]
+               );
                $out->addHTML(
                        "<form action=\"$action\" method=\"get\" id=\"mw-history-searchform\">" .
                        Xml::fieldset(
                                $this->msg( 'history-fieldset-title' )->text(),
-                               false,
+                               $content,
                                [ 'id' => 'mw-history-search' ]
                        ) .
-                       Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" .
-                       Html::hidden( 'action', 'history' ) . "\n" .
-                       Xml::dateMenu(
-                               ( $year == null ? MWTimestamp::getLocalInstance()->format( 'Y' ) : $year ),
-                               $month
-                       ) . '&#160;' .
-                       ( $tagSelector ? ( implode( '&#160;', $tagSelector ) . '&#160;' ) : '' ) .
-                       $checkDeleted .
-                       Html::submitButton(
-                               $this->msg( 'historyaction-submit' )->text(),
-                               [],
-                               [ 'mw-ui-progressive' ]
-                       ) . "\n" .
-                       '</fieldset></form>'
+                       '</form>'
                );
 
                Hooks::run( 'PageHistoryBeforeList', [ &$this->page, $this->getContext() ] );