ChangeSet ID: 31082 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/04/21 19:39:53
Modified files: include : objectManager.php testData_queue.php vendor.php version_queue.php unit_test : test_om_objects.php
Log message: Alexander Nicolaysen Sørnes alex@thehandofagony.com Use mustBeQueued() to determine unqueueing in objectManager
Patch: http://cvs.winehq.org/patch.py?id=31082
Old revision New revision Changes Path 1.13 1.14 +1 -1 appdb/include/objectManager.php 1.4 1.5 +5 -0 appdb/include/testData_queue.php 1.21 1.22 +8 -0 appdb/include/vendor.php 1.5 1.6 +5 -0 appdb/include/version_queue.php 1.9 1.10 +1 -0 appdb/unit_test/test_om_objects.php
Index: appdb/include/objectManager.php diff -u -p appdb/include/objectManager.php:1.13 appdb/include/objectManager.php:1.14 --- appdb/include/objectManager.php:1.13 22 Apr 2007 0:39:53 -0000 +++ appdb/include/objectManager.php 22 Apr 2007 0:39:53 -0000 @@ -308,7 +308,7 @@ class ObjectManager if($this->bIsRejected) $oObject->ReQueue();
- if($this->bIsQueue) + if($this->bIsQueue && !$oObject->mustBeQueued()) $oObject->unQueue();
$oObject->update(); Index: appdb/include/testData_queue.php diff -u -p appdb/include/testData_queue.php:1.4 appdb/include/testData_queue.php:1.5 --- appdb/include/testData_queue.php:1.4 22 Apr 2007 0:39:53 -0000 +++ appdb/include/testData_queue.php 22 Apr 2007 0:39:53 -0000 @@ -97,6 +97,11 @@ class testData_queue return $this->oTestData->canEdit(); }
+ function mustBeQueued() + { + return $this->oTestData->mustBeQueued(); + } + function objectDisplayAddItemHelp() { $this->oTestData->objectDisplayAddItemHelp(); Index: appdb/include/vendor.php diff -u -p appdb/include/vendor.php:1.21 appdb/include/vendor.php:1.22 --- appdb/include/vendor.php:1.21 22 Apr 2007 0:39:53 -0000 +++ appdb/include/vendor.php 22 Apr 2007 0:39:53 -0000 @@ -217,6 +217,14 @@ class Vendor { return FALSE; }
+ function mustBeQueued() + { + if($_SESSION['current']->hasPriv("admin")) + return FALSE; + else + return TRUE; + } + function getOutputEditorValues($aClean) { $this->sName = $aClean['sVendorName']; Index: appdb/include/version_queue.php diff -u -p appdb/include/version_queue.php:1.5 appdb/include/version_queue.php:1.6 --- appdb/include/version_queue.php:1.5 22 Apr 2007 0:39:53 -0000 +++ appdb/include/version_queue.php 22 Apr 2007 0:39:53 -0000 @@ -119,6 +119,11 @@ class version_queue return $this->oVersion->canEdit(); }
+ function mustBeQueued() + { + return $this->oVersion->mustBeQueued(); + } + function objectDisplayAddItemHelp() { /* $this->oVersion->displayAddItemHelp(); */ Index: appdb/unit_test/test_om_objects.php diff -u -p appdb/unit_test/test_om_objects.php:1.9 appdb/unit_test/test_om_objects.php:1.10 --- appdb/unit_test/test_om_objects.php:1.9 22 Apr 2007 0:39:53 -0000 +++ appdb/unit_test/test_om_objects.php 22 Apr 2007 0:39:53 -0000 @@ -131,6 +131,7 @@ function test_object_methods() "objectMakeLink", "objectMakeUrl", "outputEditor", + "mustBeQueued" );
$aTestClasses = array("application",