Authors: Alexander Nicolaysen Sørnes <alex@thehandofagony.com>, Chris Morgan <cmorgan@alum.wpi.edu>
Make sure that a maintainer entry is not deleted incorrectly in Maintainer::unQueue(). If a request has already been accepted, it is not a duplicate. Add a unit test to test the behavior of Maintainer::unQueue() on an already unqueued maintainer.
This commit is contained in:
@@ -92,9 +92,8 @@ class maintainer
|
||||
}
|
||||
} else
|
||||
{
|
||||
//delete the item from the queue
|
||||
query_parameters("DELETE from appMaintainers WHERE userId = '?' AND maintainerId = '?'",
|
||||
$this->iUserId, $this->iMaintainerId);
|
||||
/* Delete entry, but only if queued */
|
||||
query_parameters("DELETE from appMaintainers WHERE userId = '?' AND maintainerId = '?' AND queued = 'true'", $this->iUserId, $this->iMaintainerId);
|
||||
|
||||
if($oUser->isSuperMaintainer($this->iAppId) && !$this->bSuperMaintainer)
|
||||
$sStatusMessage = "<p>User is already a super maintainer of this application</p>\n";
|
||||
|
||||
Reference in New Issue
Block a user