update meeting
This commit is contained in:
parent
07691b3ce6
commit
4ee179ebfe
@ -34,9 +34,15 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$settings = get_settings();
|
$settings = get_settings();
|
||||||
$logo_path = 'uploads/charity/' . ($settings['site_logo'] ?? 'default_logo.png');
|
// Fix: Use site_logo directly as it contains the full path, or fall back correctly
|
||||||
// Check if logo exists
|
$logo_path = $settings['site_logo'] ?? '';
|
||||||
if (!file_exists($logo_path)) {
|
|
||||||
|
// 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 {
|
||||||
// Try to find any logo in the directory if the specific one is missing
|
// Try to find any logo in the directory if the specific one is missing
|
||||||
$possible_logos = glob('uploads/charity/*logo*.*');
|
$possible_logos = glob('uploads/charity/*logo*.*');
|
||||||
if (!empty($possible_logos)) {
|
if (!empty($possible_logos)) {
|
||||||
@ -45,6 +51,7 @@ if (!file_exists($logo_path)) {
|
|||||||
$logo_path = '';
|
$logo_path = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($logo_path) {
|
if ($logo_path) {
|
||||||
$logo_html = '<img src="' . $logo_path . '" alt="Logo" style="max-height: 100px;">';
|
$logo_html = '<img src="' . $logo_path . '" alt="Logo" style="max-height: 100px;">';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user