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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 29 07:09:43 EDT 2007


Author: christoph
Date: 2007-10-29 07:09:43 -0400 (Mon, 29 Oct 2007)
New Revision: 1763

Modified:
   trunk/mapbender/http/php/mod_updateWMS.php
Log:
wms owner: ids instead of names

Modified: trunk/mapbender/http/php/mod_updateWMS.php
===================================================================
--- trunk/mapbender/http/php/mod_updateWMS.php	2007-10-29 11:08:03 UTC (rev 1762)
+++ trunk/mapbender/http/php/mod_updateWMS.php	2007-10-29 11:09:43 UTC (rev 1763)
@@ -50,7 +50,6 @@
 	var ind = document.form1.selWMS.selectedIndex;
 	var wmsData = document.form1.selWMS.options[ind].value.split("###");
 	document.form1.capURL.value = wmsData[1];
-	document.form1.myURL.value = wmsData[1];
 	document.form1.myWMS.value = wmsData[0];
 }
 </script>
@@ -108,21 +107,17 @@
 
 	$mywms = new wms();
 	$mywms->createObjFromXML($myURL);    
+	$mywms->optimizeWMS();
 	echo "<br />";  
 	$mywms->updateObjInDB($myWMS);
 	$mywms->displayWMS();
 
 	// start (owners of the updated wms will be notified by email)
 	if ($use_php_mailing) {
-		$owner = $admin->getOwnerByWms($myWMS);
+		$owner_ids = $admin->getOwnerByWms($myWMS);
 		
-		if ($owner && count($owner)>0) {
-			$owner_ids = array();
+		if ($owner_ids && count($owner_ids)>0) {
 			$owner_mail_addresses = array();
-			for ($i=0; $i<count($owner); $i++) {
-				$tmp_array = $admin->getUserIdByUserName($owner[$i]);
-				$owner_ids[$i] = $tmp_array[0]; 
-			}
 			$j=0;
 			for ($i=0; $i<count($owner_ids); $i++) {
 				$adr_tmp = $admin->getEmailByUserId($owner_ids[$i]);



More information about the Mapbender_commits mailing list