From 4ee179ebfe8d543b77c066bff826e58cd9fda7dd Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 27 Mar 2026 09:29:56 +0000 Subject: [PATCH] update meeting --- print_meeting.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/print_meeting.php b/print_meeting.php index abfde35..bb77fc3 100644 --- a/print_meeting.php +++ b/print_meeting.php @@ -34,15 +34,22 @@ try { } $settings = get_settings(); -$logo_path = 'uploads/charity/' . ($settings['site_logo'] ?? 'default_logo.png'); -// Check if logo exists -if (!file_exists($logo_path)) { - // Try to find any logo in the directory if the specific one is missing - $possible_logos = glob('uploads/charity/*logo*.*'); - if (!empty($possible_logos)) { - $logo_path = $possible_logos[0]; +// Fix: Use site_logo directly as it contains the full path, or fall back correctly +$logo_path = $settings['site_logo'] ?? ''; + +// Validation and fallback logic +if (empty($logo_path) || !file_exists($logo_path)) { + // If it's just a filename without path, try adding the path + if (!empty($logo_path) && file_exists('uploads/charity/' . $logo_path)) { + $logo_path = 'uploads/charity/' . $logo_path; } else { - $logo_path = ''; + // Try to find any logo in the directory if the specific one is missing + $possible_logos = glob('uploads/charity/*logo*.*'); + if (!empty($possible_logos)) { + $logo_path = $possible_logos[0]; + } else { + $logo_path = ''; + } } }