From 1a7b4f9d62f97d6a609d6beadb9452bd0f8ba724 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 20 Dec 2006 16:51:26 +0000 Subject: [PATCH] Fix regressions in behaviour of Special:Booksources --- includes/SpecialBooksources.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/includes/SpecialBooksources.php b/includes/SpecialBooksources.php index 4faeb5a2c3..5c047fbe34 100644 --- a/includes/SpecialBooksources.php +++ b/includes/SpecialBooksources.php @@ -35,7 +35,7 @@ class SpecialBookSources extends SpecialPage { $wgOut->addWikiText( wfMsgNoTrans( 'booksources-summary' ) ); $wgOut->addHtml( $this->makeForm() ); if( strlen( $this->isbn) > 0 ) - $wgOut->addHtml( $this->makeList() ); + $this->showList(); } /** @@ -67,28 +67,30 @@ class SpecialBookSources extends SpecialPage { } /** - * Generate the list of book sources + * Determine where to get the list of book sources from, + * format and output them * * @return string */ - private function makeList() { + private function showList() { global $wgOut, $wgContLang; # Check for a local page such as Project:Book_sources and use that if available $title = Title::makeTitleSafe( NS_PROJECT, wfMsg( 'booksources' ) ); # Should this be wfMsgForContent()? -- RC if( is_object( $title ) && $title->exists() ) { $rev = Revision::newFromTitle( $title ); - return $wgOut->parse( str_replace( 'MAGICNUMBER', $this->isbn, $rev->getText() ) ); + $wgOut->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $rev->getText() ) ); + return true; } # Fall back to the defaults given in the language file - $html = $wgOut->parse( wfMsg( 'booksources-text' ) ); - $html .= '' ); + return true; } /** -- 2.20.1