Remove useless method overriding
[lhc/web/wiklou.git] / includes / specials / SpecialBooksources.php
index b3933c5..5ad961c 100644 (file)
@@ -95,6 +95,7 @@ class SpecialBookSources extends SpecialPage {
                                return true;
                        }
                }
+
                return false;
        }
 
@@ -120,7 +121,7 @@ class SpecialBookSources extends SpecialPage {
                $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n";
                $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n";
                $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n";
-               $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn );
+               $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) );
                $form .= '&#160;' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . "</p>\n";
                $form .= Html::closeElement( 'form' ) . "\n";
                $form .= Html::closeElement( 'fieldset' ) . "\n";
@@ -153,6 +154,7 @@ class SpecialBookSources extends SpecialPage {
 
                                $text = $content->getNativeData();
                                $this->getOutput()->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $text ) );
+
                                return true;
                        } else {
                                throw new MWException( "Unexpected content type for book sources: " . $content->getModel() );
@@ -163,9 +165,11 @@ class SpecialBookSources extends SpecialPage {
                $this->getOutput()->addWikiMsg( 'booksources-text' );
                $this->getOutput()->addHTML( '<ul>' );
                $items = $wgContLang->getBookstoreList();
-               foreach ( $items as $label => $url )
+               foreach ( $items as $label => $url ) {
                        $this->getOutput()->addHTML( $this->makeListItem( $label, $url ) );
+               }
                $this->getOutput()->addHTML( '</ul>' );
+
                return true;
        }
 
@@ -178,6 +182,7 @@ class SpecialBookSources extends SpecialPage {
         */
        private function makeListItem( $label, $url ) {
                $url = str_replace( '$1', $this->isbn, $url );
+
                return Html::rawElement( 'li', array(),
                        Html::element( 'a', array( 'href' => $url, 'class' => 'external' ), $label ) );
        }