[Mapbender-commits] r10147 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jun 13 08:04:43 PDT 2019


Author: armin11
Date: 2019-06-13 08:04:42 -0700 (Thu, 13 Jun 2019)
New Revision: 10147

Modified:
   trunk/mapbender/http/php/mod_sessionWrapper.php
Log:
More possibilities

Modified: trunk/mapbender/http/php/mod_sessionWrapper.php
===================================================================
--- trunk/mapbender/http/php/mod_sessionWrapper.php	2019-06-12 13:39:52 UTC (rev 10146)
+++ trunk/mapbender/http/php/mod_sessionWrapper.php	2019-06-13 15:04:42 UTC (rev 10147)
@@ -6,7 +6,7 @@
 $key = "mb_user_id";
 $value = null;
 $allowedOperations = array("get", "set");
-$allowedKeys = array("mb_user_id", "GML");
+$allowedKeys = array("mb_user_id", "GML", "dsgvo");
 
 $resultObj['result'] = '';
 $resultObj['success'] = false;
@@ -129,7 +129,38 @@
 		echo json_encode($resultObj);
 		die();
                 break;
-	    case "":
+	    case "dsgvo":
+		if (isset($_REQUEST["value"]) & $_REQUEST["value"] != "") {
+			$testMatch = $_REQUEST["value"];
+			$value = urldecode($testMatch);
+ 			switch($value) {
+				case "true":
+					Mapbender::session()->set($key, "yes");
+					$resultObj['success'] = true;
+					$resultObj['message'] = 'Set dsgvo to yes!'; 
+					$resultObj['result'] = null;
+					echo json_encode($resultObj);
+					die();
+					break;
+				case "false":
+					Mapbender::session()->set($key, "no");
+					$resultObj['success'] = true;
+					$resultObj['message'] = 'Set dsgvo to no!'; 
+					$resultObj['result'] = null;
+					echo json_encode($resultObj);
+					die();
+					break;
+				default:
+					Mapbender::session()->set($key, "no");
+					$resultObj['success'] = true;
+					$resultObj['message'] = 'Set dsgvo to no!'; 
+					$resultObj['result'] = null;
+					echo json_encode($resultObj);
+					die();
+					break;
+			}
+			$testMatch = NULL;
+		}
 	        break;
             default:
 		$resultObj['message'] = 'Not allowed to set key: '.$key.' via http!'; 



More information about the Mapbender_commits mailing list