bug: Prevent duplicates when moving bug links

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-07-30 16:58:53 +02:00
parent 8e9122b6f5
commit 68d43b73d2

View File

@@ -181,6 +181,11 @@ class Bug
{
$oBug = new bug($this->iLinkId);
// There is no need to have two links to a bug. The update is still
// considered successful
if($this->isDuplicate())
return $this->delete();
if($this->iVersionId && $this->iVersionId != $oBug->iVersionId)
{
$hResult = query_parameters("UPDATE buglinks SET versionId = '?'