Author: jablko
Date: Sun Oct 31 20:11:15 2010
New Revision: 8728

Log:
Rollback commit 8309, ORM implements "identity map" and must never create two 
instances with same id

Modified:
   trunk/lib/model/QubitInformationObject.php
   trunk/lib/model/QubitTerm.php

Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php  Sun Oct 31 20:03:13 2010        
(r8727)
+++ trunk/lib/model/QubitInformationObject.php  Sun Oct 31 20:11:15 2010        
(r8728)
@@ -1611,7 +1611,7 @@
       foreach (QubitInformationObject::get($criteria) as $item)
       {
         // Keep track of position of $currentNode in array
-        if ($item->id == $currentNode->id)
+        if ($item === $currentNode)
         {
           $curIndex = count($tree);
         }
@@ -1709,7 +1709,7 @@
         $node['moveUrl'] = sfContext::getInstance()->routing->generate(null, 
array($item, 'module' => 'default', 'action' => 'move'));
         $node['expandUrl'] = sfContext::getInstance()->routing->generate(null, 
array($item, 'module' => 'informationobject', 'action' => 'treeView'));
 
-        if (isset($options['currentNode']) && $options['currentNode']->id == 
$item->id)
+        if (isset($options['currentNode']) && $options['currentNode'] === 
$item)
         {
           $node['style'] = 'ygtvlabel currentTextNode';
         }

Modified: trunk/lib/model/QubitTerm.php
==============================================================================
--- trunk/lib/model/QubitTerm.php       Sun Oct 31 20:03:13 2010        (r8727)
+++ trunk/lib/model/QubitTerm.php       Sun Oct 31 20:11:15 2010        (r8728)
@@ -853,7 +853,7 @@
     foreach (QubitTerm::get($criteria) as $item)
     {
       // Keep track of position of $currentNode in array
-      if ($item->id == $currentNode->id)
+      if ($item === $currentNode)
       {
         $curIndex = count($tree);
       }
@@ -972,7 +972,7 @@
           $node['expandUrl'] = 
sfContext::getInstance()->routing->generate(null, array($item, 'module' => 
'term', 'action' => 'treeView'));
         }
 
-        if (isset($options['currentNode']) && $options['currentNode']->id == 
$item->id)
+        if (isset($options['currentNode']) && $options['currentNode'] === 
$item)
         {
           $node['style'] = 'ygtvlabel currentTextNode';
         }

-- 
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.com/group/qubit-commits?hl=en.

Reply via email to