Author: david
Date: Thu Sep 29 16:39:45 2011
New Revision: 9878

Log:
Allow creating physical objects with no name (location only)

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

Modified: 
trunk/apps/qubit/modules/informationobject/actions/editPhysicalObjectsAction.class.php
==============================================================================
--- 
trunk/apps/qubit/modules/informationobject/actions/editPhysicalObjectsAction.class.php
      Thu Sep 29 13:44:17 2011        (r9877)
+++ 
trunk/apps/qubit/modules/informationobject/actions/editPhysicalObjectsAction.class.php
      Thu Sep 29 16:39:45 2011        (r9878)
@@ -84,11 +84,10 @@
       $this->resource->addPhysicalObject($params['_sf_route']->resource);
     }
 
-    $value = $this->form->getValue('name');
-    if (isset($value))
+    if (null !== $this->form->getValue('name') || null !== 
$this->form->getValue('location'))
     {
       $physicalObject = new QubitPhysicalObject;
-      $physicalObject->name = $value;
+      $physicalObject->name = $this->form->getValue('name');
       $physicalObject->location = $this->form->getValue('location');
 
       $params = 
$this->context->routing->parse(Qubit::pathInfo($this->form->getValue('type')));

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