Author: sevein
Date: Thu Nov  4 16:45:43 2010
New Revision: 8781

Log:
Imageflow should only list children not all descendants (see "Scalable UI 
controls" at qubit-toolkit wiki).

Modified:
   trunk/apps/qubit/modules/digitalobject/actions/imageflowComponent.class.php

Modified: 
trunk/apps/qubit/modules/digitalobject/actions/imageflowComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/actions/imageflowComponent.class.php 
Thu Nov  4 16:33:34 2010        (r8780)
+++ trunk/apps/qubit/modules/digitalobject/actions/imageflowComponent.class.php 
Thu Nov  4 16:45:43 2010        (r8781)
@@ -38,7 +38,7 @@
     }
 
     // Add thumbs
-    foreach ($this->resource->descendants as $item)
+    foreach ($children = $this->resource->getChildren() as $item)
     {
       if (null !== $digitalObject = $item->getDigitalObject())
       {
@@ -59,17 +59,8 @@
       }
     }
 
-    // Get total number of descendant digital objects
-    $this->total = 0;
-    if (isset($this->resource))
-    {
-      $criteria = new Criteria;
-      $criteria->addJoin(QubitInformationObject::ID, 
QubitDigitalObject::INFORMATION_OBJECT_ID);
-      $criteria->add(QubitInformationObject::LFT, $this->resource->lft, 
Criteria::GREATER_THAN);
-      $criteria->add(QubitInformationObject::RGT, $this->resource->rgt, 
Criteria::LESS_THAN);
-
-      $this->total = BasePeer::doCount($criteria)->fetchColumn(0);
-    }
+    // Get total number of children
+    $this->total = count($children);
 
     if (2 > count($this->thumbnails))
     {

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