--- theme.inc 2009-03-27 11:11:29.951768800 -0400
+++ theme.inc 2009-03-27 11:17:40.244867800 -0400
@@ -1752,7 +1752,19 @@
function template_preprocess_page(&$variables) {
// Add favicon
if (theme_get_setting('toggle_favicon')) {
- drupal_set_html_head('');
+ if ( strlen(theme_get_settings('favicon')) <= 4 ) {
+ $icontype = 'image/x-icon';
+ }
+ elseif ( strtolower(substr(theme_get_settings('favicon'),-4)) == '.png' ) {
+ $icontype = 'image/png';
+ }
+ elseif ( strtolower(substr(theme_get_settings('favicon'),-4)) == '.gif' ) {
+ $icontype = 'image/gif';
+ }
+ else {
+ $icontype = 'image/x-icon'; //'image/vnd.microsoft.icon' is official, but not widely supported.
+ }
+ drupal_set_html_head('');
}
global $theme;