diff --git a/include/objectManager.php b/include/objectManager.php index ad71b65..334b9d1 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -308,7 +308,7 @@ class ObjectManager if($this->bIsRejected) $oObject->ReQueue(); - if($this->bIsQueue) + if($this->bIsQueue && !$oObject->mustBeQueued()) $oObject->unQueue(); $oObject->update(); diff --git a/include/testData_queue.php b/include/testData_queue.php index 8249619..af2b9db 100644 --- a/include/testData_queue.php +++ b/include/testData_queue.php @@ -97,6 +97,11 @@ class testData_queue return $this->oTestData->canEdit(); } + function mustBeQueued() + { + return $this->oTestData->mustBeQueued(); + } + function objectDisplayAddItemHelp() { $this->oTestData->objectDisplayAddItemHelp(); diff --git a/include/vendor.php b/include/vendor.php index d433d33..2cc43b6 100644 --- a/include/vendor.php +++ b/include/vendor.php @@ -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']; diff --git a/include/version_queue.php b/include/version_queue.php index eab4d50..62d61ed 100644 --- a/include/version_queue.php +++ b/include/version_queue.php @@ -119,6 +119,11 @@ class version_queue return $this->oVersion->canEdit(); } + function mustBeQueued() + { + return $this->oVersion->mustBeQueued(); + } + function objectDisplayAddItemHelp() { /* $this->oVersion->displayAddItemHelp(); */ diff --git a/unit_test/test_om_objects.php b/unit_test/test_om_objects.php index b0ffdb8..e8ea008 100644 --- a/unit_test/test_om_objects.php +++ b/unit_test/test_om_objects.php @@ -131,6 +131,7 @@ function test_object_methods() "objectMakeLink", "objectMakeUrl", "outputEditor", + "mustBeQueued" ); $aTestClasses = array("application",