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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Feb 15 10:21:27 EST 2011


Author: armin11
Date: 2011-02-15 07:21:27 -0800 (Tue, 15 Feb 2011)
New Revision: 7609

Modified:
   trunk/mapbender/http/javascripts/mod_loadwmc.js
   trunk/mapbender/http/php/mod_getServiceDisclaimer.php
Log:
bugfixes

Modified: trunk/mapbender/http/javascripts/mod_loadwmc.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_loadwmc.js	2011-02-15 14:07:29 UTC (rev 7608)
+++ trunk/mapbender/http/javascripts/mod_loadwmc.js	2011-02-15 15:21:27 UTC (rev 7609)
@@ -14,24 +14,24 @@
 options.uploadWmc = typeof options.uploadWmc === "number" ? options.uploadWmc : 1;
 options.listWmc = typeof options.listWmc === "number" ? options.listWmc : 1;
 options.saveWmcTarget = typeof options.saveWmcTarget === "string" ? options.saveWmcTarget : "savewmc";
-options.editWmc = typeof options.editWmc === "number" ? options.editWmc : 1;
+options.editWmc = typeof options.editWmc === "number" ? options.editWmc : 0;
 options.showPublic = typeof options.showPublic === "number" ? options.showPublic : 0;
 
 Mapbender.events.init.register(function () {
-	if(Mapbender.modules[options.saveWmcTarget] && Mapbender.modules[options.saveWmcTarget].overwrite === 1) {
+	if(Mapbender.modules[options.saveWmcTarget] && Mapbender.modules[options.saveWmcTarget].overwrite === 1 && options.editWmc == 1) {
 		options.editWmc = 1;
 	}
 	else {
 		options.editWmc = 0;
 	}
-	/*if(Mapbender.modules.i18n){	
-	Mapbender.modules.i18n.queue(options.id, originalI18nObject, function (translatedObject) {
-		if (typeof translatedObject !== "object") {
-			return;
-		}
-		translatedI18nObject = translatedObject;
-	});
-	//Mapbender.modules.i18n.localize(Mapbender.languageId);*/
+	//if(Mapbender.modules.i18n){	
+	//Mapbender.modules.i18n.queue(options.id, originalI18nObject, function (translatedObject) {
+	//	if (typeof translatedObject !== "object") {
+	//			return;
+	//	}
+	//	translatedI18nObject = translatedObject;
+	//});
+	//Mapbender.modules.i18n.localize(Mapbender.languageId);
 //}
 	
 });

Modified: trunk/mapbender/http/php/mod_getServiceDisclaimer.php
===================================================================
--- trunk/mapbender/http/php/mod_getServiceDisclaimer.php	2011-02-15 14:07:29 UTC (rev 7608)
+++ trunk/mapbender/http/php/mod_getServiceDisclaimer.php	2011-02-15 15:21:27 UTC (rev 7609)
@@ -230,7 +230,7 @@
 			$discPrivacy .= "<a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a>";
 			echo $t_a.$htmlHeader['discPrivacyHeader'].$t_b.$discPrivacy.$t_c;
 		}
-		if (strtoupper($row['accessconstraints']) != "NONE" or (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) ) {
+		if ((strtoupper($row['accessconstraints']) != "NONE" & (str_replace(" ", "", $row['accessconstraints']) != "")) or (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) ) {
 			$accessConstraintsHeader = $htmlHeader['accessConstraintsHeader'];
 			if (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) {
 				$accessConstraints = $htmlHeader['networkAccess'];
@@ -273,7 +273,7 @@
 			echo "<h2>".$htmlHeader['discPrivacyHeader']."</h2>";
 			echo $discPrivacy."<br>";
 		}
-		if (strtoupper($row['accessconstraints']) != "NONE" or (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) ) {
+		if ((strtoupper($row['accessconstraints']) != "NONE" & (str_replace(" ", "", $row['accessconstraints']) != "")) or (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) ) {
 			$accessConstraintsHeader = $htmlHeader['accessConstraintsHeader'];
 			if (isset($row[$type.'_network_access']) & $row[$type.'_network_access'] != 0) {
 				$accessConstraints = $htmlHeader['networkAccess'];



More information about the Mapbender_commits mailing list