Alexander Nicolaysen Sørnes : testData: add 'pending' queue state
Chris Morgan
cmorgan at winehq.org
Tue Nov 6 23:23:34 CST 2007
Module: appdb
Branch: master
Commit: da471d1ad8f79d52f113c323650db29d6501a7e5
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=da471d1ad8f79d52f113c323650db29d6501a7e5
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Tue Nov 6 22:12:32 2007 +0100
testData: add 'pending' queue state
---
include/testData.php | 10 ++++++++--
include/version_queue.php | 6 +-----
tables/testResults.sql | 2 +-
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/include/testData.php b/include/testData.php
index a1d4b42..2ebf56a 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -63,6 +63,12 @@ class testData{
// Creates a new Test Results.
function create()
{
+ $oVersion = new version($this->iVersionId);
+ if($oVersion->sQueued != "false")
+ $this->sQueued = "pending";
+ else
+ $this->sQueued = $this->mustBeQueued() ? "true" : "false";
+
$hResult = query_parameters("INSERT INTO testResults (versionId, whatWorks, whatDoesnt,".
"whatNotTested, testedDate, distributionId, testedRelease,".
"installs, runs, testedRating, comments,".
@@ -79,7 +85,7 @@ class testData{
$this->sTestedRating, $this->sComments,
"NOW()",
$_SESSION['current']->iUserId,
- $this->mustBeQueued() ? "true" : "false");
+ $this->sQueued);
if($hResult)
{
@@ -246,7 +252,7 @@ class testData{
}
// If we are not in the queue, we can't move the test data out of the queue.
- if(!$this->sQueued == 'true')
+ if($this->sQueued == 'false')
return false;
if(query_parameters("UPDATE testResults SET queued = '?' WHERE testingId = '?'",
diff --git a/include/version_queue.php b/include/version_queue.php
index 007296a..afc25b0 100644
--- a/include/version_queue.php
+++ b/include/version_queue.php
@@ -17,8 +17,7 @@ class version_queue
if($iVersionId)
{
- $iTestingId = testData::getNewestTestIdFromVersionId($iVersionId,
- $this->oVersion->sQueued);
+ $iTestingId = testData::getNewestTestIdFromVersionId($iVersionId, "pending");
/* This illustrates the importance of converting downloadurl completely
to the objectManager model. If we don't get a match searching for
a queued entry, try finding a rejected one. */
@@ -54,7 +53,6 @@ class version_queue
function reQueue()
{
$this->oVersion->reQueue();
- $this->oTestDataQueue->reQueue();
$this->oDownloadUrl->reQueue();
}
@@ -64,8 +62,6 @@ class version_queue
if($this->oDownloadUrl->iId)
$this->oDownloadUrl->reject();
-
- $this->oTestDataQueue->reject();
}
function update()
diff --git a/tables/testResults.sql b/tables/testResults.sql
index 2b1da31..b23b82f 100644
--- a/tables/testResults.sql
+++ b/tables/testResults.sql
@@ -20,6 +20,6 @@ create table testResults (
comments text,
submitTime datetime NOT NULL,
submitterId int(11) NOT NULL default '0',
- queued enum('true','false','rejected') NOT NULL default 'false',
+ queued enum('true','false','rejected','pending') NOT NULL default 'false',
key(testingId)
);
More information about the wine-cvs
mailing list