[Mapbender-commits] r9547 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jul 15 05:08:05 PDT 2016


Author: armin11
Date: 2016-07-15 05:08:04 -0700 (Fri, 15 Jul 2016)
New Revision: 9547

Modified:
   trunk/mapbender/http/php/mod_deleteWMS.php
Log:
Fix for new propagation class

Modified: trunk/mapbender/http/php/mod_deleteWMS.php
===================================================================
--- trunk/mapbender/http/php/mod_deleteWMS.php	2016-07-15 11:57:58 UTC (rev 9546)
+++ trunk/mapbender/http/php/mod_deleteWMS.php	2016-07-15 12:08:04 UTC (rev 9547)
@@ -21,7 +21,7 @@
 $e_id="deleteWMS";
 require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
 require_once dirname(__FILE__) . "/../classes/class_iso19139.php";
-require_once(dirname(__FILE__) . "/../classes/class_cswClient.php");
+require_once(dirname(__FILE__) . "/../classes/class_propagateMetadata.php");
 /*  
  * @security_patch irv done
  */ 
@@ -260,27 +260,15 @@
 			$geoRss->saveAsFile();	
 			//delete metadata of connected catalogue
 			//Propagate information for each new layer to csw if configured
-			if (defined("SYNC_CHANGES_TO_CSW") && SYNC_CHANGES_TO_CSW == true && defined("SYNC_CATALOGUE_ID") && is_int(SYNC_CATALOGUE_ID)) {
-				/*if (defined("MAPBENDER_PATH") && MAPBENDER_PATH !== "") {
-					//layer service metadata generator 
-					$servMdPath = MAPBENDER_PATH."/php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=";
-				} else {
-					$servMdPath = "http://".$_SERVER['HTTP_HOST']."/mapbender"."/php/mod_layerISOMetadata.php?SERVICE=WMS&outputFormat=iso19139&Id=";
-				}*/
-				$cswClient = new cswClient();
-				$cswClient->cswId = SYNC_CATALOGUE_ID;
-				//$isoMetadata = new Iso19139();
-				foreach ($layerArray as $layer) {
-						$result = $cswClient->deleteRecord($layer['uuid']);
-						$e = new mb_notice($result);
-						//$metadata = $isoMetadata->createFromUrl($servMdPath.$layer['id']);
-						//$result = $cswClient->pushRecord($metadata);
-				}
-			}   
+			$layerUuid = array();
+			foreach ($layerArray as $layer) {
+					$layerUuid[] = $layer['uuid'];
+			} 
+			$propagation = new propagateMetadata();
+			$result = $propagation->doPropagation("layer", false, "delete", $layerUuid);
 		}
 	}
 	// display WMS List
-	
 	$wms_id_own = $admin->getWmsByOwner(Mapbender::session()->get("mb_user_id"),true);
 	
 	if (count($wms_id_own)>0){



More information about the Mapbender_commits mailing list