diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 8c75a5548..18151ec36 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -418,11 +418,12 @@ console.log(params); ); } if($arr = $this->callHook('addDocumentContentFile')) { - if(is_array($arr)) { - $this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null); - } elseif(is_string($arr)) { - echo $arr; - } + foreach($arr as $ar) + if(is_array($ar)) { + $this->formField($ar[0], $ar[1], isset($ar[2]) ? $ar[2] : null); + } elseif(is_string($ar)) { + echo $ar; + } } if(!$nodocumentformfields || !in_array('version_comment', $nodocumentformfields)) { $this->formField( diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 571238432..44d136096 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -243,7 +243,7 @@ console.log(element); if($arr = $this->callHook('addDocumentContentFile')) { foreach($arr as $ar) if(is_array($ar)) { - $this->formField($ar[0], $ar[1], isset($ar[2]) ? $ar[2] : null); + $this->formField($ar[0], $ar[1], isset($ar[2]) ? $ar[2] : null); } elseif(is_string($ar)) { echo $ar; }