Alexander Nicolaysen Sørnes : distribution: Sort test results by Wine version as well as rating
Chris Morgan
cmorgan at winehq.org
Wed Dec 19 20:03:30 CST 2007
Module: appdb
Branch: master
Commit: 66e884d65a578549824db57dc53f9ca988883b8c
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=66e884d65a578549824db57dc53f9ca988883b8c
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Thu Dec 20 01:30:29 2007 +0100
distribution: Sort test results by Wine version as well as rating
---
include/distribution.php | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/include/distribution.php b/include/distribution.php
index 25526cf..1169bf5 100644
--- a/include/distribution.php
+++ b/include/distribution.php
@@ -51,24 +51,33 @@ class distribution {
if($_SESSION['current']->hasPriv("admin"))
{
$sQuery = "SELECT testingId
- FROM testResults
- WHERE distributionId = '?'
- ORDER BY testedRating;" ;
+ FROM testResults, ?.versions
+ WHERE
+ versions.value = testResults.testedRelease
+ AND
+ versions.product_id = '?'
+ AND
+ distributionId = '?'
+ ORDER BY testedRating,bugs.versions.id DESC";
} else /* only let users view test results that aren't queued and for apps that */
/* aren't queued or versions that aren't queued */
{
$sQuery = "SELECT testingId
- FROM testResults, appFamily, appVersion
+ FROM testResults, appFamily, appVersion, ?.versions
WHERE testResults.state = 'accepted' AND
+ versions.value = testResults.testedRelease
+ AND
+ versions.product_id = '?'
+ AND
testResults.versionId = appVersion.versionId AND
appFamily.appId = appVersion.appId AND
appFamily.state = 'accepted' AND
appVersion.state = 'accepted' AND
distributionId = '?'
- ORDER BY testedRating;";
+ ORDER BY testedRating,bugs.versions.id DESC";
}
- if($hResult = query_parameters($sQuery, $this->iDistributionId))
+ if($hResult = query_parameters($sQuery, BUGZILLA_DB, BUGZILLA_PRODUCT_ID, $this->iDistributionId))
{
while($oRow = query_fetch_object($hResult))
{
More information about the wine-cvs
mailing list