LinkCache: Don't try looking up NS_SPECIAL
authorKunal Mehta <legoktm@member.fsf.org>
Fri, 20 May 2016 02:01:48 +0000 (19:01 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 26 May 2016 21:47:45 +0000 (14:47 -0700)
Change-Id: I1afe8c780c3b12ae806ac19c4efb37c7033951ca

includes/cache/LinkCache.php

index de44f9b..3fd29f3 100644 (file)
@@ -230,7 +230,9 @@ class LinkCache {
         */
        public function addLinkObj( LinkTarget $nt ) {
                $key = $this->titleFormatter->getPrefixedDBkey( $nt );
-               if ( $this->isBadLink( $key ) || $nt->isExternal() ) {
+               if ( $this->isBadLink( $key ) || $nt->isExternal()
+                       || $nt->inNamespace( NS_SPECIAL )
+               ) {
                        return 0;
                }
                $id = $this->getGoodLinkID( $key );