[Mapbender-commits] r7449 - in trunk/mapbender/http: javascripts php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jan 18 05:50:31 EST 2011


Author: apour
Date: 2011-01-18 02:50:31 -0800 (Tue, 18 Jan 2011)
New Revision: 7449

Modified:
   trunk/mapbender/http/javascripts/initWmcObj.php
   trunk/mapbender/http/php/mod_savewmc_server.php
Log:
put wmc in tmp folder

Modified: trunk/mapbender/http/javascripts/initWmcObj.php
===================================================================
--- trunk/mapbender/http/javascripts/initWmcObj.php	2011-01-18 10:01:45 UTC (rev 7448)
+++ trunk/mapbender/http/javascripts/initWmcObj.php	2011-01-18 10:50:31 UTC (rev 7449)
@@ -63,8 +63,12 @@
 $wmc = new wmc();
 
 $app = Mapbender::session()->get("mb_user_gui");
-$wmcDocSession = Mapbender::session()->get("mb_wmc");
+//$wmcDocSession = Mapbender::session()->get("mb_wmc");
 
+$wmc_filename = Mapbender::session()->get("mb_wmc");
+$wmcDocSession = file_get_contents($wmc_filename);
+
+
 try {
 	$loadFromSession = new ElementVar($app, "loadwmc", "loadFromSession");
 	if ($wmcDocSession && $loadFromSession->value === "1") {

Modified: trunk/mapbender/http/php/mod_savewmc_server.php
===================================================================
--- trunk/mapbender/http/php/mod_savewmc_server.php	2011-01-18 10:01:45 UTC (rev 7448)
+++ trunk/mapbender/http/php/mod_savewmc_server.php	2011-01-18 10:50:31 UTC (rev 7449)
@@ -43,8 +43,13 @@
 }
 
 if ($saveInSession === 1) {
+	// store XML in tmp folder
+    $filename = TMPDIR."/".time()."_".uniqid();
+    file_put_contents($filename, $wmc->xml);
+	Mapbender::session()->set("mb_wmc",$filename);
+    
 	// store XML in session
-	Mapbender::session()->set("mb_wmc",$wmc->xml);
+    //Mapbender::session()->set("mb_wmc",$wmc->xml);
 	Mapbender::session()->set("epsg",$mapObject->epsg);
 	Mapbender::session()->set("previous_gui", Mapbender::session()->get("mb_user_gui"));
 	



More information about the Mapbender_commits mailing list