mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
hook addDocumentContentAttribute and addDocumentAttribute may return a string
This commit is contained in:
parent
296e55e481
commit
40dee4b9d2
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user