Author: sevein
Date: Mon Nov  8 10:48:49 2010
New Revision: 8801

Log:
Cosmetic change. Avoid to run processForm() when duplicationg because it is not 
necessary.

Modified:
   trunk/apps/qubit/modules/event/actions/editComponent.class.php

Modified: trunk/apps/qubit/modules/event/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/event/actions/editComponent.class.php      Mon Nov 
 8 10:33:08 2010        (r8800)
+++ trunk/apps/qubit/modules/event/actions/editComponent.class.php      Mon Nov 
 8 10:48:49 2010        (r8801)
@@ -99,6 +99,12 @@
 
   public function processForm()
   {
+    // Ignore this method if duplicating
+    if (isset($this->request->sourceId))
+    {
+      return;
+    }
+
     $params = array($this->request->editEvent);
     if (isset($this->request->editEvents))
     {
@@ -125,7 +131,7 @@
       $this->form->bind($item);
       if ($this->form->isValid())
       {
-        if (!isset($this->request->source) && isset($item['id']))
+        if (isset($item['id']))
         {
           $params = 
$this->context->routing->parse(Qubit::pathInfo($item['id']));
           $this->event = $params['_sf_route']->resource;
@@ -145,7 +151,7 @@
       }
     }
 
-    if (!isset($this->request->sourceId) && 
isset($this->request->deleteEvents))
+    if (isset($this->request->deleteEvents))
     {
       foreach ($this->request->deleteEvents as $item)
       {

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