summaryrefslogtreecommitdiff
path: root/includes/pager.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-01-09 19:53:51 +0000
committerDries Buytaert <dries@buytaert.net>2003-01-09 19:53:51 +0000
commit6744e3406668aee03ece6277d8f042a58d533e84 (patch)
tree488eb71ce475fef518b882cb2cc31b0931b4a72a /includes/pager.inc
parent22c3f055e1b4115561dfa4514747d7d8e4475531 (diff)
downloadbrdo-6744e3406668aee03ece6277d8f042a58d533e84.tar.gz
brdo-6744e3406668aee03ece6277d8f042a58d533e84.tar.bz2
- Fixed the pager. It might not be 100% correct, but it will work in 95%
of the cases.
Diffstat (limited to 'includes/pager.inc')
-rw-r--r--includes/pager.inc16
1 files changed, 7 insertions, 9 deletions
diff --git a/includes/pager.inc b/includes/pager.inc
index 0ec810171..28d96c743 100644
--- a/includes/pager.inc
+++ b/includes/pager.inc
@@ -282,21 +282,19 @@ function pager_query($query, $limit = 10, $element = 0) {
}
function pager_link($from_new, $attributes = array()) {
- $url = drupal_parse_url();
- if (count($from_new) == 0 || (count($from_new) == 1 && $from_new[0] == 0)) {
- unset($url["query"]["from"]);
- }
- else {
- $url["query"]["from"] = implode(",", $from_new);
+ foreach($attributes as $key => $value) {
+ $query[] = "$key=$value";
}
if (count($attributes)) {
- $url["query"] = array_merge($url["query"], $attributes);
+ $url = url("", "from=". $from_new[0] ."&". implode("&", $query));
+ }
+ else {
+ $url = url("", "from=". $from_new[0]);
}
- // TODO: should use 'url()':
- // return drupal_url($url["query"], $url["script"]);
+ return $url;
}
function pager_load_array($value, $element, $old_array) {