Module: appdb Branch: master Commit: 8b561a2ccec9f0cddbf39bddce681d792e189639 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=8b561a2ccec9f0cddbf39bddc...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Wed Jul 22 20:44:14 2009 +0200
voteInspector: Show number of test results per user
---
include/vote.php | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/vote.php b/include/vote.php index 692c2ab..53ad01c 100644 --- a/include/vote.php +++ b/include/vote.php @@ -288,6 +288,7 @@ class voteInspector $oTableRow->AddTextCell('Created'); $oTableRow->AddTextCell('Votes'); $oTableRow->AddTextCell('Privileges'); + $oTableRow->AddTextCell('# of test results'); $oTable->AddRow($oTableRow);
for($i = 0; $oRow = mysql_fetch_object($hResult); $i++) @@ -314,6 +315,15 @@ class voteInspector }
$oTableRow->AddTextCell($sPrivs); + + $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); $oTable->AddRow($oTableRow); }