Use Revision for individual message loads; not using it for bulk load just now; need...
[lhc/web/wiklou.git] / includes / LinkCache.php
index ce4594b..fae8ff7 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
  * Cache for article titles (prefixed DB keys) and ids linked from one source
+ * @package MediaWiki
  */
 
 /**
@@ -13,6 +14,7 @@ define ('LINKCACHE_IMAGE', 2);
 
 /**
  *
+ * @package MediaWiki
  */
 class LinkCache {      
        // Increment $mClassVer whenever old serialized versions of this class
@@ -145,7 +147,7 @@ class LinkCache {
                                $options = array();
                        }
 
-                       $id = $db->getField( 'cur', 'cur_id', array( 'cur_namespace' => $ns, 'cur_title' => $t ), $fname, $options );
+                       $id = $db->selectField( 'page', 'page_id', array( 'page_namespace' => $ns, 'page_title' => $t ), $fname, $options );
                        if ( !$id ) {
                                $id = 0;
                        }
@@ -190,16 +192,16 @@ class LinkCache {
                        $options = '';
                }
 
-               $cur = $db->tableName( 'cur' );
+               $page = $db->tableName( 'page' );
                $links = $db->tableName( 'links' );
 
-               $sql = "SELECT cur_id,cur_namespace,cur_title
-                       FROM $cur,$links
-                       WHERE cur_id=l_to AND l_from=$id $options";
+               $sql = "SELECT page_id,page_namespace,page_title
+                       FROM $page,$links
+                       WHERE page_id=l_to AND l_from=$id $options";
                $res = $db->query( $sql, $fname );
                while( $s = $db->fetchObject( $res ) ) {
-                       $this->addGoodLink( $s->cur_id,
-                               Title::makeName( $s->cur_namespace, $s->cur_title )
+                       $this->addGoodLink( $s->page_id,
+                               Title::makeName( $s->page_namespace, $s->page_title )
                                );
                }
                
@@ -302,7 +304,7 @@ class LinkCache {
                        $db =& wfGetDB( DB_SLAVE );
                        $options = '';
                }
-               $raw = $db->getField( 'linkscc', 'lcc_cacheobj', array( 'lcc_pageid' => $id ), $fname, $options );
+               $raw = $db->selectField( 'linkscc', 'lcc_cacheobj', array( 'lcc_pageid' => $id ), $fname, $options );
                if ( $raw === false ) {
                        return false;
                }