From: Chad Horohoe Date: Mon, 17 Aug 2009 00:59:25 +0000 (+0000) Subject: (bug 20265) Special:AncientPages (and UnusedFiles) broken for SQLite. X-Git-Tag: 1.31.0-rc.0~40269 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=73057fe3a0a444b630cec51e7caafe2ba2b34ec6;p=lhc%2Fweb%2Fwiklou.git (bug 20265) Special:AncientPages (and UnusedFiles) broken for SQLite. --- 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)'; }