From 0488b066d51eaa6f672902afa88bc93b397def2b Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sat, 27 Jun 2020 22:11:27 +0200 Subject: [PATCH] baculum: Fix configure Bacula hosts page to work with PHP 7.4 --- .../protected/Web/Portlets/BaculaConfigComponents.php | 4 ++++ .../protected/Web/Portlets/BaculaConfigComponents.tpl | 2 +- .../protected/Web/Portlets/BaculaConfigResources.php | 4 ++++ .../protected/Web/Portlets/BaculaConfigResources.tpl | 6 +++--- gui/baculum/protected/Web/Portlets/BaculaHosts.tpl | 4 ++-- gui/baculum/protected/Web/Portlets/DirectiveMessages.php | 4 ++++ gui/baculum/protected/Web/Portlets/DirectiveMessages.tpl | 2 +- gui/baculum/protected/Web/Portlets/MessageTypes.php | 4 ++++ 8 files changed, 23 insertions(+), 7 deletions(-) diff --git a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php index b622cfcc6..05ba7a9a2 100644 --- a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php +++ b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php @@ -72,6 +72,10 @@ class BaculaConfigComponents extends ComponentListTemplate { } public function createComponentListElement($sender, $param) { + if (!is_array($param->Item->Data)) { + // skip parent repeater items + return; + } $conts = array(self::MENU_CONTROL, self::ACTIONS_CONTROL); for ($i = 0; $i < count($conts); $i++) { $controls = array(self::CHILD_CONTROL, $conts[$i]); diff --git a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl index 2bf3db738..18ea121f6 100644 --- a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl +++ b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl @@ -12,7 +12,7 @@ ClientSide.OnLoading="BaculaConfig.loader_start(sender.options.ID);" ClientSide.OnComplete="BaculaConfig.set_config_items(sender.options.ID);" Attributes.onclick="return BaculaConfig.unset_config_items(this.id);" - Text="<%=$this->Data['label']%>: <%=$this->Data['component_name']%>" + Text="<%#$this->Data['label']%>: <%#$this->Data['component_name']%>" Style="text-decoration: none" />