[Mapbender-commits] r7644 - in trunk/mapbender/http: php plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Feb 24 08:32:03 EST 2011


Author: armin11
Date: 2011-02-24 05:32:03 -0800 (Thu, 24 Feb 2011)
New Revision: 7644

Modified:
   trunk/mapbender/http/php/mod_callMetadata.php
   trunk/mapbender/http/plugins/mb_extendedSearch_server.php
Log:
bugfixing session evaluation

Modified: trunk/mapbender/http/php/mod_callMetadata.php
===================================================================
--- trunk/mapbender/http/php/mod_callMetadata.php	2011-02-24 10:17:05 UTC (rev 7643)
+++ trunk/mapbender/http/php/mod_callMetadata.php	2011-02-24 13:32:03 UTC (rev 7644)
@@ -307,6 +307,9 @@
 	$resultTarget = $testMatch;
 	$testMatch = NULL;
 }
+$e = new mb_exception("UserID GET: ".$_REQUEST['userId']);
+$e = new mb_exception("UserID from session (new): ".Mapbender::session()->get("mb_user_id"));
+$e = new mb_exception("UserID from session (old): ".$_SESSION['mb_user_id']);
 
 if (isset($_REQUEST["userId"]) & $_REQUEST["userId"] != "") {
         //validate integer to 100 - not more
@@ -319,18 +322,16 @@
         }
         $userId = $testMatch;
         $testMatch = NULL;
-} else {
-
-if (!isset(Mapbender::session()->get("mb_user_id")) ) {
-        $userId = PUBLIC_USER;
+#
+} else { //look for id in session
+  $userId = Mapbender::session()->get("mb_user_id");
+  if ($userId == false) {
+	  $userId = PUBLIC_USER;
+    }
 }
-else
-{
-        $userId = Mapbender::session()->get("mb_user_id");
-}
 
-}
 
+
 #$searchResources = array('wms','wfs','wmc','georss');
 #$searchPages = array(1,1,1,1);
 

Modified: trunk/mapbender/http/plugins/mb_extendedSearch_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_extendedSearch_server.php	2011-02-24 10:17:05 UTC (rev 7643)
+++ trunk/mapbender/http/plugins/mb_extendedSearch_server.php	2011-02-24 13:32:03 UTC (rev 7644)
@@ -10,9 +10,10 @@
 $json = new Services_JSON();
 $obj = $json->decode(stripslashes($_REQUEST['obj']));
 //get language parameter out of mapbender session if it is set else set default language to de_DE
-if (isset(Mapbender::session()->get("mb_lang")) and Mapbender::session()->get("mb_lang")!='') {
-	$e = new mb_exception("mb_extentedSearch_server.php: language in session: ".Mapbender::session()->get("mb_lang"));
-	$language = Mapbender::session()->get("mb_lang");
+$sessionLang = Mapbender::session()->get("mb_lang");
+if (($sessionLang != false) && ($sessionLang != '')) {
+	$e = new mb_exception("mb_extentedSearch_server.php: language in session: ".$sessionLang);
+	$language = $sessionLang;
 } else {
 	$language = "de_DE";//use locale for compatibility with later mapbender version
 }



More information about the Mapbender_commits mailing list