diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-04 07:04:21 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-04 07:04:21 +0000 |
commit | 24057c3d53a22373e0b575a36f49ab8e965b6934 (patch) | |
tree | 75793c721b5e81352355ee52ad5b7d43939500c9 /modules/system/system.admin.inc | |
parent | 3fa324a1b5a6a7360216a88201f10b000915f574 (diff) | |
download | brdo-24057c3d53a22373e0b575a36f49ab8e965b6934.tar.gz brdo-24057c3d53a22373e0b575a36f49ab8e965b6934.tar.bz2 |
#531476 by aaron and mfb: Add favicon mimetype as a theme setting to avoid expensive calls to file system.
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r-- | modules/system/system.admin.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 2242c2f24..cf5335600 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -513,6 +513,13 @@ function system_theme_settings(&$form_state, $key = '') { */ function system_theme_settings_submit($form, &$form_state) { $values = $form_state['values']; + if (empty($values['default_favicon']) && !empty($values['favicon_path'])) { + $mimetype = file_get_mimetype($values['favicon_path']); + // Use the default MIME type for favicons if no other was found. + if ($mimetype != 'application/octet-stream') { + $values['favicon_mimetype'] = $mimetype; + } + } $key = $values['var']; // Exclude unnecessary elements before saving. |