Get rid of the distribution queue. If a testData entry is deleted and its associated

distribution has not been approved and has no other testData assigned to it the distribution
is now deleted. This change makes the distribution queue unnecessary as distributions are
accepted along the testData
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-04-27 23:45:19 +00:00
committed by WineHQ
parent eb49e9344d
commit d09f78ca00
2 changed files with 11 additions and 5 deletions

View File

@@ -25,10 +25,6 @@ function global_admin_menu() {
$g->add("View Test Results Queue (".testData::objectGetEntriesCount(true, false).")", $g->add("View Test Results Queue (".testData::objectGetEntriesCount(true, false).")",
BASE."objectManager.php?sClass=testData_queue&bIsQueue=true&sTitle=". BASE."objectManager.php?sClass=testData_queue&bIsQueue=true&sTitle=".
"Test%20Results%20Queue"); "Test%20Results%20Queue");
$g->add("View Distribution Queue (".distribution::objectGetEntriesCount(true,
false).")",
BASE."objectManager.php?sClass=distribution&bIsQueue=true&sTitle=".
"Distribution%20Queue");
$g->addmisc(" "); $g->addmisc(" ");

View File

@@ -24,7 +24,17 @@ class testData_queue
function delete() function delete()
{ {
return $this->oTestData->delete(); $bSuccess = $this->oTestData->delete();
/* We delete the distribution if it has not been approved and is not associated
with any other testData. Otherwise we would have to have a distribution
queue for admins to clean up unused, queued entries */
$this->oDistribution = new distribution($this->oDistribution->iDistributionId);
if(!sizeof($this->oDistribution->aTestingIds) &&
$this->oDistribution->sQueued != "false")
$this->oDistribution->delete();
return $bSuccess;
} }
function reQueue() function reQueue()