Explorar o código

fixed ant acl get sql field name

Piotr Labudda %!s(int64=8) %!d(string=hai) anos
pai
achega
99c9c20b62
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      SE/se-lib/AntAclBase.php

+ 5 - 0
SE/se-lib/AntAclBase.php

@@ -529,6 +529,11 @@ class AntAclBase extends Core_AclBase {
 	}
 
 	public function getSqlPrimaryKeyField() { return $this->_primaryKey; }
+	public function getSqlFieldName($fieldName) {
+		$field = $this->_getField($fieldName);
+		if ($field['isLocal']) return $field['fieldNamespace'];
+		return $fieldName; // TODO: throw new Exception("Field is not local");
+	}
 
 	public function getTotal($params = []) {
 		DBG::log($params, 'array', "AntAclBase::getTotal params");