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:
WineHQ
2006-12-03 16:26:38 +00:00
parent c19a471bd5
commit 9643c80288
2 changed files with 75 additions and 4 deletions

View File

@@ -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";