From: Brion Vibber Date: Wed, 1 Oct 2003 22:57:50 +0000 (+0000) Subject: skip illegal links X-Git-Tag: 1.1.0~227 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=65ddd4bd1d7f2accc6c60532930ea557fe3de374;p=lhc%2Fweb%2Fwiklou.git skip illegal links --- diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index 23922fd206..8d1c4ba556 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -15,6 +15,10 @@ function wfSpecialWhatlinkshere($par = NULL) return; } $nt = Title::newFromURL( $target ); + if( !$nt ) { + $wgOut->errorpage( "notargettitle", "notargettext" ); + return; + } $wgOut->setPagetitle( $nt->getPrefixedText() ); $wgOut->setSubtitle( wfMsg( "linklistsub" ) ); @@ -81,6 +85,9 @@ function wfShowIndirectLinks( $level, $lid ) $wgOut->addHTML( "\n" ); }