Index: path.inc =================================================================== --- path.inc (revision 1522) +++ path.inc (working copy) @@ -216,9 +216,13 @@ * Boolean value: TRUE if the current page is the front page; FALSE if otherwise. */ function drupal_is_front_page() { + static $front_path; + if (!isset($front_path)) { + $front_path = drupal_get_normal_path(variable_get('site_frontpage', 'node')); + } // As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path, // we can check it against the 'site_frontpage' variable. - return $_GET['q'] == drupal_get_normal_path(variable_get('site_frontpage', 'node')); + return $_GET['q'] == $front_path; } /**