From: Niklas Laxström Date: Sun, 3 Jul 2005 13:03:33 +0000 (+0000) Subject: Check if page actually exists X-Git-Tag: 1.5.0beta2~46 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=e361fc54f329132ed8b60361e71ce0174cb0a4e9;p=lhc%2Fweb%2Fwiklou.git Check if page actually exists --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fe8c138a20..f6610e8148 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -456,7 +456,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. dynamic date conversion. * FiveUpgrade: large table hacks, install iw_trans update before links * (bug 2648) Rename namespaces in Afrikaanse - +* Special:Booksources checks if custom list page exists before using it === Caveats === diff --git a/includes/SpecialBooksources.php b/includes/SpecialBooksources.php index bd8596f4db..85a8178448 100644 --- a/includes/SpecialBooksources.php +++ b/includes/SpecialBooksources.php @@ -54,12 +54,13 @@ class BookSourceList { # [[Wikipedia:Book sources]] or equivalent. $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 ); - return; + if( $bsarticle->exists() ) { + $bstext = $bsarticle->getContent( false ); + if( $bstext ) { + $bstext = str_replace( "MAGICNUMBER", $this->mIsbn, $bstext ); + $wgOut->addWikiText( $bstext ); + return; + } } # Otherwise, use the list of links in the default Language.php file.