summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 37a90e10a..8c0dd1311 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1803,6 +1803,8 @@ function drupal_attributes($attributes = array()) {
* an HTML string containing a link to the given path.
*/
function l($text, $path, array $options = array()) {
+ global $language;
+
// Merge in defaults.
$options += array(
'attributes' => array(),
@@ -1810,7 +1812,8 @@ function l($text, $path, array $options = array()) {
);
// Append active class.
- if ($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) {
+ if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) &&
+ (empty($options['language']) || $options['language']->language == $language->language)) {
if (isset($options['attributes']['class'])) {
$options['attributes']['class'] .= ' active';
}