### Eclipse Workspace Patch 1.0 #P Drupal Head Index: .htaccess =================================================================== RCS file: /cvs/drupal/drupal/.htaccess,v retrieving revision 1.91 diff -u -r1.91 .htaccess --- .htaccess 21 Feb 2008 19:45:47 -0000 1.91 +++ .htaccess 4 Jun 2008 02:06:10 -0000 @@ -73,6 +73,10 @@ # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: # RewriteBase / + + # To skip the Drupal bootstrap for requests to favicon.ico, uncomment the + # following line and place your favicon.ico in sites/example.com. + # RewriteRule ^favicon.ico sites/%{SERVER_NAME}/favicon.ico [NC,L] # Rewrite URLs of the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.602 diff -u -r1.602 system.module --- modules/system/system.module 7 May 2008 19:17:50 -0000 1.602 +++ modules/system/system.module 4 Jun 2008 02:06:10 -0000 @@ -643,6 +643,13 @@ 'access callback' => TRUE, 'type' => MENU_CALLBACK, ); + // Override favicon.ico to forward to the theme's shortcut icon. + $items['favicon.ico'] = array( + 'page callback' => 'system_shortcut_icon', + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, + 'file' => 'system.admin.inc', + ); return $items; } Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.76 diff -u -r1.76 system.admin.inc --- modules/system/system.admin.inc 10 May 2008 07:32:02 -0000 1.76 +++ modules/system/system.admin.inc 4 Jun 2008 02:06:10 -0000 @@ -1787,6 +1787,20 @@ } /** + * Menu callback: forward the request to the theme's shortcut icon. + */ +function system_shortcut_icon() { + init_theme(); + $favicon = theme_get_setting('favicon', TRUE); + if (empty($favicon)) { + drupal_not_found(); + } + else { + header('Location: '. $favicon); + } +} + +/** * Menu callback: return information about PHP. */ function system_php() {