Merge "Use Xml::element instead of Html::element for empty elements"
[lhc/web/wiklou.git] / includes / specials / SpecialBooksources.php
index 79636b1..72f4e46 100644 (file)
@@ -30,7 +30,6 @@
  * @ingroup SpecialPage
  */
 class SpecialBookSources extends SpecialPage {
-
        /**
         * ISBN passed to the page, if any
         */
@@ -55,7 +54,10 @@ class SpecialBookSources extends SpecialPage {
                $this->getOutput()->addHTML( $this->makeForm() );
                if ( strlen( $this->isbn ) > 0 ) {
                        if ( !self::isValidISBN( $this->isbn ) ) {
-                               $this->getOutput()->wrapWikiMsg( "<div class=\"error\">\n$1\n</div>", 'booksources-invalid-isbn' );
+                               $this->getOutput()->wrapWikiMsg(
+                                       "<div class=\"error\">\n$1\n</div>",
+                                       'booksources-invalid-isbn'
+                               );
                        }
                        $this->showList();
                }
@@ -115,13 +117,22 @@ class SpecialBookSources extends SpecialPage {
         * @return string
         */
        private function makeForm() {
-               global $wgScript;
-
                $form = Html::openElement( 'fieldset' ) . "\n";
-               $form .= Html::element( 'legend', array(), $this->msg( 'booksources-search-legend' )->text() ) . "\n";
-               $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n";
+               $form .= Html::element(
+                       'legend',
+                       array(),
+                       $this->msg( 'booksources-search-legend' )->text()
+               ) . "\n";
+               $form .= Html::openElement( 'form', array( 'method' => 'get', 'action' => wfScript() ) ) . "\n";
                $form .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . "\n";
-               $form .= '<p>' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn, array( 'autofocus' => true ) );
+               $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";