summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcatch2012-02-11 14:22:04 +0900
committercatch2012-02-11 14:22:04 +0900
commit25c770413165fc37c7e1e3f5c3bd11e7ab8fcce8 (patch)
tree6a9892c0ce418cc184645a791598a0908bbdc349
parent055900b3388358bb24fc59b7c1f00977fcc089aa (diff)
Issue #41595 by pillarsdotnet, m3avrck, sun et al: Fixed All pager links have an 'active' CSS class.
-rw-r--r--core/includes/pager.inc8
-rw-r--r--core/modules/simpletest/simpletest.info1
2 files changed, 8 insertions, 1 deletions
diff --git a/core/includes/pager.inc b/core/includes/pager.inc
index a5d3e6b..c060d0e 100644
--- a/core/includes/pager.inc
+++ b/core/includes/pager.inc
@@ -630,7 +630,13 @@ function theme_pager_link($variables) {
}
}
- return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => $query));
+ // @todo l() cannot be used here, since it adds an 'active' class based on the
+ // path only (which is always the current path for pager links). Apparently,
+ // none of the pager links is active at any time - but it should still be
+ // possible to use l() here.
+ // @see http://drupal.org/node/1410574
+ $attributes['href'] = url($_GET['q'], array('query' => $query));
+ return '<a' . drupal_attributes($attributes) . '>' . check_plain($text) . '</a>';
}
/**
diff --git a/core/modules/simpletest/simpletest.info b/core/modules/simpletest/simpletest.info
index adee92a..d518a76 100644
--- a/core/modules/simpletest/simpletest.info
+++ b/core/modules/simpletest/simpletest.info
@@ -26,6 +26,7 @@ files[] = tests/lock.test
files[] = tests/mail.test
files[] = tests/menu.test
files[] = tests/module.test
+files[] = tests/pager.test
files[] = tests/password.test
files[] = tests/path.test
files[] = tests/registry.test