svn commit: r902 - trunk/mapbender/http/php/mod_updateWMS.php

christoph at osgeo.org christoph at osgeo.org
Tue Nov 21 04:10:30 EST 2006


Author: christoph
Date: 2006-11-21 09:10:29+0000
New Revision: 902

Modified:
   trunk/mapbender/http/php/mod_updateWMS.php

Log:
* changed user_id retrieval

Modified: trunk/mapbender/http/php/mod_updateWMS.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_updateWMS.php?view=diff&rev=902&p1=trunk/mapbender/http/php/mod_updateWMS.php&p2=trunk/mapbender/http/php/mod_updateWMS.php&r1=901&r2=902
==============================================================================
--- trunk/mapbender/http/php/mod_updateWMS.php	(original)
+++ trunk/mapbender/http/php/mod_updateWMS.php	2006-11-21 09:10:29+0000
@@ -18,10 +18,10 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 session_start();
-require_once("../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 $con = db_connect(DBSERVER,OWNER,PW);
-require_once("mb_validatePermission.php");
-require_once("../classes/class_wms.php"); 
+require_once(dirname(__FILE__)."/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_wms.php"); 
 import_request_variables("PG");
 $secParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
 $self = $PHP_SELF."?".$secParams;
@@ -60,10 +60,10 @@
 
 
 
-require_once("../classes/class_administration.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
 $admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"]);
-$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"]);
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
 $wms_id_own = $admin->getWmsByOwnGuis($ownguis);
 
 if (count($wms_id_own)>0 AND count($ownguis)>0 AND count($permguis)>0){
@@ -120,7 +120,8 @@
 			$owner_ids = array();
 			$owner_mail_addresses = array();
 			for ($i=0; $i<count($owner); $i++) {
-				$owner_ids[$i] = $admin->getUserIdByUserName($owner[$i]);
+				$tmp_array = $admin->getUserIdByUserName($owner[$i]);
+				$owner_ids[$i] = $tmp_array[0]; 
 			}
 			$j=0;
 			for ($i=0; $i<count($owner_ids); $i++) {




More information about the Mapbender_commits mailing list