ChangeSet ID: 31243 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/07/10 21:38:09
Modified files: include : testData.php version.php
Log message: Chris Morgan cmorgan@alum.wpi.edu Application view should list the number of test results for each version, this lets the appdb user see which versions have the most feedback
Patch: http://cvs.winehq.org/patch.py?id=31243
Old revision New revision Changes Path 1.64 1.65 +15 -0 appdb/include/testData.php 1.134 1.135 +2 -0 appdb/include/version.php
Index: appdb/include/testData.php diff -u -p appdb/include/testData.php:1.64 appdb/include/testData.php:1.65 --- appdb/include/testData.php:1.64 11 Jul 2007 2:38: 9 -0000 +++ appdb/include/testData.php 11 Jul 2007 2:38: 9 -0000 @@ -777,6 +777,21 @@ class testData{ return $sReturn; }
+ // return the number of test data entries for a particular version id + function get_testdata_count_for_versionid($iVersionId) + { + $sQuery = "SELECT count(*) as cnt + FROM testResults + WHERE versionId = '?' + AND + queued = '?';"; + + $hResult = query_parameters($sQuery, $iVersionId, 'false'); + + $oRow = mysql_fetch_object($hResult); + return $oRow->cnt; + } + function objectGetEntriesCount($bQueued, $bRejected) { $oTest = new testData(); Index: appdb/include/version.php diff -u -p appdb/include/version.php:1.134 appdb/include/version.php:1.135 --- appdb/include/version.php:1.134 11 Jul 2007 2:38:10 -0000 +++ appdb/include/version.php 11 Jul 2007 2:38:10 -0000 @@ -1010,6 +1010,7 @@ class version { echo " <td>Description</td>\n"; echo " <td width="80">Rating</td>\n"; echo " <td width="80">Wine version</td>\n"; + echo " <td width="80">Test results</td>\n"; echo " <td width="40">Comments</td>\n"; echo "</tr>\n\n";
@@ -1033,6 +1034,7 @@ class version { echo " <td>".util_trim_description($oVersion->sDescription)."</td>\n"; echo " <td $sRatingColor align=center>".$oVersion->sTestedRating."</td>\n"; echo " <td $sRatingColor align=center>".$oVersion->sTestedRelease."</td>\n"; + echo " <td align=center>".testData::get_testdata_count_for_versionid($oVersion->iVersionId)."</td>\n"; echo " <td align=center>".Comment::get_comment_count_for_versionid($oVersion->iVersionId)."</td>\n"; echo "</tr>\n\n";