mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +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) {
|
if($arr) {
|
||||||
$this->formField($arr[0], $arr[1]);
|
$this->formField($arr[0], $arr[1]);
|
||||||
}
|
}
|
||||||
|
} elseif(is_string($arr)) {
|
||||||
|
echo $arr;
|
||||||
} else {
|
} else {
|
||||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, ''));
|
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, ''));
|
||||||
}
|
}
|
||||||
|
@ -342,6 +344,8 @@ $(document).ready(function() {
|
||||||
$arr = $this->callHook('addDocumentContentAttribute', null, $attrdef);
|
$arr = $this->callHook('addDocumentContentAttribute', null, $attrdef);
|
||||||
if(is_array($arr)) {
|
if(is_array($arr)) {
|
||||||
$this->formField($arr[0], $arr[1]);
|
$this->formField($arr[0], $arr[1]);
|
||||||
|
} elseif(is_string($arr)) {
|
||||||
|
echo $arr;
|
||||||
} else {
|
} else {
|
||||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, '', 'attributes_version'));
|
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, '', 'attributes_version'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user