summaryrefslogtreecommitdiff
path: root/modules/statistics.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-09-24 07:53:26 +0000
committerDries Buytaert <dries@buytaert.net>2005-09-24 07:53:26 +0000
commit67e68fc679643ccb7c79e7b160ae22813d44ed97 (patch)
treeaa9feb5f2b79913c0c2429b8a0c830e0bc3af526 /modules/statistics.module
parente4ec9ad36dd6850e0e17bb75f977c03a7c2735f7 (diff)
downloadbrdo-67e68fc679643ccb7c79e7b160ae22813d44ed97.tar.gz
brdo-67e68fc679643ccb7c79e7b160ae22813d44ed97.tar.bz2
- Patch #28786 by Neil: move pagers out of table.
Diffstat (limited to 'modules/statistics.module')
-rw-r--r--modules/statistics.module47
1 files changed, 18 insertions, 29 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index 6fc9be5b0..0080a057d 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -177,12 +177,10 @@ function statistics_node_tracker() {
l(t('details'), "admin/logs/access/$log->aid"));
}
- if ($pager = theme('pager', NULL, 30, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '4'));
- }
-
drupal_set_title(check_plain($node->title));
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 30, 0, tablesort_pager());
+ return $output;
}
else {
drupal_not_found();
@@ -205,12 +203,10 @@ function statistics_user_tracker() {
l(t('details'), "admin/logs/access/$log->aid"));
}
- if ($pager = theme('pager', NULL, 30, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '3'));
- }
-
drupal_set_title($account->name);
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 30, 0, tablesort_pager());
+ return $output;
}
else {
drupal_not_found();
@@ -239,11 +235,9 @@ function statistics_recent_hits($type = 'all', $id = 0) {
l(t('details'), "admin/logs/access/$log->aid"));
}
- if ($pager = theme('pager', NULL, 30, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '4'));
- }
-
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 30, 0, tablesort_pager());
+ return $output;
}
/**
@@ -266,12 +260,10 @@ function statistics_top_pages() {
$rows[] = array($page->hits, _statistics_format_item($page->title, $page->path), t('%time ms', array('%time' => round($page->average_time))), format_interval(round($page->total_time / 1000)));
}
- if ($pager = theme('pager', NULL, 30, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '4'));
- }
-
drupal_set_title(t('Top pages in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))));
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 30, 0, tablesort_pager());
+ return $output;
}
/**
@@ -296,12 +288,10 @@ function statistics_top_visitors() {
$rows[] = array($account->hits, ($account->uid ? theme('username', $account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link);
}
- if ($pager = theme('pager', NULL, 30, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '4'));
- }
-
drupal_set_title(t('Top visitors in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))));
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 30, 0, tablesort_pager());
+ return $output;
}
/**
@@ -324,11 +314,10 @@ function statistics_top_referrers() {
while ($referrer = db_fetch_object($result)) {
$rows[] = array($referrer->hits, '<a href="'. check_url($referrer->url) .'">'. check_plain(_statistics_column_width($referrer->url)) .'</a>', t('%time ago', array('%time' => format_interval(time() - $referrer->last))));
}
- if ($pager = theme('pager', NULL, 30, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '3'));
- }
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 30, 0, tablesort_pager());
+ return $output;
}
/**