[Mapbender-commits] r9749 - in trunk/mapbender: http/classes http_auth/http owsproxy/http owsproxy/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jun 26 04:39:02 PDT 2017
Author: armin11
Date: 2017-06-26 04:39:02 -0700 (Mon, 26 Jun 2017)
New Revision: 9749
Modified:
trunk/mapbender/http/classes/class_owsPostQueryParser.php
trunk/mapbender/http/classes/class_user.php
trunk/mapbender/http_auth/http/index.php
trunk/mapbender/owsproxy/http/classes/class_QueryHandler.php
trunk/mapbender/owsproxy/http/index.php
Log:
Fix for owsproxy with wfs 2.0+ and possibility to get anonymous access to proxied wfs if authorization for public user is given.
Modified: trunk/mapbender/http/classes/class_owsPostQueryParser.php
===================================================================
--- trunk/mapbender/http/classes/class_owsPostQueryParser.php 2017-05-24 12:11:45 UTC (rev 9748)
+++ trunk/mapbender/http/classes/class_owsPostQueryParser.php 2017-06-26 11:39:02 UTC (rev 9749)
@@ -84,6 +84,8 @@
$this->serviceType = "WMS";
break;
}
+ //$e = new mb_exception("class_owsPostQueryHandler.php: ".$this->serviceRequestType);
+ $this->serviceVersion = $queryDomObject->documentElement->getAttribute("version");
if ($this->serviceType == "WFS") {
//read out typename from wfs query as attribute
//register namespace
@@ -97,11 +99,19 @@
//array of requests that need typenames
$typenameRequired = array('getfeature','describefeaturetype');
if (in_array(strtolower($this->serviceRequestType), $typenameRequired)) {
- $this->serviceResourceName = $queryNodeList->item(0)->getAttribute('typeName');
+ switch ($this->serviceVersion) {
+ case "2.0.0":
+ $this->serviceResourceName = $queryNodeList->item(0)->getAttribute('typeNames');
+ break;
+ case "2.0.2":
+ $this->serviceResourceName = $queryNodeList->item(0)->getAttribute('typeNames');
+ break;
+ default:
+ $this->serviceResourceName = $queryNodeList->item(0)->getAttribute('typeName');
+ break;
+ }
}
}
- //$e = new mb_exception("class_owsPostQueryHandler.php: ".$this->serviceRequestType);
- $this->serviceVersion = $queryDomObject->documentElement->getAttribute("version");
//check for getfeature request with given storedquery_id
if ($this->serviceType == "WFS" && ($this->serviceVersion == "2.0.2" || $this->serviceVersion == "2.0.0") && strtolower($this->serviceRequestType) == 'getfeature') {
if ($hasNamespace) {
@@ -115,9 +125,7 @@
$this->serviceStoredQueryId = $storedQueryNodeList->item(0)->getAttribute('id');
}
//validate extracted parameters
- }
-
+ }
}
-
}
?>
Modified: trunk/mapbender/http/classes/class_user.php
===================================================================
--- trunk/mapbender/http/classes/class_user.php 2017-05-24 12:11:45 UTC (rev 9748)
+++ trunk/mapbender/http/classes/class_user.php 2017-06-26 11:39:02 UTC (rev 9749)
@@ -613,7 +613,75 @@
}
return $wfsConfIdArray;
}
-
+ /** check if feature typenames of a WFS requests are accessible - that means, that
+ * a wfs_conf for each featuretype exists and the user has access to a gui in which this wfs_conf
+ * is integrated
+ * @params String typenames [csv], Integer wfsId
+ * @return boolean
+ * TODO!!!!!!
+ */
+ public function areFeaturetypesAccessible ($typenames, $wfsId) {
+ $array_guis = $this->getApplicationsByPermission();
+ if (count($array_guis) == 0) {
+ return false;
+ }
+ $v = array();
+ $t = array();
+ //Example sql: select featuretype_id from wfs_featuretype where fkey_wfs_id in (340, 341, 342) and featuretype_name in ('AXE_ROUTE','AX_Flurstueck') and featuretype_id in (select fkey_featuretype_id from wfs_conf where wfs_conf_id in (select fkey_wfs_conf_id from gui_wfs_conf where gui_id in ('testgui')));
+ $sql = "SELECT featuretype_id FROM wfs_featuretype WHERE fkey_wfs_id = $1 ";
+ $v[0] = $wfsId;
+ $t[0] = 'i';
+ $sql .= "AND featuretype_name IN (";
+ $c = 2;
+ $featuretypeArray = explode(",", $typenames);
+ $numberOfFeaturetypes = count($featuretypeArray);
+ //test for string or array?
+ for ($i = 0; $i < $numberOfFeaturetypes; $i++) {
+ if ($i > 0) {
+ $sql .= ",";
+ }
+ $sql .= "$".$c;
+ $c++;
+ array_push($v, $featuretypeArray[$i]);
+ array_push($t, 's');
+ }
+ $sql .= ") AND featuretype_id IN (SELECT fkey_featuretype_id FROM wfs_conf WHERE wfs_conf_id IN (SELECT fkey_wfs_conf_id FROM gui_wfs_conf WHERE fkey_gui_id IN (";
+ for ($i = 0; $i < count($array_guis); $i++) {
+ if ($i > 0) {
+ $sql .= ",";
+ }
+ $sql .= "$".$c;
+ $c++;
+ array_push($v, $array_guis[$i]);
+ array_push($t, 's');
+ }
+ $sql .= ")))";
+ //for debug purposes:
+ //$e = new mb_exception($sql);
+ /*foreach ($v as $variable) {
+ $e = new mb_exception($variable);
+ }
+ foreach ($t as $type) {
+ $e = new mb_exception($type);
+ }*/
+ //$e = new mb_exception($sql);
+ $res = db_prep_query($sql,$v,$t);
+ //check if number of results is equal to number of requested typenames
+ $row = db_fetch_all($res);
+ if (count($row) == 1 && $row[0]['featuretype_id'] == null) {
+ //
+ new mb_exception("http_auth/index.php: Some featuretype is null - no anonymous access possible!");
+ return false;
+ }
+ //$e = new mb_exception("featuretype_id[0]: '".$row[0]['featuretype_id']."' - ".count($row));
+ if (count($row) !== $numberOfFeaturetypes) {
+ new mb_exception("http_auth/index.php: Number of requested featuretypes are not equal to found wfs_confs!");
+ return false;
+ } else {
+ return true;
+ }
+ }
+
/** identifies the IDs of WFS confs where the user is owner
*
* @param Array appIdArray [optional] restrict to certain applications
Modified: trunk/mapbender/http_auth/http/index.php
===================================================================
--- trunk/mapbender/http_auth/http/index.php 2017-05-24 12:11:45 UTC (rev 9748)
+++ trunk/mapbender/http_auth/http/index.php 2017-06-26 11:39:02 UTC (rev 9749)
@@ -21,7 +21,9 @@
require(dirname(__FILE__) . "/../../http/classes/class_administration.php");
require(dirname(__FILE__) . "/../../http/classes/class_connector.php");
require_once(dirname(__FILE__) . "/../../http/classes/class_mb_exception.php");
+require_once(dirname(__FILE__) . "/../../http/classes/class_user.php");
require(dirname(__FILE__) . "/../../owsproxy/http/classes/class_QueryHandler.php");
+
$urlsToExclude = array();
$postData = false;
if (is_file(dirname(__FILE__) . "/../../conf/excludeproxyurls.conf"))
@@ -37,73 +39,167 @@
$width = 400;
$height = 400;
/* * *** conf **** */
+//check request params for checking anonymous authorization#########################################
+//TODO!!!!!!
+$layerId = false;
+$wfsId = false;
+//$typenames = false;
-//special for type of authentication ******************************
-//control if digest auth is set, if not set, generate the challenge with getNonce()
-if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
- header('HTTP/1.1 401 Unauthorized');
- header('WWW-Authenticate: Digest realm="' . REALM .
- '",qop="auth",nonce="' . getNonce() . '",opaque="' . md5(REALM) . '"');
- die('Text to send if user hits Cancel button');
+//test for existing post data
+$postData = file_get_contents("php://input");
+if (isset($postData) && $postData !== '') {
+
+} else {
+ $postData = false;
}
-//read out the header in an array
-$requestHeaderArray = http_digest_parse($_SERVER['PHP_AUTH_DIGEST']);
-
-//error if header could not be read
-if (!($requestHeaderArray)) {
- echo 'Following Header information cannot be validated - check your clientsoftware!<br>';
- echo $_SERVER['PHP_AUTH_DIGEST'] . '<br>';
- die();
+if (isset($_REQUEST["layer_id"]) & $_REQUEST["layer_id"] != "") {
+ //validate integer
+ $testMatch = $_REQUEST["layer_id"];
+ //give max 99 entries - more will be to slow
+ $pattern = '/^[0-9]*$/';
+ if (!preg_match($pattern,$testMatch)){
+ //echo 'userId: <b>'.$testMatch.'</b> is not valid.<br/>';
+ echo 'Parameter <b>layer_id</b> is not valid (integer).<br/>';
+ die();
+ }
+ $layerId = $testMatch;
+ $testMatch = NULL;
}
+if (isset($_REQUEST["wfs_id"]) & $_REQUEST["wfs_id"] != "") {
+ //validate integer
+ $testMatch = $_REQUEST["wfs_id"];
+ //give max 99 entries - more will be to slow
+ $pattern = '/^[0-9]*$/';
+ if (!preg_match($pattern,$testMatch)){
+ //echo 'userId: <b>'.$testMatch.'</b> is not valid.<br/>';
+ echo 'Parameter <b>wfs_id</b> is not valid (integer).<br/>';
+ die();
+ }
+ $wfsId = $testMatch;
+ $testMatch = NULL;
+}
-//get mb_username and email out of http_auth username string
-$userIdentification = explode(';', $requestHeaderArray['username']);
-$mbUsername = $userIdentification[0];
-$mbEmail = $userIdentification[1]; //not given in all circumstances
+//parse query
+$query = new QueryHandler($postData);
-$userInformation = getUserInfo($mbUsername, $mbEmail);
+// an array with keys and values toLoserCase -> caseinsensitiv
+$reqParams = $query->getRequestParams();
+//$e = new mb_exception($reqParams['version']);
-if ($userInformation[0] == '-1') {
- die('User with name: ' . $mbUsername . ' and email: ' . $mbEmail . ' not known to security proxy!');
+if ($wfsId !== false) {
+ //switch for different parameter name - typename for wfs < 2.0 typenames for wfs >= 2.0
+ $typeNameParameter = "typename"; //lowercase
+ switch ($reqParams['version']) {
+ case "2.0.0":
+ $typeNameParameter = "typenames";
+ break;
+ case "2.0.2":
+ $typeNameParameter = "typenames";
+ break;
+ default:
+ $typeNameParameter = "typename";
+ break;
+ }
+ //initialize typename parameter with false - not given
+ //check for featuretype name
+ if (isset($reqParams[$typeNameParameter]) & $reqParams[$typeNameParameter] != "") {
+ //validate integer
+ $testMatch = $reqParams[$typeNameParameter];
+ //simple pattern - without blanks!
+ $pattern = '/^[0-9a-zA-Z\.\-_:,]*$/';
+ if (!preg_match($pattern,$testMatch)){
+ //echo 'userId: <b>'.$testMatch.'</b> is not valid.<br/>';
+ echo 'Parameter <b>'.$typeNameParameter.'</b> is not valid.<br/>';
+ die();
+ }
+ $reqParams[$typeNameParameter] = $testMatch;
+ $testMatch = NULL;
+ }
}
-
-if ($userInformation[1] == '') { //check if digest exists in db - if no digest exists it should be a null string!
- die('User with name: ' . $mbUsername . ' and email: ' . $mbEmail . ' has no digest - please set a new password and try again!');
+//check authorization
+$anonymousAccess = false;
+if ($layerId !== false) {
+ $user = new user(PUBLIC_USER);
+ $anonymousAccess = $user->isLayerAccessible($layerId);
}
+//$e = new mb_exception("http_auth/index.php: ".$typeNameParameter.": ".(string)$reqParams[$typeNameParameter]);
+if ($wfsId !== false) {
+ if ($reqParams[$typeNameParameter] !== false) {
+ $user = new user(PUBLIC_USER);
+ $anonymousAccess = $user->areFeaturetypesAccessible($reqParams[$typeNameParameter], $wfsId);
+ }
+}
-//first check the stale!
-if ($requestHeaderArray['nonce'] == getNonce()) {
- // Up-to-date nonce received
- $stale = false;
+//$e = new mb_exception("http_auth/index.php: anonymousAcces possible: ".(string)$anonymousAccess);
+//first check if anonymous user has rights to access ressource - if so - don't use authentication
+if ($anonymousAccess == true) {
+ $userId = PUBLIC_USER;
} else {
- // Stale nonce received (probably more than x seconds old)
- $stale = true;
- //give another chance to authenticate
- header('HTTP/1.1 401 Unauthorized');
- header('WWW-Authenticate: Digest realm="' . REALM . '",qop="auth",nonce="' . getNonce() . '",opaque="' . md5(REALM) . '" ,stale=true');
-}
-// generate the valid response to check the request of the client
-$A1 = $userInformation[1];
-$A2 = md5($_SERVER['REQUEST_METHOD'] . ':' . $requestHeaderArray['uri']);
-$valid_response = $A1 . ':' . getNonce() . ':' . $requestHeaderArray['nc'];
-$valid_response .= ':' . $requestHeaderArray['cnonce'] . ':' . $requestHeaderArray['qop'] . ':' . $A2;
-$valid_response = md5($valid_response);
+ //special for type of authentication ******************************
+ //control if digest auth is set, if not set, generate the challenge with getNonce()
+ if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
+ header('HTTP/1.1 401 Unauthorized');
+ header('WWW-Authenticate: Digest realm="' . REALM .
+ '",qop="auth",nonce="' . getNonce() . '",opaque="' . md5(REALM) . '"');
+ die('Text to send if user hits Cancel button');
+ }
-if ($requestHeaderArray['response'] != $valid_response) {//the user have to authenticate new - cause something in the authentication went wrong
- die('Authentication failed - sorry, you have to authenticate once more!');
-}
-//if we are here - authentication has been done well!
-//let's do the proxy things (came from owsproxy.php):
-//special for type of authentication ******************************
+ //read out the header in an array
+ $requestHeaderArray = http_digest_parse($_SERVER['PHP_AUTH_DIGEST']);
-//test for existing post data
-$postData = file_get_contents("php://input");
-if (isset($postData) && $postData !== '') {
-
-} else {
- $postData = false;
+ //error if header could not be read
+ if (!($requestHeaderArray)) {
+ echo 'Following Header information cannot be validated - check your clientsoftware!<br>';
+ echo $_SERVER['PHP_AUTH_DIGEST'] . '<br>';
+ die();
+ }
+
+ //get mb_username and email out of http_auth username string
+ $userIdentification = explode(';', $requestHeaderArray['username']);
+ $mbUsername = $userIdentification[0];
+ $mbEmail = $userIdentification[1]; //not given in all circumstances
+
+ $userInformation = getUserInfo($mbUsername, $mbEmail);
+
+ if ($userInformation[0] == '-1') {
+ die('User with name: ' . $mbUsername . ' and email: ' . $mbEmail . ' not known to security proxy!');
+ }
+
+ if ($userInformation[1] == '') { //check if digest exists in db - if no digest exists it should be a null string!
+ die('User with name: ' . $mbUsername . ' and email: ' . $mbEmail . ' has no digest - please set a new password and try again!');
+ }
+
+ //first check the stale!
+ if ($requestHeaderArray['nonce'] == getNonce()) {
+ // Up-to-date nonce received
+ $stale = false;
+ } else {
+ // Stale nonce received (probably more than x seconds old)
+ $stale = true;
+ //give another chance to authenticate
+ header('HTTP/1.1 401 Unauthorized');
+ header('WWW-Authenticate: Digest realm="' . REALM . '",qop="auth",nonce="' . getNonce() . '",opaque="' . md5(REALM) . '" ,stale=true');
+ }
+ // generate the valid response to check the request of the client
+ $A1 = $userInformation[1];
+ $A2 = md5($_SERVER['REQUEST_METHOD'] . ':' . $requestHeaderArray['uri']);
+ $valid_response = $A1 . ':' . getNonce() . ':' . $requestHeaderArray['nc'];
+ $valid_response .= ':' . $requestHeaderArray['cnonce'] . ':' . $requestHeaderArray['qop'] . ':' . $A2;
+
+ $valid_response = md5($valid_response);
+
+ if ($requestHeaderArray['response'] != $valid_response) {//the user have to authenticate new - cause something in the authentication went wrong
+ die('Authentication failed - sorry, you have to authenticate once more!');
+ }
+ //if we are here - authentication has been done well!
+ //let's do the proxy things (came from owsproxy.php):
+ //special for type of authentication ******************************
+
+ //user information
+ //define $userId from database information
+ $userId = $userInformation[0];
}
$layerId = $_REQUEST['layer_id'];
@@ -114,10 +210,10 @@
$withChilds = true;
}
-$query = new QueryHandler($postData);
+/*$query = new QueryHandler($postData);
// an array with keys and values toLoserCase -> caseinsensitiv
-$reqParams = $query->getRequestParams();
+$reqParams = $query->getRequestParams();*/
$n = new administration();
if (!(isset($reqParams['service'])) AND strtolower($reqParams['request'])=='getmap') {
@@ -146,7 +242,7 @@
}
//define $userId from database information
-$userId = $userInformation[0];
+//$userId = $userInformation[0];
/* ************ main workflow *********** */
@@ -266,7 +362,8 @@
$storedQueryId = $reqParams['storedquery_id'];
$arrayOnlineresources = checkWfsStoredQueryPermission($owsproxyString, $storedQueryId, $userId);
} else {
- $arrayFeatures = array($reqParams['typename']);
+ $arrayFeatures = array($reqParams[$typeNameParameter]);
+ $e = new mb_exception("".$typeNameParameter.": ".$reqParams[$typeNameParameter]);
$arrayOnlineresources = checkWfsPermission($owsproxyString, $arrayFeatures, $userId);
}
$query->setOnlineResource($arrayOnlineresources['wfs_getfeature']);
@@ -281,7 +378,7 @@
$price, 0, $reqParams['storedquery_id']);
} else {
$log_id = $n->logWfsProxyRequest($arrayOnlineresources['wfs_id'], $userId, $request,
- $price, 0, $reqParams['typename']);
+ $price, 0, $reqParams[$typeNameParameter]);
}
} else {
$log_id = false;
@@ -299,7 +396,7 @@
}
break;
case 'describefeaturetype':
- $arrayFeatures = array($reqParams['typename']);
+ $arrayFeatures = array($reqParams[$typeNameParameter]);
$arrayOnlineresources = checkWfsPermission($owsproxyString, $arrayFeatures, $userId);
$query->setOnlineResource($arrayOnlineresources['wfs_describefeaturetype']);
$request = $query->getRequest();
@@ -661,6 +758,7 @@
if (strtoupper($element['tag']) == "WFS:INSERT" && $element['type'] == "close") {
$insert = false;
}
+ //updated features - TODO - fix for wfs 2.0+ - typenames instead of typename!
//updated features
if (strtoupper($element['tag']) == "WFS:UPDATE" && $element['type'] == "open") {
array_push($features, $element['attributes']["typeName"]);
Modified: trunk/mapbender/owsproxy/http/classes/class_QueryHandler.php
===================================================================
--- trunk/mapbender/owsproxy/http/classes/class_QueryHandler.php 2017-05-24 12:11:45 UTC (rev 9748)
+++ trunk/mapbender/owsproxy/http/classes/class_QueryHandler.php 2017-06-26 11:39:02 UTC (rev 9749)
@@ -29,11 +29,13 @@
private $owsproxyServiceId;
private $onlineResource;
private $hasPost = false;
+ private $serviceResourceName;
/**
* Constructor of the QueryHandler
*
*/
function __construct($postData){
+ //${$this->typeNameParameter};
$this->setRequestParams(array_keys($_REQUEST));
if ($postData !== false) {
//parse post request for service / request / version parameters
@@ -55,8 +57,23 @@
$this->reqParamsToLower['request'] = $postQueryParser->serviceRequestType;
}
if (isset($postQueryParser->serviceResourceName) && $postQueryParser->serviceResourceName !== '') {
- $this->reqParams['typename'] = $postQueryParser->serviceResourceName;
- $this->reqParamsToLower['typename'] = $postQueryParser->serviceResourceName;
+ if ($this->reqParams['service'] == 'WFS') {
+ switch ($this->reqParams['version']) {
+ case "2.0.0":
+ $this->reqParams['typenames'] = $postQueryParser->serviceResourceName;
+ $this->reqParamsToLower['typenames'] = $postQueryParser->serviceResourceName;
+
+ break;
+ case "2.0.2":
+ $this->reqParams['typenames'] = $postQueryParser->serviceResourceName;
+ $this->reqParamsToLower['typenames'] = $postQueryParser->serviceResourceName;
+ break;
+ default:
+ $this->reqParams['typename'] = $postQueryParser->serviceResourceName;
+ $this->reqParamsToLower['typename'] = $postQueryParser->serviceResourceName;
+ break;
+ }
+ }
}
if (isset($postQueryParser->serviceStoredQueryId) && $postQueryParser->serviceStoredQueryId !== '') {
$this->reqParams['storedquery_id'] = $postQueryParser->serviceStoredQueryId;
Modified: trunk/mapbender/owsproxy/http/index.php
===================================================================
--- trunk/mapbender/owsproxy/http/index.php 2017-05-24 12:11:45 UTC (rev 9748)
+++ trunk/mapbender/owsproxy/http/index.php 2017-06-26 11:39:02 UTC (rev 9749)
@@ -57,6 +57,37 @@
// an array with keys and values toLowerCase -> caseinsensitiv
$reqParams = $query->getRequestParams();
+if ($reqParams['service'] == 'WFS') {
+ //switch for different parameter name - typename for wfs < 2.0 typenames for wfs >= 2.0
+ //$typeNameParameter = "typename"; //lowercase
+ switch ($reqParams['version']) {
+ case "2.0.0":
+ $typeNameParameter = "typenames";
+ break;
+ case "2.0.2":
+ $typeNameParameter = "typenames";
+ break;
+ default:
+ $typeNameParameter = "typename";
+ break;
+ }
+ //initialize typename parameter with false - not given
+ //check for featuretype name
+ if (isset($reqParams[$typeNameParameter]) & $reqParams[$typeNameParameter] != "") {
+ //validate featuretype_name
+ $testMatch = $reqParams[$typeNameParameter];
+ //simple pattern - without blanks!
+ $pattern = '/^[0-9a-zA-Z\.\-_:,]*$/';
+ if (!preg_match($pattern,$testMatch)){
+ //echo 'userId: <b>'.$testMatch.'</b> is not valid.<br/>';
+ echo 'Parameter <b>'.$typeNameParameter.'</b> is not valid.<br/>';
+ die();
+ }
+ $reqParams[$typeNameParameter] = $testMatch;
+ $testMatch = NULL;
+ }
+}
+
$e = new mb_notice("incoming request: " . OWSPROXY . "/" . $_REQUEST['sid'] . "/" . $_REQUEST['wms'] . $query->getRequest());
$e = new mb_notice("owsproxy requested from: " . $_SERVER["REMOTE_ADDR"]);
$e = new mb_notice("owsproxy requested: " . $query->getRequest());
@@ -354,7 +385,7 @@
$storedQueryId = $reqParams['storedquery_id'];
$arrayOnlineresources = checkWfsStoredQueryPermission($owsproxyString, $storedQueryId, $userId);
} else {
- $arrayFeatures = array($reqParams['typename']);
+ $arrayFeatures = array($reqParams[$typeNameParameter]);
$arrayOnlineresources = checkWfsPermission($owsproxyString, $arrayFeatures, $userId);
}
$query->setOnlineResource($arrayOnlineresources['wfs_getfeature']);
@@ -369,7 +400,7 @@
$price, 0, $reqParams['storedquery_id']);
} else {
$log_id = $n->logWfsProxyRequest($arrayOnlineresources['wfs_id'], $userId, $request,
- $price, 0, $reqParams['typename']);
+ $price, 0, $reqParams[$typeNameParameter]);
}
} else {
$log_id = false;
@@ -385,7 +416,7 @@
}
break;
case 'describefeaturetype':
- $arrayFeatures = array($reqParams['typename']);
+ $arrayFeatures = array($reqParams[$typeNameParameter]);
$arrayOnlineresources = checkWfsPermission($query->getOwsproxyServiceId(), $arrayFeatures, $userId);
$query->setOnlineResource($arrayOnlineresources['wfs_describefeaturetype']);
$request = $query->getRequest();
@@ -704,12 +735,13 @@
if (strtoupper($element['tag']) == "WFS:INSERT" && $element['type'] == "close") {
$insert = false;
}
- //updated features
+ //updated features - TODO - fix for wfs 2.0+ - typenames instead of typename!
if (strtoupper($element['tag']) == "WFS:UPDATE" && $element['type'] == "open") {
array_push($features, $element['attributes']["typeName"]);
}
//deleted features
if (strtoupper($element['tag']) == "WFS:DELETE" && $element['type'] == "open") {
+
array_push($features, $element['attributes']["typeName"]);
}
}
More information about the Mapbender_commits
mailing list