From 414532db25c16585c014025a89b25cd1b5b09ddd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 20 Feb 2018 17:30:29 +0100 Subject: [PATCH] hook extraVersionItem() may return an array or a string --- views/bootstrap/class.ViewDocument.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index f041cc390..c0b8cc56f 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -710,7 +710,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $items = $this->callHook('extraVersionActions', $latestContent); if($items) { foreach($items as $item) { - echo "
  • ".$item."
  • "; + if(is_string($item)) + echo "
  • ".$item."
  • "; + elseif(is_array($item)) + echo "
  • ".(!empty($item['icon']) ? "" : "").getMLText($item['label'])."
  • "; } }