[Mapbender-commits] r3289 - branches/beck_dev/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Dec 11 02:19:47 EST 2008


Author: beck
Date: 2008-12-11 02:19:45 -0500 (Thu, 11 Dec 2008)
New Revision: 3289

Modified:
   branches/beck_dev/http/javascripts/mod_mapCookie.php
Log:


Modified: branches/beck_dev/http/javascripts/mod_mapCookie.php
===================================================================
--- branches/beck_dev/http/javascripts/mod_mapCookie.php	2008-12-11 07:00:29 UTC (rev 3288)
+++ branches/beck_dev/http/javascripts/mod_mapCookie.php	2008-12-11 07:19:45 UTC (rev 3289)
@@ -19,19 +19,15 @@
 
 require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 
-echo "var mod_mapCookie_target = '".trim($e_target[0])."';";
+echo "var mod_mapCookie_target = '".trim(array_shift($e_target))."';";
 ?>
 
-// Cookie lifetime in days
 var mod_mapCookie_cookieLifetime = 7;
-// Cookie name
 var mod_mapCookie_cookieName     = 'stored_map_state';
 
-// Bind funtions to init event
 eventInit.register(restoreMapState);
 eventInit.register(triggerUnload);
 
-// Restore map state from cookie
 function restoreMapState() {
 	if(!document.cookie) {
 		return;
@@ -54,7 +50,6 @@
 	}
 }
 
-// Store map state on exit
 function storeMapState() {
 	var currentMapState = mb_mapObj[getMapObjIndexByName(mod_mapCookie_target)];
 	var cookieExpires   = new Date();
@@ -68,7 +63,6 @@
 	document.cookie = 'stored_map_state=' + $.toJSON(cookieData) + ';expires=' + cookieExpires.toGMTString();
 }
 
-// Call function on unload
 function triggerUnload() {
 	if(ie) {
 		document.getElementById('body').onunload = function() {



More information about the Mapbender_commits mailing list