Author: peter
Date: Sat Sep 26 15:30:01 2009
New Revision: 3543

Log:
don't add duplicate name access points on import. fixes issue #720

Modified:
   trunk/lib/model/QubitInformationObject.php

Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php  Sat Sep 26 00:02:43 2009        
(r3542)
+++ trunk/lib/model/QubitInformationObject.php  Sat Sep 26 15:30:01 2009        
(r3543)
@@ -1310,7 +1310,20 @@
         $event->setDateDisplay($options['dates']);
       }
 
-      $this->events[] = $event;
+      // only add Actor as name access point if there is no pre-existing 
relation
+      $existingRelation = false;
+      foreach ($this->events as $existingEvent)
+      {
+        if ($event->getActorId() == $existingEvent->getActorId())
+        {
+          $existingRelation = true;
+          break;
+        }
+      }
+      if (!$existingRelation)
+      {
+        $this->events[] = $event;
+      }
     }
   }
 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to