From: Aryeh Gregor Date: Sun, 5 May 2019 08:37:01 +0000 (+0300) Subject: NS_MEDIA also always has page_id 0 X-Git-Tag: 1.34.0-rc.0~1802^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/Category:Foo?a=commitdiff_plain;h=0006d922b06a15eed803db9790743180f9d2fa87;p=lhc%2Fweb%2Fwiklou.git NS_MEDIA also always has page_id 0 Change-Id: I0047e5f8e367fe3e8433e715ea56616a6f8dab85 --- diff --git a/includes/cache/LinkCache.php b/includes/cache/LinkCache.php index c13f95e1ed..33feee29ab 100644 --- a/includes/cache/LinkCache.php +++ b/includes/cache/LinkCache.php @@ -231,9 +231,7 @@ class LinkCache { */ public function addLinkObj( LinkTarget $nt ) { $key = $this->titleFormatter->getPrefixedDBkey( $nt ); - if ( $this->isBadLink( $key ) || $nt->isExternal() - || $nt->inNamespace( NS_SPECIAL ) - ) { + if ( $this->isBadLink( $key ) || $nt->isExternal() || $nt->getNamespace() < 0 ) { return 0; } $id = $this->getGoodLinkID( $key );