|
From: <gem...@li...> - 2012-10-12 13:02:15
|
Revision: 982
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=982&view=rev
Author: matijsdejong
Date: 2012-10-12 13:02:04 +0000 (Fri, 12 Oct 2012)
Log Message:
-----------
Temporary fix for org-switch/setParam() problem
Modified Paths:
--------------
trunk/library/classes/Gems/Controller/BrowseEditAction.php
trunk/library/classes/Gems/Default/OrganizationAction.php
Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php
===================================================================
--- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-10-11 16:30:59 UTC (rev 981)
+++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-10-12 13:02:04 UTC (rev 982)
@@ -439,7 +439,7 @@
$this->_applySearchParameters($model, true);
$this->addExcelColumns($model); // Hook to modify the model
-
+
// Use $this->formatExcelData to switch between formatted and unformatted data
$excelData = new Gems_FormattedData($this->getExcelData($model->load(), $model), $model, $this->formatExcelData);
@@ -636,7 +636,7 @@
foreach ($data as $key => $value) {
if ((is_array($value) && empty($value)) || (is_string($value) && 0 === strlen($value))) {
unset($data[$key]);
- }
+ }
}
}
Modified: trunk/library/classes/Gems/Default/OrganizationAction.php
===================================================================
--- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-10-11 16:30:59 UTC (rev 981)
+++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-10-12 13:02:04 UTC (rev 982)
@@ -82,13 +82,16 @@
$user->setCurrentOrganization($orgId);
if ($origUrl) {
- foreach ($user->possibleOrgIds as $key) {
- $finds[] = '/' . $key. '/' . $oldOrg;
- $replaces[] = '/' . $key. '/' . $orgId;
+ if (strpos($origUrl, '/index/') === false) {
+ $correctUrl = $origUrl;
+ } else {
+ foreach ($user->possibleOrgIds as $key) {
+ $finds[] = '/' . $key. '/' . $oldOrg;
+ $replaces[] = '/' . $key. '/' . $orgId;
+ }
+ $correctUrl = str_replace($finds, $replaces, $origUrl);
}
- $correctUrl = str_replace($finds, $replaces, $origUrl);
// MUtil_Echo::track($origUrl, $correctUrl);
-
$this->getResponse()->setRedirect($correctUrl);
} else {
$user->gotoStartPage($this->menu, $request);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|