diff --git a/includes/locale.inc b/includes/locale.inc index 7c4f7b000301c7f447ca5f054009b0367aba0c1c..0bacb47e3624543004d6d9260d9d1db5cb034775 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 99cfed63efd763916177779b21d58d6cf0339032..0c07a99d0b158b5041b04697b0a2b732c58ff76c 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 99cfed63efd763916177779b21d58d6cf0339032..0c07a99d0b158b5041b04697b0a2b732c58ff76c 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 8ee6594b6d7bd3caa950b41051c9f8a4ba8a0ebc..41db638f72e6fd9d50474638da5234941c509f9c 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 8ee6594b6d7bd3caa950b41051c9f8a4ba8a0ebc..41db638f72e6fd9d50474638da5234941c509f9c 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 b87d6ab155574817b1aa1a70b8a88b2170c20f10..6e11d1248a92142424274d2b0a893dd55a70ab20 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 b87d6ab155574817b1aa1a70b8a88b2170c20f10..6e11d1248a92142424274d2b0a893dd55a70ab20 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 586ffafbaad78ee3493d2ee47f24a767b5be3a97..3a9682612b66abce0540d083b23b67c6039e641a 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 586ffafbaad78ee3493d2ee47f24a767b5be3a97..3a9682612b66abce0540d083b23b67c6039e641a 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 d0190f82b0a24b0abcd29d4288147dd6d05ea40a..a5fd3807abf1cf4e9fe254c4ec6f345d660e47ca 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 d0190f82b0a24b0abcd29d4288147dd6d05ea40a..a5fd3807abf1cf4e9fe254c4ec6f345d660e47ca 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 6fc9be5b042ebc2912a857e0592e1a2bb28f6505..0080a057db9728ad4841763598acf8a75222b6c4 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 6fc9be5b042ebc2912a857e0592e1a2bb28f6505..0080a057db9728ad4841763598acf8a75222b6c4 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 d4112f511a46774a5da48b1a1a5e7df3fc8fbe12..97a3995b1929eee832bf0dde0a379f09a3adda38 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 d4112f511a46774a5da48b1a1a5e7df3fc8fbe12..97a3995b1929eee832bf0dde0a379f09a3adda38 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 c1194d66a331eb2df679d433878082e140e46c75..c96b9ee7ac4702487220c9bf2d5403c325a7ef67 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 c1194d66a331eb2df679d433878082e140e46c75..c96b9ee7ac4702487220c9bf2d5403c325a7ef67 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 f08313706c4996bc05a97503048f6d671be2f081..bf2192566edbf1515b2f23f055c1b927cf32f841 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 f08313706c4996bc05a97503048f6d671be2f081..bf2192566edbf1515b2f23f055c1b927cf32f841 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; }