From: <gem...@li...> - 2012-10-16 13:41:52
|
Revision: 987 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=987&view=rev Author: matijsdejong Date: 2012-10-16 13:41:46 +0000 (Tue, 16 Oct 2012) Log Message: ----------- Final fix for org-switch/setParam() problem Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php Property Changed: ---------------- trunk/library/ Property changes on: trunk/library ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/library:306-344,346,467 /branches/1.5.x/library:426-455,458-472,475-481 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 /tags/1.5.1/library:485,489,509-510,534 /tags/1.5.3-rc2/library:612,614,616,618 + /branches/1.5.0-pulse/library:306-344,346,467 /branches/1.5.x/library:426-455,458-472,475-481 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 /tags/1.5.1/library:485,489,509-510,534 /tags/1.5.3-rc2/library:612,614,616,618 /tags/1.5.6-pulse20121012/library:986 Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-10-16 13:15:50 UTC (rev 986) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-10-16 13:41:46 UTC (rev 987) @@ -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. |