Module: appdb Branch: master Commit: 68d43b73d24f51839efd3d3d97323507e11ff3ea URL: http://source.winehq.org/git/appdb.git/?a=commit;h=68d43b73d24f51839efd3d3d9...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Thu Jul 30 16:58:53 2009 +0200
bug: Prevent duplicates when moving bug links
---
include/bugs.php | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/bugs.php b/include/bugs.php index 9c38fa8..45a3887 100644 --- a/include/bugs.php +++ b/include/bugs.php @@ -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 = '?'