Module: appdb Branch: master Commit: f5498d7d79e7b79a19312cf39cbd3c5fe872a8eb URL: http://source.winehq.org/git/appdb.git/?a=commit;h=f5498d7d79e7b79a19312cf39...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Wed Jul 22 20:57:35 2009 +0200
voteInspector: Show number of comments
---
include/vote.php | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
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++) @@ -324,6 +325,15 @@ class voteInspector $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 + $sSubmitted = 'DB failure'; + + $oTableRow->AddTextCell($sSubmitted); $oTable->AddRow($oTableRow); }