Преглед изворни кода

fixed TableAcl getXsdTypes

Piotr Labudda пре 8 година
родитељ
комит
f61a62e10e
1 измењених фајлова са 6 додато и 4 уклоњено
  1. 6 4
      SE/se-lib/TableAcl.php

+ 6 - 4
SE/se-lib/TableAcl.php

@@ -2014,10 +2014,12 @@ class TableAcl extends Core_AclBase {
 	}
 
 	public function getXsdTypes() { // @returns [ fieldName => xsdType, ... ]
-		$thisGetXsdType = [ $this, 'getXsdFieldType' ];
-		return array_map(function ($field) use ($thisGetXsdType) {
-			return $thisGetXsdType( $field['name'] );
-		}, $this->getFields());
+		$xsdTypes = [];
+		foreach ($this->getFields() as $field) {
+			$fieldName = $field['name'];
+			$xsdTypes[ $fieldName ] = $this->getXsdFieldType( $fieldName );
+		}
+		return $xsdTypes;
 	}
 	public function getFieldsWithXsdTypes() {
 		$xsdTypes = [];