浏览代码

fixed copy rekord for empty the_geom

Piotr Labudda 10 年之前
父节点
当前提交
184e6f2abe
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      SE/se-lib/TableAcl.php

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

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