Author: jablko
Date: Fri Oct  2 11:44:42 2009
New Revision: 3642

Log:
Avoid adding host to redirect URL, fixes issue 1017

Modified:
   trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php
   trunk/apps/qubit/modules/physicalobject/actions/updateAction.class.php

Modified: trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php      
Fri Oct  2 11:43:22 2009        (r3641)
+++ trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php      
Fri Oct  2 11:44:42 2009        (r3642)
@@ -41,10 +41,6 @@
     // Delete physical object record from the database
     $physicalObject->delete();
 
-    // Make the $next parameter into an absolute URL because redirect() expects
-    // an absolute URL or an array containing module and action
-    // (Pre-pend code copied from sfWebController->genUrl() method)
-    $next = 'http'.($request->isSecure() ? 's' : 
'').'://'.$request->getHost().$this->getRequestParameter('next');
-    $this->redirect($next);
+    $this->redirect($request->next);
   }
 }

Modified: trunk/apps/qubit/modules/physicalobject/actions/updateAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/updateAction.class.php      
Fri Oct  2 11:43:22 2009        (r3641)
+++ trunk/apps/qubit/modules/physicalobject/actions/updateAction.class.php      
Fri Oct  2 11:44:42 2009        (r3642)
@@ -51,11 +51,7 @@
     // Redirect to information object edit page
     if ($this->hasRequestParameter('next'))
     {
-      // Make the $next parameter into an absolute URL because redirect() 
expects
-      // an absolute URL or an array containing module and action
-      // (Pre-pend code copied from sfWebController->genUrl() method)
-      $next = 'http'.($request->isSecure() ? 's' : 
'').'://'.$request->getHost().$this->getRequestParameter('next');
-      $this->redirect($next);
+      $this->redirect($request->next);
     }
 
     // Default redirect

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