[mapguide-commits] r5345 - branches/2.2/MgDev/Web/src/mapviewerphp
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Oct 28 05:43:16 EDT 2010
Author: jng
Date: 2010-10-28 02:43:16 -0700 (Thu, 28 Oct 2010)
New Revision: 5345
Modified:
branches/2.2/MgDev/Web/src/mapviewerphp/taskframe.php
Log:
Fix #1501: taskframe.php fails to load absolute initial task urls
Modified: branches/2.2/MgDev/Web/src/mapviewerphp/taskframe.php
===================================================================
--- branches/2.2/MgDev/Web/src/mapviewerphp/taskframe.php 2010-10-28 09:02:19 UTC (rev 5344)
+++ branches/2.2/MgDev/Web/src/mapviewerphp/taskframe.php 2010-10-28 09:43:16 UTC (rev 5345)
@@ -54,12 +54,15 @@
//If there is an initial url, it will be encoded, so parse the decoded url.
$comp = parse_url(urldecode($taskPaneUrl));
+ $baseUrl = urldecode(taskPaneUrl);
+ if(strncasecmp($taskPaneUrl, "http://", 7) != 0) //Is relative
+ $baseUrl = $vpath . $comp["path"];
//If there is a query component to the initial url, append it to the end of the full url string
if(!isset($comp["query"]) || strlen($comp["query"]) == 0)
- $url = sprintf("%s?SESSION=%s&WEBLAYOUT=%s&DWF=%s&LOCALE=%s", $comp["path"], $sessionId, urlencode($webLayoutId), $dwf, $locale);
+ $url = sprintf("%s?SESSION=%s&WEBLAYOUT=%s&DWF=%s&LOCALE=%s", $baseUrl, $sessionId, urlencode($webLayoutId), $dwf, $locale);
else
- $url = sprintf("%s?SESSION=%s&WEBLAYOUT=%s&DWF=%s&LOCALE=%s&%s", $comp["path"], $sessionId, urlencode($webLayoutId), $dwf, $locale, $comp["query"]);
+ $url = sprintf("%s?SESSION=%s&WEBLAYOUT=%s&DWF=%s&LOCALE=%s&%s", $baseUrl, $sessionId, urlencode($webLayoutId), $dwf, $locale, $comp["query"]);
$templ = file_get_contents("../viewerfiles/taskframe.templ");
print sprintf($templ, $vpath ."tasklist.php", $locale, $url);
More information about the mapguide-commits
mailing list