[Mapbender-commits] r9074 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Sep 15 01:32:04 PDT 2014


Author: armin11
Date: 2014-09-15 01:32:04 -0700 (Mon, 15 Sep 2014)
New Revision: 9074

Modified:
   trunk/mapbender/http/classes/class_wmc.php
Log:
Option to delete old dataurl elements from wmc if inspire download is deactivated

Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php	2014-09-12 10:19:29 UTC (rev 9073)
+++ trunk/mapbender/http/classes/class_wmc.php	2014-09-15 08:32:04 UTC (rev 9074)
@@ -626,6 +626,7 @@
 			//Loop over found layerObject - normally only one single layer is there. Alter the information in the simple xml object
 			foreach($WMCDoc->xpath($queryPath) as $layer ) {
 				$e = new mb_notice("class_wmc: exchange old layer name : ".$layer->Name." with new layer name: ".$layerName);
+				$e = new mb_notice("class_wmc: exchange old layer name : ".$layer->Name." with new layer name: ".$layerName);
   				$layer->Name = $layerName;
 				$e = new mb_notice("class_wmc: exchange old getmap url : ".$layer->Server->OnlineResource->attributes('xlink', true)->href." with new getmap url: ".$wmsGetMapUrl);
  				$layer->Server->OnlineResource->attributes('xlink', true)->href = $wmsGetMapUrl;
@@ -707,7 +708,16 @@
 						}
 						$e = new mb_notice("class_wmc.php - updateUrlsInDb new DataURL XML : ".$layer->asXML());
 					}
+
 				}
+				if (defined("SHOW_INSPIRE_DOWNLOAD_IN_TREE") && SHOW_INSPIRE_DOWNLOAD_IN_TREE == true && $row["downloadoptions"] == ""){
+					$e = new mb_notice("class_wmc.php - updateUrlsInDb: empty INSPIRE download option found!");
+					//delete an given DataURL element, cause INSPIRE options should be used
+					if (count($layer->DataURL) > 0) {
+						$e = new mb_notice("class_wmc.php - updateUrlsInDb: unset DataURL element cause there is no INSPIRE download option!");
+						unset($layer->DataURL);
+					}
+				}
 				//Help for problem with xlink:href attributes: http://php.net/manual/de/class.simplexmlelement.php!!!!!
 				//exchange legend urls
 				if (isset($row["wms_owsproxy"]) && $row["wms_owsproxy"] != '' && !is_null($row["wms_owsproxy"])) {



More information about the Mapbender_commits mailing list