瀏覽代碼

fixed bug in QGIS 3.2 WFS Update - send field name with prefix

Piotr Labudda 7 年之前
父節點
當前提交
a5f66d47ee
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 2 0
      SE/se-lib/Api/WfsQgis.php
  2. 2 1
      SE/se-lib/Core/AclBase.php

+ 2 - 0
SE/se-lib/Api/WfsQgis.php

@@ -38,9 +38,11 @@ class Api_WfsQgis extends ApiRouteBase {// TODO: extends Api_WfsBase which exten
 			try {
 				$this->dataSourceAction($request);
 			} catch (Api_WfsException $e) {
+				DBG::log($e);
 				DBG::logAuth($e);
 				$e->sendResponseXml();
 			} catch (Exception $e) {
+				DBG::log($e);
 				DBG::logAuth($e);
 				$wfsException = new Api_WfsException($e->getMessage(), $e->getCode(), $e);
 				$wfsException->sendResponseXml();

+ 2 - 1
SE/se-lib/Core/AclBase.php

@@ -398,7 +398,8 @@ class Core_AclBase {
       if (empty($tagName['value'])) throw new Exception("Error Processing Update Request - empty field name in Update/Property[{$idx}]");
       if (false !== strpos($tagName['value'], '/')) throw new Exception("Error Processing Update Request - xpath in Update/Property[{$idx}] field name not implemented", 501);
       // TODO: check field name as xpath, eg. File/content
-      $fieldName = $tagName['value'];
+      $fieldName = (($pos = strpos($tagName['value'], ':')) > 0) ? substr($tagName['value'], $pos + 1) : $tagName['value'];
+      DBG::log("DBG \$fieldName='{$fieldName}' ('{$tagName['value']}')");
 
       $tagValue = array_shift($tag['tags']);
       $fieldType = $this->getXsdFieldType($fieldName);