From 4655478a5439d5af67e7f30f3897338d7ac1edcf Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Fri, 11 Jun 2004 15:53:30 +0000 Subject: [PATCH] PG: user->"user" --- includes/SpecialStatistics.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/SpecialStatistics.php b/includes/SpecialStatistics.php index a6433aaeb6..b842e52525 100644 --- a/includes/SpecialStatistics.php +++ b/includes/SpecialStatistics.php @@ -2,7 +2,7 @@ function wfSpecialStatistics() { - global $wgUser, $wgOut, $wgLang; + global $wgUser, $wgOut, $wgLang, $wgIsPg; $fname = "wfSpecialStatistics"; $wgOut->addHTML( "

" . wfMsg( "sitestats" ) . "

\n" ); @@ -31,12 +31,13 @@ function wfSpecialStatistics() $wgOut->addWikiText( $text ); $wgOut->addHTML( "

" . wfMsg( "userstats" ) . "

\n" ); - $sql = "SELECT COUNT(user_id) AS total FROM user"; + $usertable=$wgIsPg?'"user"':'user'; + $sql = "SELECT COUNT(user_id) AS total FROM $usertable"; $res = wfQuery( $sql, DB_READ, $fname ); $row = wfFetchObject( $res ); $total = $row->total; - $sql = "SELECT COUNT(user_id) AS total FROM user " . + $sql = "SELECT COUNT(user_id) AS total FROM $usertable " . "WHERE user_rights LIKE '%sysop%'"; $res = wfQuery( $sql, DB_READ, $fname ); $row = wfFetchObject( $res ); -- 2.20.1