فهرست منبع

fixed wfs GetFeature bug if missing propertyName

Piotr Labudda 8 سال پیش
والد
کامیت
dea7c6ce5f
1فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 7 4
      SE/se-lib/Api/Wfs/GetFeature.php

+ 7 - 4
SE/se-lib/Api/Wfs/GetFeature.php

@@ -166,10 +166,13 @@ class Api_Wfs_GetFeature {
 
 
 		DBG::log($fldList, 'array', ">>> loop start fields(".count($fldList).")");
 		DBG::log($fldList, 'array', ">>> loop start fields(".count($fldList).")");
 		// DBG::log($showFields, 'array', "DBG: \$showLocalFields \$showFields 0");
 		// DBG::log($showFields, 'array', "DBG: \$showLocalFields \$showFields 0");
-		$showLocalFields = array_filter($showFields, function ($showFieldName) {
-			return (false === strpos($showFieldName, "/"));
-		});
-		// DBG::log($showLocalFields, 'array', "DBG: \$showLocalFields");
+		$showLocalFields = array_filter(
+			($showFields) ? $showFields : $fldList, // if empty filter cols show all local fields
+			function ($showFieldName) {
+				return (false === strpos($showFieldName, "/"));
+			}
+		);
+		DBG::log($showLocalFields, 'array', "DBG: \$showLocalFields");
 		$fldList = array_filter($fldList, function ($fieldName) use ($showLocalFields) {
 		$fldList = array_filter($fldList, function ($fieldName) use ($showLocalFields) {
 			return (in_array($fieldName, $showLocalFields));
 			return (in_array($fieldName, $showLocalFields));
 		});
 		});