Author: jablko
Date: Thu Sep 24 13:46:55 2009
New Revision: 3506

Log:
Cosmetic change, change order

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     
Thu Sep 24 13:41:27 2009        (r3505)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php     
Thu Sep 24 13:46:55 2009        (r3506)
@@ -144,6 +144,52 @@
     }
   }
 
+  protected function processField($field)
+  {
+    switch ($field->getName())
+    {
+      case 'descriptionDetail':
+      case 'descriptionStatus':
+      case 'repository':
+        $params = 
$this->context->routing->parse(preg_replace('/.*'.preg_quote($this->request->getPathInfoPrefix(),
 '/').'/', null, $this->form->getValue($field->getName())));
+        $this->informationObject[$field->getName().'Id'] = $params['id'];
+
+        break;
+
+      default:
+        $this->informationObject[$field->getName()] = 
$this->form->getValue($field->getName());
+    }
+  }
+
+  protected function processForm()
+  {
+    foreach ($this->form as $field)
+    {
+      if (isset($this->request[$field->getName()]))
+      {
+        $this->processField($field);
+      }
+    }
+
+    // set the informationObject's attributes
+    $this->updateCollectionType();
+    $this->updateHierarchy();
+
+    // Save related objects (save on $this->informationObject->save())
+    $this->updateObjectTermRelations();
+    $this->updateNotes();
+    $this->updateEvents();
+    $this->updateStatus();
+
+    // save informationObject after setting all of its attributes...
+    $this->informationObject->save();
+
+    // delete related objects marked for deletion
+    $this->deleteNotes();
+    $this->deleteEvents();
+    $this->deleteObjectTermRelations();
+  }
+
   public function execute($request)
   {
     $this->form = new sfForm;
@@ -229,52 +275,6 @@
     }
   }
 
-  protected function processField($field)
-  {
-    switch ($field->getName())
-    {
-      case 'descriptionDetail':
-      case 'descriptionStatus':
-      case 'repository':
-        $params = 
$this->context->routing->parse(preg_replace('/.*'.preg_quote($this->request->getPathInfoPrefix(),
 '/').'/', null, $this->form->getValue($field->getName())));
-        $this->informationObject[$field->getName().'Id'] = $params['id'];
-
-        break;
-
-      default:
-        $this->informationObject[$field->getName()] = 
$this->form->getValue($field->getName());
-    }
-  }
-
-  protected function processForm()
-  {
-    foreach ($this->form as $field)
-    {
-      if (isset($this->request[$field->getName()]))
-      {
-        $this->processField($field);
-      }
-    }
-
-    // set the informationObject's attributes
-    $this->updateCollectionType();
-    $this->updateHierarchy();
-
-    // Save related objects (save on $this->informationObject->save())
-    $this->updateObjectTermRelations();
-    $this->updateNotes();
-    $this->updateEvents();
-    $this->updateStatus();
-
-    // save informationObject after setting all of its attributes...
-    $this->informationObject->save();
-
-    // delete related objects marked for deletion
-    $this->deleteNotes();
-    $this->deleteEvents();
-    $this->deleteObjectTermRelations();
-  }
-
   public function updateHierarchy()
   {
     if ($this->hasRequestParameter('parent_id') || null === 
$this->informationObject->getParentId())

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