Completed reversion of removal of non-incremental link updates. Reasons previously...
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 05:31:29 +0000 (05:31 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 05:31:29 +0000 (05:31 +0000)
includes/DefaultSettings.php
includes/LinksUpdate.php

index c552e22..fac55a9 100644 (file)
@@ -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
index f01beb2..506402e 100644 (file)
@@ -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' ) );
                }