diff --git a/contrib/smarty/plugins/function.filePath.php b/contrib/smarty/plugins/function.filePath.php index f9cf22eae90ff19b80a7c114bfc86b6bdd8cfdf2..55d06ce1b851c5c3a69d33c69122e95904af89dc 100644 --- a/contrib/smarty/plugins/function.filePath.php +++ b/contrib/smarty/plugins/function.filePath.php @@ -20,12 +20,13 @@ function smarty_function_filePath($params, &$smarty) { $config = session::global_get('config'); + $default_theme = 'breezy'; /* Set theme */ if (isset ($config)) { - $theme = $config->get_cfg_value("theme", "default"); + $theme = $config->get_cfg_value('theme', $default_theme); } else { - $theme = "default"; + $theme = $default_theme; } $filename = $params['file']; @@ -40,6 +41,12 @@ function smarty_function_filePath($params, &$smarty) if (file_exists("$dir/themes/$theme/$filename")) { return "$dir/themes/$theme/$filename"; } + if (file_exists("themes/$default_theme/$filename")) { + return "themes/$default_theme/$filename"; + } + if (file_exists("$dir/themes/$default_theme/$filename")) { + return "$dir/themes/$default_theme/$filename"; + } if (file_exists("themes/default/$filename")) { return "themes/default/$filename"; } diff --git a/html/geticon.php b/html/geticon.php index 96e94cceb3ef139d256e5ee069e85bf871d542a1..90ee12531880c072feb68e38d4642d3dc3dd3b3c 100644 --- a/html/geticon.php +++ b/html/geticon.php @@ -34,7 +34,8 @@ if (session::global_is_set('config')) { } else { header("cache-control: no-cache"); } -IconTheme::$extensions = array('png'); +IconTheme::$default_theme = 'breezy'; +IconTheme::$extensions = array('png'); $src = IconTheme::findThemeIcon($theme, $_GET['context'], $_GET['icon'], $_GET['size']); header("Content-Type: image/png"); diff --git a/include/functions.inc b/include/functions.inc index 34e6ec75e6e3aa6183c0c00b8c7a8d5b1eaec587..774f61da9d838c334cc1cdf972aa94ad5e83f4bc 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -343,12 +343,13 @@ function get_browser_language() function get_template_path($filename = '', $plugin = FALSE, $path = '') { global $config, $BASE_DIR; + $default_theme = 'breezy'; /* Set theme */ if (isset ($config)) { - $theme = $config->get_cfg_value('theme', 'default'); + $theme = $config->get_cfg_value('theme', $default_theme); } else { - $theme = 'default'; + $theme = $default_theme; } /* Return path for empty filename */ @@ -366,6 +367,9 @@ function get_template_path($filename = '', $plugin = FALSE, $path = '') if (file_exists("$BASE_DIR/ihtml/themes/$theme/$nf")) { return "$BASE_DIR/ihtml/themes/$theme/$nf/$filename"; } + if (file_exists("$BASE_DIR/ihtml/themes/$default_theme/$nf")) { + return "$BASE_DIR/ihtml/themes/$default_theme/$nf/$filename"; + } if (file_exists("$BASE_DIR/ihtml/themes/default/$nf")) { return "$BASE_DIR/ihtml/themes/default/$nf/$filename"; } @@ -381,6 +385,12 @@ function get_template_path($filename = '', $plugin = FALSE, $path = '') if (file_exists("$BASE_DIR/ihtml/themes/$theme/$filename")) { return "$BASE_DIR/ihtml/themes/$theme/$filename"; } + if (file_exists("themes/$default_theme/$filename")) { + return "themes/$default_theme/$filename"; + } + if (file_exists("$BASE_DIR/ihtml/themes/$default_theme/$filename")) { + return "$BASE_DIR/ihtml/themes/$default_theme/$filename"; + } if (file_exists("themes/default/$filename")) { return "themes/default/$filename"; } diff --git a/plugins/config/class_configInLdap.inc b/plugins/config/class_configInLdap.inc index 49973bd3d7ae50a118f6ab13bda0ea00fbd79fa6..c525eabc6a172a0b1f73845d529ab9c34918ed8c 100644 --- a/plugins/config/class_configInLdap.inc +++ b/plugins/config/class_configInLdap.inc @@ -96,7 +96,7 @@ class configInLdap extends simplePlugin _('Theme'), _('Theme to be used'), 'fdTheme', TRUE, self::get_themes(), - 'default' + 'breezy' ), new SelectAttribute ( _('Timezone'), _('Timezone to be used'),