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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jan 19 04:11:25 PST 2016


Author: armin11
Date: 2016-01-19 04:11:24 -0800 (Tue, 19 Jan 2016)
New Revision: 9378

Modified:
   trunk/mapbender/http/classes/class_wfsToDb.php
Log:
Automatically set wfs_owsproxy when registrating authenticated wfs

Modified: trunk/mapbender/http/classes/class_wfsToDb.php
===================================================================
--- trunk/mapbender/http/classes/class_wfsToDb.php	2016-01-19 11:48:14 UTC (rev 9377)
+++ trunk/mapbender/http/classes/class_wfsToDb.php	2016-01-19 12:11:24 UTC (rev 9378)
@@ -58,13 +58,18 @@
 		$sql .= "city , deliverypoint , administrativearea , ";
 		$sql .= "postalcode , voice , facsimile , ";
 		$sql .= "electronicmailaddress , country , ";
- 		$sql .= "wfs_owner, wfs_timestamp, wfs_timestamp_create, uuid, wfs_username, wfs_password, wfs_auth_type) ";
-		$sql .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14 ,$15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30)";
+ 		$sql .= "wfs_owner, wfs_timestamp, wfs_timestamp_create, uuid, wfs_username, wfs_password, wfs_auth_type, wfs_owsproxy) ";
+		$sql .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14 ,$15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31)";
 		if (!($aWfs->auth)) {
 			$aWfs->auth['username'] = "";
 			$aWfs->auth['password'] = "";
 			$aWfs->auth['auth_type'] = "";
+			$wfs_owsproxy = '';
 		}
+		if ($aWfs->auth['username'] != '' && $aWfs->auth['password'] != '' && $aWfs->auth['auth_type'] != '') {
+			//set initial wfs_owsproxy hash
+			$wfs_owsproxy = md5(microtime(1));
+		}
 		$v = array(
 			$aWfs->getVersion(), 
 			$aWfs->name, 
@@ -95,10 +100,11 @@
 			$uuid,
 			$aWfs->auth['username'],
 			$aWfs->auth['password'],
-			$aWfs->auth['auth_type']
+			$aWfs->auth['auth_type'],
+			$wfs_owsproxy
 		);
 			
-		$t = array('s', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 'i', 'i','i','s','s','s','s');
+		$t = array('s', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 'i', 'i','i','s','s','s','s','s');
 	
 		$res = db_prep_query($sql, $v, $t);
 	



More information about the Mapbender_commits mailing list