* Support for table name prefixes throughout the code. No support yet for converting...
[lhc/web/wiklou.git] / includes / SpecialAncientpages.php
index 69d2d43..6029f06 100644 (file)
@@ -13,14 +13,15 @@ class AncientPagesPage extends QueryPage {
        }
 
        function getSQL() {
-               $db = wfGetDB( DB_READ );
+               $db =& wfGetDB( DB_SLAVE );
+               $cur = $db->tableName( 'cur' );
                $use_index = $db->useIndexClause( 'cur_timestamp' );
                return
                        "SELECT 'Ancientpages' as type,
                                        cur_namespace as namespace,
                                cur_title as title,
                                UNIX_TIMESTAMP(cur_timestamp) as value
-                       FROM cur $use_index
+                       FROM $cur $use_index
                        WHERE cur_namespace=0 AND cur_is_redirect=0";
        }