[mapguide-commits] r6257 - trunk/MgDev/Web/src/mapadmin

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Nov 29 01:00:00 EST 2011


Author: liuar
Date: 2011-11-28 22:00:00 -0800 (Mon, 28 Nov 2011)
New Revision: 6257

Modified:
   trunk/MgDev/Web/src/mapadmin/performanceReport.php
   trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php
   trunk/MgDev/Web/src/mapadmin/performanceReport_MapViewer.php
Log:
This submission is mainly fixed some defects on Linux:
1. on Linux, the "select settings" dialogue is not displayed correctly, cause the code depends on the folder "ajaxviewerjava" which is always installed on liunx
2. fix the problem that session timeout issue

Modified: trunk/MgDev/Web/src/mapadmin/performanceReport.php
===================================================================
--- trunk/MgDev/Web/src/mapadmin/performanceReport.php	2011-11-29 04:38:32 UTC (rev 6256)
+++ trunk/MgDev/Web/src/mapadmin/performanceReport.php	2011-11-29 06:00:00 UTC (rev 6257)
@@ -945,7 +945,7 @@
                 mapViewerDocumentElement = document.getElementById("mapViewerFrame").contentWindow.document.documentElement;
             }
 
-            if(mapViewerDocumentElement.innerHTML.indexOf("MapGuide Site Administrator - Login") > 1)
+            if(mapViewerDocumentElement.innerHTML.indexOf("Site Administrator - Login") > 1)
             {
                 if(mapViewerDocumentElement.innerHTML.indexOf("login.php") > 1)
                 {
@@ -1420,7 +1420,7 @@
             if ((4 == xmlHttp.readyState || "complete" == xmlHttp.readyState)&& 200 == xmlHttp.status)
             {
                 //if the session is time out, the whole page should redirect to the login page
-                if(xmlHttp.responseText.indexOf("MapGuide Site Administrator - Login") > 1)
+                if(xmlHttp.responseText.indexOf("Site Administrator - Login") > 1)
                 {
                     if(xmlHttp.responseText.indexOf("login.php") > 1)
                         {

Modified: trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php
===================================================================
--- trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php	2011-11-29 04:38:32 UTC (rev 6256)
+++ trunk/MgDev/Web/src/mapadmin/performanceReport_GetResult.php	2011-11-29 06:00:00 UTC (rev 6257)
@@ -30,7 +30,7 @@
     {
         $layerCollection = $map->GetLayers();
         $n = 0;
-        $bLayers;
+        $bLayers = array();
         for ($i = 0; $i < $layerCollection->GetCount(); $i++)
         {
              $layer = $layerCollection->GetItem($i);

Modified: trunk/MgDev/Web/src/mapadmin/performanceReport_MapViewer.php
===================================================================
--- trunk/MgDev/Web/src/mapadmin/performanceReport_MapViewer.php	2011-11-29 04:38:32 UTC (rev 6256)
+++ trunk/MgDev/Web/src/mapadmin/performanceReport_MapViewer.php	2011-11-29 06:00:00 UTC (rev 6257)
@@ -44,11 +44,15 @@
     //from mapviewerajax to mapviewerjava, and change the relative path to absolute path
     //which casues the cross-domain problem
     //now we check if we install the ajax java, then use the "mapviewerjava/ajaxviewer.jsp?" directly to avoid this problem
-    if(file_exists("../mapviewerjava/ajaxviewer.jsp"))
+    $os = (DIRECTORY_SEPARATOR=='\\') ? "winNT" : "linux";
+    //under the linux system, the mapviewerjava is always installed, so if someone is running apache + java on linux,
+    //the admin should manually change the line 51 as:
+    //if(file_exists("../mapviewerjava/ajaxviewer.jsp"))
+    if( ("winNT" == $os) && file_exists("../mapviewerjava/ajaxviewer.jsp"))
     {
         $ajaxViewerFolder = "mapviewerjava/ajaxviewer.jsp?";
     }
-    
+
     $webLayoutUrl="../".$ajaxViewerFolder."WEBLAYOUT=".urlencode($webLayoutName)."&LOCALE=en&SESSION=".$site->GetCurrentSession();
 
     header('Location:'. $webLayoutUrl);



More information about the mapguide-commits mailing list