[Mapbender-commits] r9371 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jan 18 08:01:16 PST 2016
Author: armin11
Date: 2016-01-18 08:01:16 -0800 (Mon, 18 Jan 2016)
New Revision: 9371
Modified:
trunk/mapbender/http/classes/class_administration.php
Log:
New functions for activating owsproxy for wfs
Modified: trunk/mapbender/http/classes/class_administration.php
===================================================================
--- trunk/mapbender/http/classes/class_administration.php 2016-01-18 10:28:14 UTC (rev 9370)
+++ trunk/mapbender/http/classes/class_administration.php 2016-01-18 16:01:16 UTC (rev 9371)
@@ -1397,7 +1397,31 @@
return false;
}
}
+
/*
+ * get the authentication info out of wfs table
+ *
+ * @param integer the wfs-id
+ * @return array auth - 'username', 'password', 'auth_type' if not set, return false
+ */
+
+ function getAuthInfoOfWFS($wfs_id){
+ $sql = "SELECT wfs_username, wfs_password, wfs_auth_type from wfs WHERE wfs_id = $1 ";
+ $t = array("i");
+ $v = array($wfs_id);
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $auth['username'] = $row["wfs_username"];
+ $auth['password'] = $row["wfs_password"];
+ $auth['auth_type'] = $row["wfs_auth_type"];
+ return $auth;
+ }
+ else{
+ return false;
+ }
+ }
+
+ /*
* get the wms_id info out of wms table when wms_owsproxy is given
*
* @param integer the owsproxy string
@@ -1415,6 +1439,26 @@
else{
return false;
}
+ }
+
+ /*
+ * get the wfs_id info out of wfs table when wfs_owsproxy is given
+ *
+ * @param integer the owsproxy string
+ * @return wfs_id - if not set, return false
+ */
+
+ function getWfsIdFromOwsproxyString($owsproxy){
+ $sql = "SELECT wfs_id from wfs WHERE wfs_owsproxy = $1 ";
+ $t = array("s");
+ $v = array($owsproxy);
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return $row["wfs_id"];
+ }
+ else{
+ return false;
+ }
}
More information about the Mapbender_commits
mailing list