Jelajahi Sumber

fixed copy rekord for empty the_geom

Piotr Labudda 10 tahun lalu
induk
melakukan
184e6f2abe
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      SE/se-lib/TableAcl.php

+ 3 - 1
SE/se-lib/TableAcl.php

@@ -1104,6 +1104,7 @@ class TableAcl {
 		}
 		}
 		if (empty($itemTodo)) {
 		if (empty($itemTodo)) {
 			//throw new Exception('Item patch is empty');
 			//throw new Exception('Item patch is empty');
+			DBG::_('DBG_DS', '>2', "Item patch is empty", null, __CLASS__, __FUNCTION__, __LINE__);
 			return 0;// nothing to insert
 			return 0;// nothing to insert
 		}
 		}
 		$ds = $this->getDataSource();
 		$ds = $this->getDataSource();
@@ -1146,6 +1147,7 @@ class TableAcl {
 			}
 			}
 		}
 		}
 
 
+		DBG::_('DBG_DS', '>2', "return addItem", $item, __CLASS__, __FUNCTION__, __LINE__);
 		return $ds->addItem($item);
 		return $ds->addItem($item);
 	}
 	}
 
 
@@ -1231,7 +1233,7 @@ class TableAcl {
 			if (in_array($kName, $uniqKeys)) {
 			if (in_array($kName, $uniqKeys)) {
 				$value .= '?';
 				$value .= '?';
 			}
 			}
-			if ($ds->isGeomField($kName)) {
+			if ($ds->isGeomField($kName) && !empty($value)) {
 				$value = "GeomFromText('{$value}')";
 				$value = "GeomFromText('{$value}')";
 			}
 			}
 			$itemCopy->{$kName} = $value;
 			$itemCopy->{$kName} = $value;