Author: sevein
Date: Mon Sep 26 16:50:27 2011
New Revision: 9841

Log:
Cosmetic changes, stop trying to update child levels because the form does not 
work with existing items, only new items

Modified:
   trunk/apps/qubit/modules/informationobject/actions/editAction.class.php

Modified: 
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editAction.class.php     
Mon Sep 26 16:19:20 2011        (r9840)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php     
Mon Sep 26 16:50:27 2011        (r9841)
@@ -573,32 +573,21 @@
   {
     if (is_array($updateChildLevels = $this->request->updateChildLevels) && 
count($updateChildLevels))
     {
-      foreach ($updateChildLevels as $childLevelFormData)
+      foreach ($updateChildLevels as $item)
       {
-        if (isset($childLevelFormData['id']))
-        {
-          if (null === $childLevel = 
QubitInformationObject::getById($childLevelFormData['id']))
-          {
-            continue;
-          }
-        }
-        else
-        {
-          $childLevel = new QubitInformationObject;
-        }
-
-        $childLevel->setIdentifier($childLevelFormData['identifier']);
-        $childLevel->setTitle($childLevelFormData['title']);
+        $childLevel = new QubitInformationObject;
+        $childLevel->identifier = $item['identifier'];
+        $childLevel->title = $item['title'];
         
$childLevel->setPublicationStatus($this->resource->getPublicationStatus());
 
-        if (0 < $childLevelFormData['levelOfDescription'] && (null !== 
QubitTerm::getById($childLevelFormData['levelOfDescription'])))
+        if (0 < $item['levelOfDescription'] && (null !== 
QubitTerm::getById($item['levelOfDescription'])))
         {
-          $childLevel->levelOfDescriptionId = 
$childLevelFormData['levelOfDescription'];
+          $childLevel->levelOfDescriptionId = $item['levelOfDescription'];
         }
 
-        if (0 < $childLevelFormData['levelOfDescription']
-            || 0 < strlen($childLevelFormData['identifier'])
-            || 0 < strlen($childLevelFormData['title']))
+        if (0 < $item['levelOfDescription']
+            || 0 < strlen($item['identifier'])
+            || 0 < strlen($item['title']))
         {
           $this->resource->informationObjectsRelatedByparentId[] = $childLevel;
         }

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