Special:Watchlist: Add user preference to "Show last" options, fix float comparison
[lhc/web/wiklou.git] / includes / specials / SpecialComparePages.php
index 3b82326..0f8b729 100644 (file)
@@ -43,17 +43,19 @@ class SpecialComparePages extends SpecialPage {
        /**
         * Show a form for filtering namespace and username
         *
-        * @param $par String
-        * @return String
+        * @param string $par
+        * @return string
         */
        public function execute( $par ) {
                $this->setHeaders();
                $this->outputHeader();
 
+               # Form (.mw-searchInput enables suggestions)
                $form = new HTMLForm( array(
                        'Page1' => array(
                                'type' => 'text',
                                'name' => 'page1',
+                               'cssclass' => 'mw-searchInput',
                                'label-message' => 'compare-page1',
                                'size' => '40',
                                'section' => 'page1',
@@ -70,6 +72,7 @@ class SpecialComparePages extends SpecialPage {
                        'Page2' => array(
                                'type' => 'text',
                                'name' => 'page2',
+                               'cssclass' => 'mw-searchInput',
                                'label-message' => 'compare-page2',
                                'size' => '40',
                                'section' => 'page2',
@@ -136,6 +139,7 @@ class SpecialComparePages extends SpecialPage {
                                return $title->getLatestRevID();
                        }
                }
+
                return null;
        }
 
@@ -150,6 +154,7 @@ class SpecialComparePages extends SpecialPage {
                if ( !$title->exists() ) {
                        return $this->msg( 'compare-title-not-exists' )->parseAsBlock();
                }
+
                return true;
        }
 
@@ -161,6 +166,7 @@ class SpecialComparePages extends SpecialPage {
                if ( $revision === null ) {
                        return $this->msg( 'compare-revision-not-exists' )->parseAsBlock();
                }
+
                return true;
        }