Merge "Added new MWTimestamp::getRelativeTimestamp for pure relative."
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index b322547..59f0dfe 100644 (file)
@@ -239,12 +239,8 @@ class SpecialWatchlist extends SpecialPage {
                        $output->showLagWarning( $lag );
                }
 
-               # Create output form
-               $form = Xml::fieldset(
-                       $this->msg( 'watchlist-options' )->text(),
-                       false,
-                       array( 'id' => 'mw-watchlist-options' )
-               );
+               # Create output
+               $form = '';
 
                # Show watchlist header
                $form .= "<p>";
@@ -269,7 +265,16 @@ class SpecialWatchlist extends SpecialPage {
                        $form .= Xml::closeElement( 'form' ) . "\n";
                }
 
-               $form .= "<hr />\n";
+               $form .= Xml::openElement( 'form', array(
+                       'method' => 'post',
+                       'action' => $this->getTitle()->getLocalURL(),
+                       'id' => 'mw-watchlist-form'
+               ) );
+               $form .= Xml::fieldset(
+                       $this->msg( 'watchlist-options' )->text(),
+                       false,
+                       array( 'id' => 'mw-watchlist-options' )
+               );
 
                $tables = array( 'recentchanges', 'watchlist' );
                $fields = RecentChange::selectFields();
@@ -349,7 +354,6 @@ class SpecialWatchlist extends SpecialPage {
                $form .= $wlInfo;
                $form .= $cutofflinks;
                $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(
@@ -380,8 +384,8 @@ class SpecialWatchlist extends SpecialPage {
                foreach ( $hiddenFields as $key => $value ) {
                        $form .= Html::hidden( $key, $value ) . "\n";
                }
-               $form .= Xml::closeElement( 'form' ) . "\n";
                $form .= Xml::closeElement( 'fieldset' ) . "\n";
+               $form .= Xml::closeElement( 'form' ) . "\n";
                $output->addHTML( $form );
 
                # If there's nothing to show, stop here
@@ -448,7 +452,7 @@ class SpecialWatchlist extends SpecialPage {
 
        protected function showHideLink( $options, $message, $name, $value ) {
                $label = $this->msg( $value ? 'show' : 'hide' )->escaped();
-               $options[$name] = 1 - (int) $value;
+               $options[$name] = 1 - (int)$value;
 
                return $this->msg( $message )->rawParams( Linker::linkKnown( $this->getTitle(), $label, array(), $options ) )->escaped();
        }