From 74db4ed2c6385a69757dd1abde054bd22e696628 Mon Sep 17 00:00:00 2001 From: stevetruckstuff Date: Thu, 24 Aug 2006 21:15:29 +0000 Subject: [PATCH] Utilize new default icon theme path git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11638 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- templates/util_global.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/util_global.php b/templates/util_global.php index 87c3984f..9969c2f6 100644 --- a/templates/util_global.php +++ b/templates/util_global.php @@ -61,15 +61,20 @@ function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text='', $w=NULL * @since 1.5.2 */ function getIconPath ($icon_theme_path, $icon_name) { + global $icon_theme_def; + if (is_null($icon_theme_path)) return NULL; // Desired icon exists in the current theme? if (is_file($icon_theme_path . $icon_name)) { return $icon_theme_path . $icon_name; - + + // Icon not found, check for the admin-specified default + } elseif (!is_null($icon_theme_def) && is_file($icon_theme_def . $icon_name)) { + return $icon_theme_def . $icon_name; + // Icon not found, return the SQM default icon - // TODO: allow admins to change the default icon theme in conf.pl } elseif (is_file(SM_PATH . 'images/themes/default/'.$icon_name)) { return SM_PATH . 'images/themes/default/'.$icon_name; } -- 2.25.1