(bug 20265) Special:AncientPages (and UnusedFiles) broken for SQLite.
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 17 Aug 2009 00:59:25 +0000 (00:59 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 17 Aug 2009 00:59:25 +0000 (00:59 +0000)
RELEASE-NOTES
includes/specials/SpecialAncientpages.php
includes/specials/SpecialUnusedimages.php

index deb38c5..6582dc1 100644 (file)
@@ -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 ==
 
index 9f487ce..9219243 100644 (file)
@@ -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)';
                }
index 778bb03..9d9868f 100644 (file)
@@ -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)';
                }