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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 31 22:15:44 PDT 2014


Author: armin11
Date: 2014-07-31 22:15:43 -0700 (Thu, 31 Jul 2014)
New Revision: 9012

Modified:
   trunk/mapbender/http/classes/class_metadata_new.php
Log:
Bugfix to show INSPIRE downloadoptions for wms layer without styles

Modified: trunk/mapbender/http/classes/class_metadata_new.php
===================================================================
--- trunk/mapbender/http/classes/class_metadata_new.php	2014-07-29 12:09:42 UTC (rev 9011)
+++ trunk/mapbender/http/classes/class_metadata_new.php	2014-08-01 05:15:43 UTC (rev 9012)
@@ -1459,7 +1459,7 @@
 	}
 
 	private function getInfofromLayerId($layerId) {
-			$sql = "SELECT layer_wms.*, layer_style.legendurl, layer_style.legendurlformat FROM (SELECT layer_id, f_get_download_options_for_layer(layer_id) as layer_metadata, layer_minscale, layer_maxscale, wms_getlegendurl, wms_owsproxy FROM layer INNER JOIN wms ON layer.fkey_wms_id = wms.wms_id WHERE layer.layer_id = $1) as layer_wms, layer_style where layer_style.fkey_layer_id = layer_wms.layer_id";
+			$sql = "SELECT layer_wms.*, layer_style.legendurl, layer_style.legendurlformat FROM (SELECT layer_id, f_get_download_options_for_layer(layer_id) as layer_metadata, layer_minscale, layer_maxscale, wms_getlegendurl, wms_owsproxy FROM layer INNER JOIN wms ON layer.fkey_wms_id = wms.wms_id WHERE layer.layer_id = $1) as layer_wms LEFT OUTER JOIN layer_style ON layer_style.fkey_layer_id = layer_wms.layer_id";
 			$v = array($layerId);
 			$t = array('i');
 			$res = db_prep_query($sql, $v, $t);
@@ -1653,7 +1653,9 @@
 			$servObject->layer[$countsublayer]->minScale = $legendInfo['minScale'];
 			$servObject->layer[$countsublayer]->maxScale = $legendInfo['maxScale'];
 			$downloadOptionsCs = str_replace("{","",str_replace("}","",str_replace("}{",",",$legendInfo['downloadOptions'])));
+			//$e = new mb_exception("class_metadata_new.php: legendInfo[downloadOptions]: ".$legendInfo['downloadOptions']);
 			$downloadOptions = json_decode(getDownloadOptions(explode(',',$downloadOptionsCs)));
+			//$e = new mb_exception("class_metadata_new.php: downloadOptions as string: ".json_encode($downloadOptions));
 			$servObject->layer[$countsublayer]->downloadOptions = $downloadOptions;
 			$servObject->layer[$countsublayer]->mdLink = "http://".$this->hostName."/mapbender/php/mod_showMetadata.php?languageCode=".$this->languageCode."&resource=layer&layout=tabs&id=".$child['layer_id'];
 			if ($child['layer_name'] == ''){



More information about the Mapbender_commits mailing list