From: Brion Vibber Date: Fri, 10 Oct 2003 20:56:51 +0000 (+0000) Subject: Skip links with namespace but no title X-Git-Tag: 1.1.0~216 X-Git-Url: http://git.cyclocoop.org/%27%20.%20url_absolue%28%24favicon%29%20.%20?a=commitdiff_plain;h=9f9a988e0656b7f08a4cbf0ebf6c356bdd806aa6;p=lhc%2Fweb%2Fwiklou.git Skip links with namespace but no title --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 18fefbb1a5..4f5a53e4d4 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -977,8 +977,10 @@ $t[] = "" ; if ( preg_match( "/^((?:i|x|[a-z]{2,3})(?:-[a-z0-9]+)?|[A-Za-z\\x80-\\xff]+):(.*)\$/", $link, $m ) ) { $pre = strtolower( $m[1] ); - $suf = $m[2]; - if ( $wgLang->getNsIndex( $pre ) == + $suf = trim($m[2]); + if( empty( $suf ) ) { + $s .= $trail; + } else if ( $wgLang->getNsIndex( $pre ) == Namespace::getImage() ) { $nt = Title::newFromText( $suf ); $name = $nt->getDBkey();