X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialBooksources.php;h=bd8596f4dbc02c9e3a08f07bf4a9a2a59011cb81;hb=3f7fe13247c19fc02e48c9b50bafb9e1c0d07700;hp=b19306718b005c563bea4f31eacf05aa4ed51a8e;hpb=82571fa72d85160fc679a545dd6f5d52df9e47c6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialBooksources.php b/includes/SpecialBooksources.php index b19306718b..bd8596f4db 100644 --- a/includes/SpecialBooksources.php +++ b/includes/SpecialBooksources.php @@ -1,10 +1,16 @@ show(); } +/** + * + * @package MediaWiki + * @subpackage SpecialPage + */ class BookSourceList { var $mIsbn; @@ -36,14 +47,15 @@ class BookSourceList { } function showList() { - global $wgOut, $wgUser, $wgLang; + global $wgOut, $wgUser, $wgContLang; $fname = "BookSourceList::showList()"; # First, see if we have a custom list setup in # [[Wikipedia:Book sources]] or equivalent. - $bstitle = Title::makeTitleSafe( NS_WIKIPEDIA, wfMsg( "booksources" ) ); - $dbr =& wfGetDB( DB_SLAVE ); - $bstext = $dbr->selectField( 'cur', 'cur_text', $bstitle->curCond(), $fname ); + $bstitle = Title::makeTitleSafe( NS_PROJECT, wfMsg( "booksources" ) ); + $bsarticle = new Article( $bstitle ); + $bstext = $bsarticle->getContent( false ); + if( $bstext ) { $bstext = str_replace( "MAGICNUMBER", $this->mIsbn, $bstext ); $wgOut->addWikiText( $bstext ); @@ -52,7 +64,7 @@ class BookSourceList { # Otherwise, use the list of links in the default Language.php file. $s = wfMsg( "booksourcetext" ) . "