diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-05-17 10:42:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-05-17 10:42:16 +0000 |
commit | d4a7074294d9e2a3c58d61b9fd0a078430446ace (patch) | |
tree | e28d59020118e3034a006b4deb2eeddb4012595d /includes/theme.maintenance.inc | |
parent | 556f62f81a35dbef8b648fde1c23a71a3487a7b6 (diff) | |
download | brdo-d4a7074294d9e2a3c58d61b9fd0a078430446ace.tar.gz brdo-d4a7074294d9e2a3c58d61b9fd0a078430446ace.tar.bz2 |
- Patch #415710 by dixon_, JohnAlbin, BMDan: fix favicon mime-type handling.
Diffstat (limited to 'includes/theme.maintenance.inc')
-rw-r--r-- | includes/theme.maintenance.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index 92fefeece..d36ad3950 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -206,7 +206,13 @@ function theme_update_page($content, $show_messages = TRUE) { function template_preprocess_maintenance_page(&$variables) { // Add favicon if (theme_get_setting('toggle_favicon')) { - drupal_add_html_head('<link rel="shortcut icon" href="' . check_url(theme_get_setting('favicon')) . '" type="image/x-icon" />'); + $favicon = theme_get_setting('favicon'); + $type = file_get_mimetype($favicon); + // Use the genereic MIME type for favicons if no other was found. + if ($type == 'application/octet-stream') { + $type = 'image/x-icon'; + } + drupal_add_html_head('<link rel="shortcut icon" href="' . check_url($favicon) . '" type="' . check_plain($type) . '" />'); } global $theme; |