[Mapbender-commits] r8296 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Mar 28 09:39:53 EDT 2012
Author: armin11
Date: 2012-03-28 06:39:53 -0700 (Wed, 28 Mar 2012)
New Revision: 8296
Modified:
trunk/mapbender/http/classes/class_wms.php
Log:
Bugfix for metadata editor
Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php 2012-03-27 13:10:11 UTC (rev 8295)
+++ trunk/mapbender/http/classes/class_wms.php 2012-03-28 13:39:53 UTC (rev 8296)
@@ -1778,7 +1778,7 @@
}
}
}
- function updateLayer($i,$myWMS){
+ function updateLayer($i,$myWMS,$updateMetadataOnly=false){
$sql = "SELECT layer_id FROM layer WHERE fkey_wms_id = $1 AND layer_name = $2";
$v = array($myWMS,$this->objLayer[$i]->layer_name);
$t = array('i','s');
@@ -1842,7 +1842,9 @@
# save the id of each layer: set param2 true
$this->objLayer[$i]->db_id = $l_id;
- $this->insertLayerEPSG($i);
+ if (!$updateMetadataOnly) {
+ $this->insertLayerEPSG($i);
+ }
$this->insertLayerMetadataUrls($i);
# TABLE layer_style for each layer
$this->insertLayerStyle($i);
@@ -2664,13 +2666,15 @@
for($i=0; $i<count($this->objLayer); $i++){
if(in_array($this->objLayer[$i]->layer_name,$exLayer)){
//echo "<br>update: ".$this->objLayer[$i]->layer_name;
- $this->updateLayer($i,$myWMS);
+ $e = new mb_notice("update layer of wms: ".$myWMS);
+ $this->updateLayer($i,$myWMS,$updateMetadataOnly);
for($j=0; $j<count($exGui); $j++){
$this->updateGuiLayer($i,$myWMS,$exGui[$j]);
}
}
else{
//echo "<br>append: ".$this->objLayer[$i]->layer_name;
+ $e = new mb_notice("insert layer");
$this->insertLayer($i,$myWMS);
$newLayerArray[]= $i;
for($j=0; $j<count($exGui); $j++){
More information about the Mapbender_commits
mailing list