From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001
From: Pierre Schmitz
Date: Wed, 22 Jun 2011 11:28:20 +0200
Subject: update to MediaWiki 1.17.0
---
includes/specials/SpecialBooksources.php | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
(limited to '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 = '
';
$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 ) . '';
}
}
--
cgit v1.2.3-54-g00ecf