From 7fb4f4d58efb99ed3427008a6cebf448423e9450 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 29 May 2005 05:31:29 +0000 Subject: [PATCH] Completed reversion of removal of non-incremental link updates. Reasons previously explained. --- includes/DefaultSettings.php | 4 ++++ includes/LinksUpdate.php | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c552e2211f..fac55a949c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -893,6 +893,10 @@ $wgShowEXIF = function_exists( 'exif_read_data' ); */ $wgRemoteUploads = false; $wgDisableAnonTalk = false; +/** + * Do DELETE/INSERT for link updates instead of incremental + */ +$wgUseDumbLinkUpdate = false; /** * Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index f01beb2011..506402e407 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -33,9 +33,14 @@ class LinksUpdate { */ function doUpdate() { - global $wgUseBetterLinksUpdate, $wgLinkCache, $wgDBtransactions; + global $wgUseDumbLinkUpdate, $wgLinkCache, $wgDBtransactions; global $wgEnablePersistentLC, $wgUseCategoryMagic; + if ( $wgUseDumbLinkUpdate ) { + $this->doDumbUpdate(); + return; + } + $fname = 'LinksUpdate::doUpdate'; wfProfileIn( $fname ); @@ -203,7 +208,7 @@ class LinksUpdate { array_push( $arr, array( 'pl_from' => $this->mId, 'pl_namespace' => $target->getNamespace(), - 'pl_title' => $target->getTitle() ) ); + 'pl_title' => $target->getDBkey() ) ); } $dbw->insert( 'pagelinks', $arr, $fname, array( 'IGNORE' ) ); } -- 2.20.1