appdb/include sidebar_admin.php testData_queue.php

WineHQ wineowner at wine.codeweavers.com
Fri Apr 27 18:45:19 CDT 2007


ChangeSet ID:	31116
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/04/27 18:45:19

Modified files:
	include        : sidebar_admin.php testData_queue.php 

Log message:
	Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
	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

Patch: http://cvs.winehq.org/patch.py?id=31116

Old revision  New revision  Changes     Path
 1.42          1.43          +0 -4       appdb/include/sidebar_admin.php
 1.6           1.7           +11 -1      appdb/include/testData_queue.php

Index: appdb/include/sidebar_admin.php
diff -u -p appdb/include/sidebar_admin.php:1.42 appdb/include/sidebar_admin.php:1.43
--- appdb/include/sidebar_admin.php:1.42	27 Apr 2007 23:45:19 -0000
+++ appdb/include/sidebar_admin.php	27 Apr 2007 23:45:19 -0000
@@ -25,10 +25,6 @@ function global_admin_menu() {
     $g->add("View Test Results Queue (".testData::objectGetEntriesCount(true, false).")",
             BASE."objectManager.php?sClass=testData_queue&bIsQueue=true&sTitle=".
             "Test%20Results%20Queue");
-    $g->add("View Distribution Queue (".distribution::objectGetEntriesCount(true, 
-            false).")",
-            BASE."objectManager.php?sClass=distribution&bIsQueue=true&sTitle=".
-            "Distribution%20Queue");
 
     $g->addmisc("&nbsp;");
 
Index: appdb/include/testData_queue.php
diff -u -p appdb/include/testData_queue.php:1.6 appdb/include/testData_queue.php:1.7
--- appdb/include/testData_queue.php:1.6	27 Apr 2007 23:45:19 -0000
+++ appdb/include/testData_queue.php	27 Apr 2007 23:45:19 -0000
@@ -24,7 +24,17 @@ class testData_queue
 
     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()



More information about the wine-cvs mailing list