hook addDocumentContentAttribute and addDocumentAttribute may return a string

This commit is contained in:
Uwe Steinmann 2019-10-23 09:05:04 +02:00
parent 296e55e481
commit 40dee4b9d2

View File

@ -285,6 +285,8 @@ $(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, ''));
}
@ -342,6 +344,8 @@ $(document).ready(function() {
$arr = $this->callHook('addDocumentContentAttribute', null, $attrdef);
if(is_array($arr)) {
$this->formField($arr[0], $arr[1]);
} elseif(is_string($arr)) {
echo $arr;
} else {
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, '', 'attributes_version'));
}