summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/locale.inc5
-rw-r--r--modules/aggregator.module4
-rw-r--r--modules/aggregator/aggregator.module4
-rw-r--r--modules/comment.module4
-rw-r--r--modules/comment/comment.module4
-rw-r--r--modules/forum.module5
-rw-r--r--modules/forum/forum.module5
-rw-r--r--modules/node.module5
-rw-r--r--modules/node/node.module5
-rw-r--r--modules/path.module8
-rw-r--r--modules/path/path.module8
-rw-r--r--modules/statistics.module47
-rw-r--r--modules/statistics/statistics.module47
-rw-r--r--modules/tracker.module5
-rw-r--r--modules/tracker/tracker.module5
-rw-r--r--modules/user.module8
-rw-r--r--modules/user/user.module8
-rw-r--r--modules/watchdog.module6
-rw-r--r--modules/watchdog/watchdog.module6
19 files changed, 61 insertions, 128 deletions
diff --git a/includes/locale.inc b/includes/locale.inc
index 7c4f7b000..0bacb47e3 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -1065,12 +1065,9 @@ function _locale_string_seek() {
}
}
- if ($pager = theme('pager', NULL, 50, 0, $request)) {
- $rows[] = array(array('data' => "$pager", 'colspan' => '5'));
- }
-
$output .= theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0, $request);
}
return $output;
diff --git a/modules/aggregator.module b/modules/aggregator.module
index 99cfed63e..0c07a99d0 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -1004,9 +1004,7 @@ function _aggregator_page_list($sql, $op, $header = '') {
}
$output .= '</div>';
- if ($pager = theme('pager', NULL, 20, 0)) {
- $output .= $pager;
- }
+ $output .= theme('pager', NULL, 20, 0);
// arg(1) is undefined if we are at the top aggregator URL
// is there a better way to do this?
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 99cfed63e..0c07a99d0 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -1004,9 +1004,7 @@ function _aggregator_page_list($sql, $op, $header = '') {
}
$output .= '</div>';
- if ($pager = theme('pager', NULL, 20, 0)) {
- $output .= $pager;
- }
+ $output .= theme('pager', NULL, 20, 0);
// arg(1) is undefined if we are at the top aggregator URL
// is there a better way to do this?
diff --git a/modules/comment.module b/modules/comment.module
index 8ee6594b6..41db638f7 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -938,9 +938,7 @@ function comment_render($node, $cid = 0) {
// Use the standard pager; $pager_total is the number of returned rows,
// is global and defined in pager.inc.
- if ($pager = theme('pager', NULL, $comments_per_page, 0, array('comments_per_page' => $comments_per_page))) {
- $output .= $pager;
- }
+ $output .= theme('pager', NULL, $comments_per_page, 0, array('comments_per_page' => $comments_per_page));
if (db_num_rows($result) && comment_user_can_moderate($node)) {
$output .= '<div id="comment-moderation-button">'. form_submit(t('Moderate comments')) .'</div>';
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 8ee6594b6..41db638f7 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -938,9 +938,7 @@ function comment_render($node, $cid = 0) {
// Use the standard pager; $pager_total is the number of returned rows,
// is global and defined in pager.inc.
- if ($pager = theme('pager', NULL, $comments_per_page, 0, array('comments_per_page' => $comments_per_page))) {
- $output .= $pager;
- }
+ $output .= theme('pager', NULL, $comments_per_page, 0, array('comments_per_page' => $comments_per_page));
if (db_num_rows($result) && comment_user_can_moderate($node)) {
$output .= '<div id="comment-moderation-button">'. form_submit(t('Moderate comments')) .'</div>';
diff --git a/modules/forum.module b/modules/forum.module
index b87d6ab15..6e11d1248 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -951,13 +951,10 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page) {
);
}
}
-
- if ($pager = theme('pager', NULL, $forum_per_page, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '5', 'class' => 'pager'));
- }
}
$output .= theme('table', $forum_topic_list_header, $rows);
+ $output .= theme('pager', NULL, $forum_per_page, 0, tablesort_pager());
return $output;
}
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index b87d6ab15..6e11d1248 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -951,13 +951,10 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page) {
);
}
}
-
- if ($pager = theme('pager', NULL, $forum_per_page, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '5', 'class' => 'pager'));
- }
}
$output .= theme('table', $forum_topic_list_header, $rows);
+ $output .= theme('pager', NULL, $forum_per_page, 0, tablesort_pager());
return $output;
}
diff --git a/modules/node.module b/modules/node.module
index 586ffafba..3a9682612 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -962,15 +962,12 @@ function node_admin_nodes() {
l(t('edit'), 'node/'. $node->nid .'/edit', array(), $destination));
}
- if ($pager = theme('pager', NULL, 50, 0)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '7'));
- }
-
if (!$rows) {
$rows[] = array(array('data' => t('No posts available.'), 'colspan' => '6'));
}
$output .= theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0);
return form($output, 'post', url('admin/node/action'));
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 586ffafba..3a9682612 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -962,15 +962,12 @@ function node_admin_nodes() {
l(t('edit'), 'node/'. $node->nid .'/edit', array(), $destination));
}
- if ($pager = theme('pager', NULL, 50, 0)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '7'));
- }
-
if (!$rows) {
$rows[] = array(array('data' => t('No posts available.'), 'colspan' => '6'));
}
$output .= theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0);
return form($output, 'post', url('admin/node/action'));
}
diff --git a/modules/path.module b/modules/path.module
index d0190f82b..a5fd3807a 100644
--- a/modules/path.module
+++ b/modules/path.module
@@ -256,15 +256,13 @@ function path_overview() {
$rows[] = array($data->dst, $data->src, l(t('edit'), "admin/path/edit/$data->pid", array(), $destination), l(t('delete'), "admin/path/delete/$data->pid", array(), $destination));
}
- if ($pager = theme('pager', NULL, 50, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '4'));
- }
-
if (!$rows) {
$rows[] = array(array('data' => t('No URL aliases available.'), 'colspan' => '4'));
}
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0, tablesort_pager());
+ return $output;
}
/**
diff --git a/modules/path/path.module b/modules/path/path.module
index d0190f82b..a5fd3807a 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -256,15 +256,13 @@ function path_overview() {
$rows[] = array($data->dst, $data->src, l(t('edit'), "admin/path/edit/$data->pid", array(), $destination), l(t('delete'), "admin/path/delete/$data->pid", array(), $destination));
}
- if ($pager = theme('pager', NULL, 50, 0, tablesort_pager())) {
- $rows[] = array(array('data' => $pager, 'colspan' => '4'));
- }
-
if (!$rows) {
$rows[] = array(array('data' => t('No URL aliases available.'), 'colspan' => '4'));
}
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0, tablesort_pager());
+ return $output;
}
/**
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;
}
/**
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 6fc9be5b0..0080a057d 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/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;
}
/**
diff --git a/modules/tracker.module b/modules/tracker.module
index d4112f511..97a3995b1 100644
--- a/modules/tracker.module
+++ b/modules/tracker.module
@@ -108,14 +108,11 @@ function tracker_page($uid = 0) {
);
}
- if ($pager = theme('pager', NULL, 25, 0)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '5'));
- }
-
$header = array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last post'));
$output .= '<div id="tracker">';
$output .= theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 25, 0);
$output .= '</div>';
return $output;
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module
index d4112f511..97a3995b1 100644
--- a/modules/tracker/tracker.module
+++ b/modules/tracker/tracker.module
@@ -108,14 +108,11 @@ function tracker_page($uid = 0) {
);
}
- if ($pager = theme('pager', NULL, 25, 0)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '5'));
- }
-
$header = array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last post'));
$output .= '<div id="tracker">';
$output .= theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 25, 0);
$output .= '</div>';
return $output;
diff --git a/modules/user.module b/modules/user.module
index c1194d66a..c96b9ee7a 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -1722,11 +1722,9 @@ function user_admin_account() {
l(t('edit'), "user/$account->uid/edit", array(), $destination));
}
- $pager = theme('pager', NULL, 50, 0, tablesort_pager());
- if (!empty($pager)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '5'));
- }
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0, tablesort_pager());
+ return $output;
}
function user_configure() {
diff --git a/modules/user/user.module b/modules/user/user.module
index c1194d66a..c96b9ee7a 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1722,11 +1722,9 @@ function user_admin_account() {
l(t('edit'), "user/$account->uid/edit", array(), $destination));
}
- $pager = theme('pager', NULL, 50, 0, tablesort_pager());
- if (!empty($pager)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '5'));
- }
- return theme('table', $header, $rows);
+ $output = theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0, tablesort_pager());
+ return $output;
}
function user_configure() {
diff --git a/modules/watchdog.module b/modules/watchdog.module
index f08313706..bf2192566 100644
--- a/modules/watchdog.module
+++ b/modules/watchdog.module
@@ -117,13 +117,9 @@ function watchdog_overview() {
$rows[] = array(array('data' => t('No log messages available.'), 'colspan' => '7'));
}
- $pager = theme('pager', NULL, 50, 0, tablesort_pager());
- if (!empty($pager)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '7'));
- }
-
$output = '<div class="container-inline">'. form($form) .'</div>';
$output .= theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0, tablesort_pager());
return $output;
}
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index f08313706..bf2192566 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/watchdog.module
@@ -117,13 +117,9 @@ function watchdog_overview() {
$rows[] = array(array('data' => t('No log messages available.'), 'colspan' => '7'));
}
- $pager = theme('pager', NULL, 50, 0, tablesort_pager());
- if (!empty($pager)) {
- $rows[] = array(array('data' => $pager, 'colspan' => '7'));
- }
-
$output = '<div class="container-inline">'. form($form) .'</div>';
$output .= theme('table', $header, $rows);
+ $output .= theme('pager', NULL, 50, 0, tablesort_pager());
return $output;
}