diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/cache/LinkCache.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/cache/LinkCache.php')
-rw-r--r-- | includes/cache/LinkCache.php | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/includes/cache/LinkCache.php b/includes/cache/LinkCache.php index 6925df90..eace1eea 100644 --- a/includes/cache/LinkCache.php +++ b/includes/cache/LinkCache.php @@ -216,25 +216,20 @@ class LinkCache { * @return int */ public function addLinkObj( $nt ) { - global $wgAntiLockFlags, $wgContentHandlerUseDB; - - wfProfileIn( __METHOD__ ); + global $wgContentHandlerUseDB; $key = $nt->getPrefixedDBkey(); if ( $this->isBadLink( $key ) || $nt->isExternal() ) { - wfProfileOut( __METHOD__ ); return 0; } $id = $this->getGoodLinkID( $key ); if ( $id != 0 ) { - wfProfileOut( __METHOD__ ); return $id; } if ( $key === '' ) { - wfProfileOut( __METHOD__ ); return 0; } @@ -242,14 +237,8 @@ class LinkCache { # Some fields heavily used for linking... if ( $this->mForUpdate ) { $db = wfGetDB( DB_MASTER ); - if ( !( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) ) { - $options = array( 'FOR UPDATE' ); - } else { - $options = array(); - } } else { $db = wfGetDB( DB_SLAVE ); - $options = array(); } $f = array( 'page_id', 'page_len', 'page_is_redirect', 'page_latest' ); @@ -259,7 +248,7 @@ class LinkCache { $s = $db->selectRow( 'page', $f, array( 'page_namespace' => $nt->getNamespace(), 'page_title' => $nt->getDBkey() ), - __METHOD__, $options ); + __METHOD__ ); # Set fields... if ( $s !== false ) { $this->addGoodLinkObjFromRow( $nt, $s ); @@ -269,8 +258,6 @@ class LinkCache { $id = 0; } - wfProfileOut( __METHOD__ ); - return $id; } |