appdb/include testResults.php
WineHQ
wineowner at wine.codeweavers.com
Mon Jan 16 20:34:58 CST 2006
ChangeSet ID: 22337
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2006/01/16 20:34:58
Modified files:
include : testResults.php
Log message:
Tony Lambregts <tony.lambregts at gmail.com>
Test result count should not include queued tests. Don't display queued test results in test results table.
Patch: http://cvs.winehq.org/patch.py?id=22337
Old revision New revision Changes Path
1.6 1.7 +29 -17 appdb/include/testResults.php
Index: appdb/include/testResults.php
diff -u -p appdb/include/testResults.php:1.6 appdb/include/testResults.php:1.7
--- appdb/include/testResults.php:1.6 17 Jan 2006 2:34:58 -0000
+++ appdb/include/testResults.php 17 Jan 2006 2:34:58 -0000
@@ -566,23 +566,29 @@ class testData{
{
$oTest = new testData($oRow->testingId);
$oVersion = new version($oTest->iVersionId);
- $oApp = new application($oVersion->iAppId);
- $oSubmitter = new User($oTest->iSubmitterId);
- if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
- echo "<tr class=\"$bgcolor\">\n";
- echo " <td>".print_date(mysqltimestamp_to_unixtimestamp($oTest->sSubmitTime))."</td>\n";
- echo " <td>\n";
- echo $oSubmitter->sEmail ? "<a href=\"mailto:".$oSubmitter->sEmail."\">":"";
- echo $oSubmitter->sRealname;
- echo $oSubmitter->sEmail ? "</a>":"";
- echo " </td>\n";
- echo " <td>".$oApp->sName."</td>\n";
- echo " <td>".$oVersion->sName."</td>\n";
- echo " <td>".$oTest->sTestedRelease."</td>\n";
- echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sub=view&iTestingId=".$oTest->iTestingId.">process</a>]</td>\n";
- echo "</tr>\n\n";
- $c++;
+ // dont show testing results of versions that are still queued.
+ if ($oVersion->sQueued == 'false')
+ {
+ $oApp = new application($oVersion->iAppId);
+ $oSubmitter = new User($oTest->iSubmitterId);
+ if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
+ echo "<tr class=\"$bgcolor\">\n";
+ echo " <td>".print_date(mysqltimestamp_to_unixtimestamp($oTest->sSubmitTime))."</td>\n";
+ echo " <td>\n";
+ echo $oSubmitter->sEmail ? "<a href=\"mailto:".$oSubmitter->sEmail."\">":"";
+ echo $oSubmitter->sRealname;
+ echo $oSubmitter->sEmail ? "</a>":"";
+ echo " </td>\n";
+ echo " <td>".$oApp->sName."</td>\n";
+ echo " <td>".$oVersion->sName."</td>\n";
+ echo " <td>".$oTest->sTestedRelease."</td>\n";
+ echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sub=view&iTestingId=".$oTest->iTestingId.">process</a>]</td>\n";
+ echo "</tr>\n\n";
+ $c++;
+ }
}
+ echo "</table>","\n";
+
echo html_frame_end();
}
@@ -591,7 +597,13 @@ class testData{
/* Get the number of TestResults in the database */
function getNumberOfQueuedTests()
{
- $hResult = query_appdb("SELECT count(*) as num_tests FROM testResults WHERE queued='true';");
+ $sQuery = "SELECT count(*) as num_tests
+ FROM testResults, appVersion
+ WHERE appVersion.versionId=testResults.versionId
+ and appVersion.queued='false'
+ and testResults.queued='true';";
+
+ $hResult = query_appdb($sQuery);
if($hResult)
{
$row = mysql_fetch_object($hResult);
More information about the wine-cvs
mailing list