This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.1 has been updated
       via  b00d7772c89ac93610139152507e437b2317aa45 (commit)
      from  613ae9ba8020e671e942ab2f0697785d79c40f62 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=b00d7772c89ac93610139152507e437b2317aa45

commit b00d7772c89ac93610139152507e437b2317aa45
Author: Franck Villaume <[email protected]>
Date:   Fri Dec 1 15:43:01 2017 +0000

    fix object association when objects have the same internal id.

diff --git a/src/common/include/FFObject.class.php 
b/src/common/include/FFObject.class.php
index 250dc5d..b4a27f5 100644
--- a/src/common/include/FFObject.class.php
+++ b/src/common/include/FFObject.class.php
@@ -177,7 +177,7 @@ class FFObject extends FFError {
                                if (preg_match('/^[Dd][0-9]+/', $objectRef)) {
                                        //Document Ref.
                                        $documentId = substr($objectRef, 1);
-                                       if ($documentId != $this->getID()) {
+                                       if ('Document'.$documentId != 
$this->getRealClass($this).$this->getID()) {
                                                $documentObject = 
document_get_object($documentId, $this->getGroupID($this));
                                                if (is_object($documentObject)) 
{
                                                        $statusArr[] = 
$this->addAssociationTo($documentObject);
@@ -192,7 +192,7 @@ class FFObject extends FFError {
                                } elseif (preg_match('/^#[0-9]+/', $objectRef)) 
{
                                        //Artifact Ref.
                                        $artifactId = substr($objectRef, 1);
-                                       if ($artifactId != $this->getID()) {
+                                       if ('Artifact'.$artifactId != 
$this->getRealClass($this).$this->getID()) {
                                                $artifactObject = 
artifact_get_object($artifactId);
                                                if (is_object($artifactObject)) 
{
                                                        $statusArr[] = 
$this->addAssociationTo($artifactObject);
@@ -205,9 +205,9 @@ class FFObject extends FFError {
                                                $statusArr[] = false;
                                        }
                                } elseif (preg_match('/^[Rr][0-9]+/', 
$objectRef)) {
-                                       //Artifact Ref.
+                                       //File Release Ref.
                                        $frsreleaseId = substr($objectRef, 1);
-                                       if ($frsreleaseId != $this->getID()) {
+                                       if ('FRSRelease'.$frsreleaseId != 
$this->getRealClass($this).$this->getID()) {
                                                $frsreleaseObject = 
frsrelease_get_object($frsreleaseId);
                                                if 
(is_object($frsreleaseObject)) {
                                                        $statusArr[] = 
$this->addAssociationTo($frsreleaseObject);

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/FFObject.class.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to