respect ALF_NO_LINK_LOCK
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 26 Jun 2005 08:25:18 +0000 (08:25 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 26 Jun 2005 08:25:18 +0000 (08:25 +0000)
includes/LinkCache.php

index 41f916b..dae7533 100644 (file)
@@ -181,6 +181,7 @@ class LinkCache {
         * @param Title $fromtitle
         */
        function preFill( &$fromtitle ) {
+               global $wgAntiLockFlags;
                $fname = 'LinkCache::preFill';
                wfProfileIn( $fname );
 
@@ -196,7 +197,11 @@ class LinkCache {
                
                if ( $this->mForUpdate ) {
                        $db =& wfGetDB( DB_MASTER );
-                       $options = 'FOR UPDATE';
+                       if ( !( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) ) {
+                               $options = 'FOR UPDATE';
+                       } else {
+                               $options = '';
+                       }
                } else {
                        $db =& wfGetDB( DB_SLAVE );
                        $options = '';