Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.708 diff -u -F^f -r1.708 common.inc --- includes/common.inc 25 Oct 2007 15:38:24 -0000 1.708 +++ includes/common.inc 2 Nov 2007 14:28:42 -0000 @@ -1197,7 +1197,8 @@ function format_date($timestamp, $type = * * @param $path * The Drupal path being linked to, such as "admin/content/node", or an - * existing URL like "http://drupal.org/". + * existing URL like "http://drupal.org/". The special path + * '' may also be given and will generate the site's base URL. * @param $options * An associative array of additional options, with the following keys: * 'query' @@ -1355,6 +1356,8 @@ function drupal_attributes($attributes = * - If you provide only the path (e.g. "admin/content/node"), it is * considered an internal link. In this case, it must be a system URL * as the url() function will generate the alias. + * - If you provide '', it generates a link to the site's + * base URL (again via the url() function). * - If you provide a path, and 'alias' is set to TRUE (see below), it is * used as is. * @param $options @@ -1388,7 +1391,7 @@ function l($text, $path, $options = arra ); // Append active class. - if ($path == $_GET['q']) { + if ($path == $_GET['q'] || ($path == '' && drupal_is_front_page())) { if (isset($options['attributes']['class'])) { $options['attributes']['class'] .= ' active'; }