From 9b3c30598be720d69c55f98837b8d8eeb2e39236 Mon Sep 17 00:00:00 2001 From: behnaz-zarriz Date: Tue, 19 May 2026 16:13:00 +0200 Subject: [PATCH] Ticket[KULTMMS-2726]: Fix fatal browse facet error caused by missing caGetInformationServiceMirrorListInformation() helper --- app/helpers/browseHelpers.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/helpers/browseHelpers.php b/app/helpers/browseHelpers.php index 862abfebe8..831bdbb6c6 100644 --- a/app/helpers/browseHelpers.php +++ b/app/helpers/browseHelpers.php @@ -317,3 +317,31 @@ function caGetBrowseForType($table, $type=null, ?array $options=null) : ?string return null; } # --------------------------------------- +/** + * + * + * + */ +function caGetInformationServiceMirrorListInformation($t_element) { + if (!$t_element) { + return false; + } + + $va_settings = $t_element->getSettings(); + + // direct list mirror + if (isset($va_settings['list']) && (int)$va_settings['list'] > 0) { + return [ + 'list' => (int)$va_settings['list'] + ]; + } + + // common CA list_id pattern + if (isset($va_settings['list_id']) && (int)$va_settings['list_id'] > 0) { + return [ + 'list' => (int)$va_settings['list_id'] + ]; + } + + return false; +}