aboutsummaryrefslogtreecommitdiffstats
path: root/includes/SpecialAncientpages.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SpecialAncientpages.php')
-rw-r--r--includes/SpecialAncientpages.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/SpecialAncientpages.php b/includes/SpecialAncientpages.php
index 52bc0058b3b2..3aa93a54a47d 100644
--- a/includes/SpecialAncientpages.php
+++ b/includes/SpecialAncientpages.php
@@ -13,12 +13,14 @@ class AncientPagesPage extends QueryPage {
}
function getSQL() {
+ global $wgIsMySQL;
+ $use_index=$wgIsMySQL?"USE INDEX (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 (cur_timestamp)
+ FROM cur $use_index
WHERE cur_namespace=0 AND cur_is_redirect=0";
}