fix parameter for addDocumentAttributes, editDocumentAttributes may return a string

This commit is contained in:
Uwe Steinmann 2019-10-19 08:19:51 +02:00
parent 070af52849
commit 0208d54409

View File

@ -162,16 +162,20 @@ $(document).ready( function() {
if($arr) {
$this->formField($arr[0], $arr[1]);
}
} elseif(is_string($arr) {
echo $arr;
} else {
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef)));
}
}
}
$arrs = $this->callHook('addDocumentAttributes', $folder);
$arrs = $this->callHook('addDocumentAttributes', $document);
if(is_array($arrs)) {
foreach($arrs as $arr) {
$this->formField($arr[0], $arr[1]);
}
} elseif(is_string($arr) {
echo $arr;
}
$this->formSubmit("<i class=\"icon-save\"></i> ".getMLText('save'));
?>