Author: sevein
Date: Thu Aug 18 23:56:13 2011
New Revision: 9542

Log:
Hack to get id from URL, contact information objects don't use slugs

Modified:
   
trunk/apps/qubit/modules/contactinformation/actions/relatedContactInformationComponent.class.php

Modified: 
trunk/apps/qubit/modules/contactinformation/actions/relatedContactInformationComponent.class.php
==============================================================================
--- 
trunk/apps/qubit/modules/contactinformation/actions/relatedContactInformationComponent.class.php
    Thu Aug 18 23:55:05 2011        (r9541)
+++ 
trunk/apps/qubit/modules/contactinformation/actions/relatedContactInformationComponent.class.php
    Thu Aug 18 23:56:13 2011        (r9542)
@@ -86,7 +86,7 @@
   }
 
   public function processForm()
-  { echo "<pre>"; var_dump($_POST); die();
+  { // echo "<pre>"; var_dump($_POST); die();
     // HACK For now, parameter name and action name are the same. Should
     // really be configurable, ideally by interpreting
     // $form->getWidgetSchema()->getNameFormat()?
@@ -118,7 +118,7 @@
       {
         if (isset($item['id']))
         {
-          $this->contactInformation = 
QubitContactInformation::getById($item['id']);
+          $this->contactInformation = 
QubitContactInformation::getById(preg_replace('/^(.*)(\d+)$/', '$2', 
$item['id']));
         }
         else
         {
@@ -132,6 +132,11 @@
             $this->processField($field);
           }
         }
+
+        if (isset($item['id']))
+        {
+          $this->contactInformation->save();
+        }
       }
     }
 

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