minor bug fix
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 21 Aug 2004 15:14:56 +0000 (15:14 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 21 Aug 2004 15:14:56 +0000 (15:14 +0000)
includes/Article.php
includes/LinksUpdate.php

index ec07e3d..ebe5fb0 100644 (file)
@@ -1073,7 +1073,7 @@ class Article {
                $wgOut->addWikiText( $text );
 
                # Look up the links in the DB and add them to the link cache
-               $wgOut->replaceLinkHolders( RLH_FOR_UPDATE );
+               $wgOut->transformBuffer( RLH_FOR_UPDATE );
 
                if( $wgMwRedir->matchStart( $text ) )
                        $r = 'redirect=no';
index 435d610..a64328d 100644 (file)
@@ -56,12 +56,12 @@ class LinksUpdate {
                        $arr=array();
                        foreach($add as $lt=>$lid) 
                                array_push($arr,array(
-                                       'l_from'=>$this->mId,
-                                       'l_to'=>$lid));
-                        # The link cache was constructed without FOR UPDATE, so there may be collisions
-                        # Ignoring for now, I'm not sure if that causes problems or not, but I'm fairly
-                        # sure it's better than without IGNORE
-                       $dbw->insertArray($links,$arr,array('IGNORE'));
+                                                       'l_from'=>$this->mId,
+                                                       'l_to'=>$lid));
+                       # The link cache was constructed without FOR UPDATE, so there may be collisions
+                       # Ignoring for now, I'm not sure if that causes problems or not, but I'm fairly
+                       # sure it's better than without IGNORE
+                       $dbw->insertArray('links', $arr, $fname, array('IGNORE'));
                }
 
                #------------------------------------------------------------------------------