From f5498d7d79e7b79a19312cf39cbd3c5fe872a8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Wed, 22 Jul 2009 20:57:35 +0200 Subject: [PATCH] voteInspector: Show number of comments --- include/vote.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/vote.php b/include/vote.php index 53ad01c..4f486b6 100644 --- a/include/vote.php +++ b/include/vote.php @@ -288,7 +288,8 @@ class voteInspector $oTableRow->AddTextCell('Created'); $oTableRow->AddTextCell('Votes'); $oTableRow->AddTextCell('Privileges'); - $oTableRow->AddTextCell('# of test results'); + $oTableRow->AddTextCell('Test data'); + $oTableRow->AddTextcell('Comments'); $oTable->AddRow($oTableRow); for($i = 0; $oRow = mysql_fetch_object($hResult); $i++) @@ -318,6 +319,15 @@ class voteInspector $hSubResult = query_parameters("SELECT COUNT(testingId) AS count FROM testResults WHERE submitterId = '?' AND state != 'deleted'", $oVoter->iUserId); + if($hSubResult && ($oSubRow = mysql_fetch_object($hSubResult))) + $sSubmitted = $oSubRow->count; + else + $sSubmitted = 'DB failure'; + + $oTableRow->AddTextCell($sSubmitted); + + $hSubResult = query_parameters("SELECT COUNT(commentId) as count FROM appComments WHERE userId = '?'", $oVoter->iUserId); + if($hSubResult && ($oSubRow = mysql_fetch_object($hSubResult))) $sSubmitted = $oSubRow->count; else