Author: sevein
Date: Wed Sep 16 12:30:11 2009
New Revision: 3345

Log:
Access only parent digital object if it exits.

Modified:
   trunk/lib/model/QubitDigitalObject.php

Modified: trunk/lib/model/QubitDigitalObject.php
==============================================================================
--- trunk/lib/model/QubitDigitalObject.php      Wed Sep 16 12:20:51 2009        
(r3344)
+++ trunk/lib/model/QubitDigitalObject.php      Wed Sep 16 12:30:11 2009        
(r3345)
@@ -267,7 +267,12 @@
         // If DO is a compound object, then create child objects and set to
         // display as compound object (with pager)
         $this->createCompoundChildren();
-        
$this->getParent()->getInformationObject()->setDisplayAsCompoundObject(1);
+
+        if (null !== $parentDigitalObject = $this->getParent())
+        {
+          
$parentDigitalObject->getInformationObject()->setDisplayAsCompoundObject(1);
+        }
+
         $this->createThumbnail();
       }
       else

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