X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/mediawiki.git/blobdiff_plain/87219ebd28426c6d21cb545233ee52f5f7af7dfd..refs/tags/mediawiki-1.17.0:/includes/specials/SpecialBooksources.php diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 8ee5467a..67fb5404 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -1,4 +1,25 @@ addHTML( $this->makeForm() ); if( strlen( $this->isbn ) > 0 ) { if( !self::isValidISBN( $this->isbn ) ) { - $wgOut->wrapWikiMsg( "
\n$1
", 'booksources-invalid-isbn' ); + $wgOut->wrapWikiMsg( "
\n$1\n
", 'booksources-invalid-isbn' ); } $this->showList(); } @@ -48,7 +69,6 @@ class SpecialBookSources extends SpecialPage { public static function isValidISBN( $isbn ) { $isbn = self::cleanIsbn( $isbn ); $sum = 0; - $check = -1; if( strlen( $isbn ) == 13 ) { for( $i = 0; $i < 12; $i++ ) { if($i % 2 == 0) { @@ -78,7 +98,6 @@ class SpecialBookSources extends SpecialPage { return false; } - /** * Trim ISBN and remove characters which aren't required * @@ -99,9 +118,9 @@ class SpecialBookSources extends SpecialPage { $title = self::getTitleFor( 'Booksources' ); $form = '
' . wfMsgHtml( 'booksources-search-legend' ) . ''; $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); - $form .= Xml::hidden( 'title', $title->getPrefixedText() ); + $form .= Html::hidden( 'title', $title->getPrefixedText() ); $form .= '

' . Xml::inputLabel( wfMsg( 'booksources-isbn' ), 'isbn', 'isbn', 20, $this->isbn ); - $form .= ' ' . Xml::submitButton( wfMsg( 'booksources-go' ) ) . '

'; + $form .= ' ' . Xml::submitButton( wfMsg( 'booksources-go' ) ) . '

'; $form .= Xml::closeElement( 'form' ); $form .= '
'; return $form; @@ -147,6 +166,6 @@ class SpecialBookSources extends SpecialPage { */ private function makeListItem( $label, $url ) { $url = str_replace( '$1', $this->isbn, $url ); - return '
  • ' . htmlspecialchars( $label ) . '
  • '; + return '
  • ' . htmlspecialchars( $label ) . '
  • '; } }