|
|
@@ -49,19 +49,32 @@ class Core_AclBase {
|
|
|
*/
|
|
|
throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501);
|
|
|
}
|
|
|
- public function getFieldLabel($fieldName) {
|
|
|
- foreach ($this->getFields() as $field) {
|
|
|
- if ($fieldName != V::get('name', '', $field)) continue;
|
|
|
- return V::get('label', $fieldName, $field);
|
|
|
- }
|
|
|
- return $fieldName;
|
|
|
+ public function getFieldLabel($fieldName) {
|
|
|
+ // DBG::log($this->getFields(), 'array', "DBG getFieldLabel({$fieldName})");
|
|
|
+ foreach ($this->getFields() as $field) {
|
|
|
+ if (empty($field['name']) && !empty($field['fieldNamespace'])) {
|
|
|
+ if ($fieldName != $field['fieldNamespace']) continue;
|
|
|
+ } else if (!empty($field['name'])) {
|
|
|
+ if ($fieldName != $field['name']) continue;
|
|
|
+ } else {
|
|
|
+ continue; // skip unknown field name
|
|
|
+ }
|
|
|
+ return V::get('label', $fieldName, $field);
|
|
|
+ }
|
|
|
+ return $fieldName;
|
|
|
}
|
|
|
- public function getFieldOpis($fieldName) {
|
|
|
- foreach ($this->getFields() as $field) {
|
|
|
- if ($fieldName != V::get('name', '', $field)) continue;
|
|
|
- return V::get('opis', $fieldName, $field);
|
|
|
- }
|
|
|
- return $fieldName;
|
|
|
+ public function getFieldOpis($fieldName) {
|
|
|
+ foreach ($this->getFields() as $field) {
|
|
|
+ if (empty($field['name']) && !empty($field['fieldNamespace'])) {
|
|
|
+ if ($fieldName != $field['fieldNamespace']) continue;
|
|
|
+ } else if (!empty($field['name'])) {
|
|
|
+ if ($fieldName != $field['name']) continue;
|
|
|
+ } else {
|
|
|
+ continue; // skip unknown field name
|
|
|
+ }
|
|
|
+ return V::get('opis', $fieldName, $field);
|
|
|
+ }
|
|
|
+ return $fieldName;
|
|
|
}
|
|
|
public function getFieldListByIdZasob() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: RMME - one field list function
|
|
|
public function getLocalFieldList() { throw new HttpException("Acl function " . __FUNCTION__ . " Not implemented", 501); }// TODO: RMME - one field list function
|