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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Apr 22 22:46:52 PDT 2013


Author: armin11
Date: 2013-04-22 22:46:51 -0700 (Mon, 22 Apr 2013)
New Revision: 8607

Modified:
   trunk/mapbender/http/classes/class_wms.php
Log:
Bugfix: License information was lost when updating wms with update module.

Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2013-04-22 13:01:04 UTC (rev 8606)
+++ trunk/mapbender/http/classes/class_wms.php	2013-04-23 05:46:51 UTC (rev 8607)
@@ -2585,16 +2585,17 @@
 				db_rollback();	
 			}
 		}
-		
-		# delete and refill wms_termsofuse
-		$sql = "DELETE FROM wms_termsofuse WHERE fkey_wms_id = $1 ";
-		$v = array($myWMS);
-		$t = array('i');
-		$res = db_prep_query($sql,$v,$t);
-		if(!$res){
-			db_rollback();	
+		if ($updateMetadataOnly) {
+			# delete and refill wms_termsofuse
+			$sql = "DELETE FROM wms_termsofuse WHERE fkey_wms_id = $1 ";
+			$v = array($myWMS);
+			$t = array('i');
+			$res = db_prep_query($sql,$v,$t);
+			if(!$res){
+				db_rollback();	
+			}
+			$this->insertTermsOfUse($myWMS);
 		}
-		$this->insertTermsOfUse($myWMS);
 		//the following things should not be updated by using the metadata editor! Therefor 
 		//if ($updateMetadataOnly) {
 		//	die();



More information about the Mapbender_commits mailing list