From da90007ce8e8acaf42425a1c8864eaa525f7edc9 Mon Sep 17 00:00:00 2001 From: Tim Laqua Date: Wed, 22 Aug 2007 20:51:16 +0000 Subject: [PATCH] Switched to compatible $dbr->timestamp() call rather than silly date() call for timestamps - should support Postgres now. --- ContributionScores.php | 2 +- ContributionScores_body.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ContributionScores.php b/ContributionScores.php index b5e4c47..43631e5 100644 --- a/ContributionScores.php +++ b/ContributionScores.php @@ -10,7 +10,7 @@ $wgExtensionCredits['specialpage'][] = array( 'url'=>'http://www.mediawiki.org/wiki/Extension:Contribution_Scores', 'author'=>'Tim Laqua, t.laqua at gmail dot com', 'description'=>'Polls Wiki Database for highest user contribution volume.', - 'version'=>'1.2' + 'version'=>'1.3' ); $wgAutoloadClasses['ContributionScores'] = dirname(__FILE__) . '/ContributionScores_body.php'; diff --git a/ContributionScores_body.php b/ContributionScores_body.php index e6bb5b5..6fc52eb 100644 --- a/ContributionScores_body.php +++ b/ContributionScores_body.php @@ -24,8 +24,7 @@ class ContributionScores extends SpecialPage if ( $days > 0 ) { $date = mktime() - (60*60*24*$days); - $dateString = date("Ymd",$date)."000000"; - + $dateString = $dbr->timestamp($date); $sql .= "WHERE rev_timestamp > '$dateString' "; }