| 
      
      
      From: <gem...@li...> - 2012-10-16 13:15:59
      
     | 
| Revision: 986
          http://gemstracker.svn.sourceforge.net/gemstracker/?rev=986&view=rev
Author:   matijsdejong
Date:     2012-10-16 13:15:50 +0000 (Tue, 16 Oct 2012)
Log Message:
-----------
Final fix for org-switch/setParam() problem
Modified Paths:
--------------
    tags/1.5.6-pulse20121012/library/classes/Gems/Default/OrganizationAction.php
Modified: tags/1.5.6-pulse20121012/library/classes/Gems/Default/OrganizationAction.php
===================================================================
--- tags/1.5.6-pulse20121012/library/classes/Gems/Default/OrganizationAction.php	2012-10-12 16:57:08 UTC (rev 985)
+++ tags/1.5.6-pulse20121012/library/classes/Gems/Default/OrganizationAction.php	2012-10-16 13:15:50 UTC (rev 986)
@@ -82,14 +82,15 @@
             $user->setCurrentOrganization($orgId);
 
             if ($origUrl) {
-                if (strpos($origUrl, '/index/') === false) {
-                    $correctUrl = $origUrl;
-                } else {
+                // Check for organisation id in url, but not when a patient id is stated
+                if (strpos($origUrl, '/' . MUtil_Model::REQUEST_ID1 . '/') === false) {
                     foreach ($user->possibleOrgIds as $key) {
                         $finds[]    = '/' . $key. '/' . $oldOrg;
                         $replaces[] = '/' . $key. '/' . $orgId;
                     }
                     $correctUrl = str_replace($finds, $replaces, $origUrl);
+                } else {
+                    $correctUrl = $origUrl;
                 }
                 // MUtil_Echo::track($origUrl, $correctUrl);
                 $this->getResponse()->setRedirect($correctUrl);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |