* (bug 1850) Additional fixes so existing local and remote images
[lhc/web/wiklou.git] / includes / LinksUpdate.php
index f01beb2..2e02aec 100644 (file)
@@ -33,8 +33,12 @@ class LinksUpdate {
         */
        
        function doUpdate() {
-               global $wgUseBetterLinksUpdate, $wgLinkCache, $wgDBtransactions;
-               global $wgEnablePersistentLC, $wgUseCategoryMagic;
+               global $wgUseDumbLinkUpdate, $wgLinkCache, $wgUseCategoryMagic;
+
+               if ( $wgUseDumbLinkUpdate ) {
+                       $this->doDumbUpdate();
+                       return;
+               }
 
                $fname = 'LinksUpdate::doUpdate';
                wfProfileIn( $fname );
@@ -65,7 +69,7 @@ class LinksUpdate {
                        $dbw->delete( 'pagelinks', array( 'pl_from' => $this->mId ), $fname );
                                                
                        # Get the addition list
-                       $add = $wgLinkCache->getGoodLinks();
+                       $add = $wgLinkCache->getPageLinks();
                }
 
                # Do the insertion
@@ -184,7 +188,7 @@ class LinksUpdate {
          * Also useful where link table corruption needs to be repaired, e.g. in refreshLinks.php
         */
        function doDumbUpdate() {
-               global $wgLinkCache, $wgDBtransactions, $wgUseCategoryMagic;
+               global $wgLinkCache, $wgUseCategoryMagic;
                $fname = 'LinksUpdate::doDumbUpdate';
                wfProfileIn( $fname );
                
@@ -203,7 +207,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' ) );
                }