From: Rob Church Date: Wed, 20 Dec 2006 16:51:26 +0000 (+0000) Subject: Fix regressions in behaviour of Special:Booksources X-Git-Tag: 1.31.0-rc.0~54830 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=1a7b4f9d62f97d6a609d6beadb9452bd0f8ba724;p=lhc%2Fweb%2Fwiklou.git Fix regressions in behaviour of Special:Booksources --- 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; } /**