Переглянути джерело

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);