Author: jablko
Date: Fri Oct 15 13:58:55 2010
New Revision: 8167

Log:
Cosmetic change

Modified:
   trunk/lib/model/QubitInformationObject.php

Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php  Fri Oct 15 13:47:15 2010        
(r8166)
+++ trunk/lib/model/QubitInformationObject.php  Fri Oct 15 13:58:55 2010        
(r8167)
@@ -151,35 +151,32 @@
     parent::save($connection);
 
     // Save child information objects
-    if (0 < count($this->informationObjectsRelatedByparentId->transient))
+    foreach ($this->informationObjectsRelatedByparentId->transient as $item)
     {
-      foreach ($this->informationObjectsRelatedByparentId->transient as $child)
-      {
-        // TODO Needed if $this is new, should be transparent
-        $child->parent = $this;
+      // TODO Needed if $this is new, should be transparent
+      $item->parent = $this;
 
-        try
-        {
-          $child->save();
-        }
-        catch (PropelException $e)
-        {
-        }
+      try
+      {
+        $item->save($connection);
+      }
+      catch (PropelException $e)
+      {
       }
     }
 
     // Save updated related events (update search index after updating all
     // related objects that are included in the index document)
-    foreach ($this->events as $event)
+    foreach ($this->events as $item)
     {
-      $event->setIndexOnSave(false);
+      $item->setIndexOnSave(false);
 
       // TODO Needed if $this is new, should be transparent
-      $event->informationObject = $this;
+      $item->informationObject = $this;
 
       try
       {
-        $event->save();
+        $item->save($connection);
       }
       catch (PropelException $e)
       {
@@ -188,33 +185,33 @@
 
     // Save new digital objects
     // TODO Allow adding additional digital objects as derivatives
-    foreach ($this->digitalObjects as $digitalObject)
+    foreach ($this->digitalObjects as $item)
     {
-      $digitalObject->indexOnSave = false;
+      $item->indexOnSave = false;
 
       // TODO Needed if $this is new, should be transparent
-      $digitalObject->informationObject = $this;
+      $item->informationObject = $this;
 
       try
       {
-        $digitalObject->save();
+        $item->save($connection);
       }
       catch (PropelException $e)
       {
       }
 
-      break; // only save one digital object per info object
+      break; // Save only one digital object per information object
     }
 
     // Save updated Status
-    foreach ($this->statuss as $status)
+    foreach ($this->statuss as $item)
     {
-      $status->setIndexOnSave(false);
+      $item->setIndexOnSave(false);
 
       // TODO Needed if $this is new, should be transparent
-      $status->object = $this;
+      $item->object = $this;
 
-      $status->save();
+      $item->save($connection);
     }
 
     SearchIndex::updateTranslatedLanguages($this);

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