Author: david
Date: Mon Feb 13 17:40:02 2012
New Revision: 10878

Log:
Fix bug with repository assignment

Modified:
   trunk/lib/QubitSearchPdo.class.php

Modified: trunk/lib/QubitSearchPdo.class.php
==============================================================================
--- trunk/lib/QubitSearchPdo.class.php  Mon Feb 13 17:39:18 2012        (r10877)
+++ trunk/lib/QubitSearchPdo.class.php  Mon Feb 13 17:40:02 2012        (r10878)
@@ -174,16 +174,19 @@
       // Set repository
       if (null != $resource->repository_id)
       {
-        $options['repository'] = 
QubitRepository::getById($resource->repository_id);
-      }
+        $repository = QubitRepository::getById($resource->repository_id);
 
-      // Add to index
-      self::addInformationObjectIndex($resource, $ancestors, $options);
+        // Pass repository down hierarchy
+        self::addInformationObjectIndex($resource, $ancestors, $options + 
array('repository' => $repository));
+      }
+      else
+      {
+        self::addInformationObjectIndex($resource, $ancestors, $options);
+      }
 
       // Log
       $this->getLogger()->log('"'.$resource->title.'" inserted 
('.round(microtime(true) - self::$startTime, 2).'s) 
('.($this->counter).'/'.self::$infoObjectCount.')', $this->getName());
 
-
       // If not a leaf, then descend tree
       if ((1 < intval($resource->rgt) - intval($resource->lft))
         && $resource->culture == $resource->source_culture)

-- 
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