re bug #25523: add mime.info and mime.types for *.dwg files so that when people add...
[lhc/web/wiklou.git] / includes / LinkCache.php
index 4b6f964..e2db69a 100644 (file)
@@ -132,11 +132,11 @@ class LinkCache {
         * @return Integer
         */
        public function addLinkObj( $nt ) {
-               global $wgAntiLockFlags, $wgProfiler;
+               global $wgAntiLockFlags;
                wfProfileIn( __METHOD__ );
 
                $key = $nt->getPrefixedDBkey();
-               if ( $this->isBadLink( $key ) ) {
+               if ( $this->isBadLink( $key ) || $nt->isExternal() ) {
                        wfProfileOut( __METHOD__ );
                        return 0;
                }
@@ -150,7 +150,7 @@ class LinkCache {
                        wfProfileOut( __METHOD__ );
                        return 0;
                }
-               
+
                # Some fields heavily used for linking...
                if ( $this->mForUpdate ) {
                        $db = wfGetDB( DB_MASTER );
@@ -164,7 +164,7 @@ class LinkCache {
                        $options = array();
                }
 
-               $s = $db->selectRow( 'page', 
+               $s = $db->selectRow( 'page',
                        array( 'page_id', 'page_len', 'page_is_redirect', 'page_latest' ),
                        array( 'page_namespace' => $nt->getNamespace(), 'page_title' => $nt->getDBkey() ),
                        __METHOD__, $options );