From 73057fe3a0a444b630cec51e7caafe2ba2b34ec6 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 17 Aug 2009 00:59:25 +0000 Subject: [PATCH] (bug 20265) Special:AncientPages (and UnusedFiles) broken for SQLite. --- RELEASE-NOTES | 1 + includes/specials/SpecialAncientpages.php | 3 +++ includes/specials/SpecialUnusedimages.php | 3 +++ 3 files changed, 7 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index deb38c5536..6582dc1274 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -405,6 +405,7 @@ this. Was used when mwEmbed was going to be an extension. * (bug 20203) "Powered by Mediawiki" now has height/width on image tag * (bug 20273) Fix broken output when no pages are found in the content namespaces +* (bug 20265) Make AncientPages and UnusedFiles work on SQLite == API changes in 1.16 == diff --git a/includes/specials/SpecialAncientpages.php b/includes/specials/SpecialAncientpages.php index 9f487ced6a..9219243501 100644 --- a/includes/specials/SpecialAncientpages.php +++ b/includes/specials/SpecialAncientpages.php @@ -37,6 +37,9 @@ class AncientPagesPage extends QueryPage { case 'oracle': $epoch = '((trunc(rev_timestamp) - to_date(\'19700101\',\'YYYYMMDD\')) * 86400)'; break; + case 'sqlite': + $epoch = 'rev_timestamp'; + break; default: $epoch = 'EXTRACT(epoch FROM rev_timestamp)'; } diff --git a/includes/specials/SpecialUnusedimages.php b/includes/specials/SpecialUnusedimages.php index 778bb0319b..9d9868f6d3 100644 --- a/includes/specials/SpecialUnusedimages.php +++ b/includes/specials/SpecialUnusedimages.php @@ -32,6 +32,9 @@ class UnusedimagesPage extends ImageQueryPage { case 'oracle': $epoch = '((trunc(img_timestamp) - to_date(\'19700101\',\'YYYYMMDD\')) * 86400)'; break; + case 'sqlite': + $epoch = 'img_timestamp'; + break; default: $epoch = 'EXTRACT(epoch FROM img_timestamp)'; } -- 2.20.1