From 0006d922b06a15eed803db9790743180f9d2fa87 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 5 May 2019 11:37:01 +0300 Subject: [PATCH] NS_MEDIA also always has page_id 0 Change-Id: I0047e5f8e367fe3e8433e715ea56616a6f8dab85 --- includes/cache/LinkCache.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 ); -- 2.20.1