From 7a6f73f49d0cdbb544ca1a8af36ed3502487456c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 26 Apr 2009 19:44:40 +0000 Subject: [PATCH] - Patch #330748 by stBorchert: remove from theme_pager*. --- includes/common.inc | 10 +++---- includes/locale.inc | 2 +- includes/pager.inc | 36 +++++++++---------------- modules/aggregator/aggregator.pages.inc | 2 +- modules/blog/blog.pages.inc | 4 +-- modules/comment/comment.admin.inc | 2 +- modules/comment/comment.module | 2 +- modules/dblog/dblog.admin.inc | 4 +-- modules/forum/forum.module | 2 +- modules/node/node.admin.inc | 2 +- modules/node/node.module | 2 +- modules/path/path.admin.inc | 2 +- modules/poll/poll.pages.inc | 2 +- modules/profile/profile.pages.inc | 4 +-- modules/search/search.pages.inc | 2 +- modules/statistics/statistics.admin.inc | 8 +++--- modules/statistics/statistics.pages.inc | 4 +-- modules/system/system.module | 2 +- modules/taxonomy/taxonomy.admin.inc | 2 +- modules/taxonomy/taxonomy.pages.inc | 2 +- modules/tracker/tracker.pages.inc | 2 +- modules/user/user.admin.inc | 2 +- 22 files changed, 45 insertions(+), 55 deletions(-) diff --git a/includes/common.inc b/includes/common.inc index 64cccd92183..85381326bac 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3687,19 +3687,19 @@ function drupal_common_theme() { ), // from pager.inc 'pager' => array( - 'arguments' => array('tags' => array(), 'limit' => 10, 'element' => 0, 'parameters' => array()), + 'arguments' => array('tags' => array(), 'element' => 0, 'parameters' => array()), ), 'pager_first' => array( - 'arguments' => array('text' => NULL, 'limit' => NULL, 'element' => 0, 'parameters' => array()), + 'arguments' => array('text' => NULL, 'element' => 0, 'parameters' => array()), ), 'pager_previous' => array( - 'arguments' => array('text' => NULL, 'limit' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()), + 'arguments' => array('text' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()), ), 'pager_next' => array( - 'arguments' => array('text' => NULL, 'limit' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()), + 'arguments' => array('text' => NULL, 'element' => 0, 'interval' => 1, 'parameters' => array()), ), 'pager_last' => array( - 'arguments' => array('text' => NULL, 'limit' => NULL, 'element' => 0, 'parameters' => array()), + 'arguments' => array('text' => NULL, 'element' => 0, 'parameters' => array()), ), 'pager_link' => array( 'arguments' => array('text' => NULL, 'page_new' => NULL, 'element' => NULL, 'parameters' => array(), 'attributes' => array()), diff --git a/includes/locale.inc b/includes/locale.inc index 57d5ab92b9e..a386bbc697a 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -2275,7 +2275,7 @@ function _locale_translate_seek() { if (count($rows)) { $output .= theme('table', $header, $rows); - if ($pager = theme('pager', NULL, 50)) { + if ($pager = theme('pager', NULL)) { $output .= $pager; } } diff --git a/includes/pager.inc b/includes/pager.inc index a3c80ae5ecc..a82fa9a55f4 100644 --- a/includes/pager.inc +++ b/includes/pager.inc @@ -243,8 +243,6 @@ function pager_get_querystring() { * * @param $tags * An array of labels for the controls in the pager. - * @param $limit - * The number of query results to display per page. * @param $element * An optional integer to distinguish between multiple pagers on one page. * @param $parameters @@ -256,7 +254,7 @@ function pager_get_querystring() { * * @ingroup themeable */ -function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) { +function theme_pager($tags = array(), $element = 0, $parameters = array(), $quantity = 9) { global $pager_page_array, $pager_total; // Calculate various markers within this pager piece: @@ -286,10 +284,10 @@ function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = a } // End of generation loop preparation. - $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('« first')), $limit, $element, $parameters); - $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : t('‹ previous')), $limit, $element, 1, $parameters); - $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('next ›')), $limit, $element, 1, $parameters); - $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('last »')), $limit, $element, $parameters); + $li_first = theme('pager_first', (isset($tags[0]) ? $tags[0] : t('« first')), $element, $parameters); + $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : t('‹ previous')), $element, 1, $parameters); + $li_next = theme('pager_next', (isset($tags[3]) ? $tags[3] : t('next ›')), $element, 1, $parameters); + $li_last = theme('pager_last', (isset($tags[4]) ? $tags[4] : t('last »')), $element, $parameters); if ($pager_total[$element] > 1) { if ($li_first) { @@ -318,7 +316,7 @@ function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = a if ($i < $pager_current) { $items[] = array( 'class' => 'pager-item', - 'data' => theme('pager_previous', $i, $limit, $element, ($pager_current - $i), $parameters), + 'data' => theme('pager_previous', $i, $element, ($pager_current - $i), $parameters), ); } if ($i == $pager_current) { @@ -330,7 +328,7 @@ function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = a if ($i > $pager_current) { $items[] = array( 'class' => 'pager-item', - 'data' => theme('pager_next', $i, $limit, $element, ($i - $pager_current), $parameters), + 'data' => theme('pager_next', $i, $element, ($i - $pager_current), $parameters), ); } } @@ -371,8 +369,6 @@ function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = a * * @param $text * The name (or image) of the link. - * @param $limit - * The number of query results to display per page. * @param $element * An optional integer to distinguish between multiple pagers on one page. * @param $parameters @@ -382,7 +378,7 @@ function theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = a * * @ingroup themeable */ -function theme_pager_first($text, $limit, $element = 0, $parameters = array()) { +function theme_pager_first($text, $element = 0, $parameters = array()) { global $pager_page_array; $output = ''; @@ -399,8 +395,6 @@ function theme_pager_first($text, $limit, $element = 0, $parameters = array()) { * * @param $text * The name (or image) of the link. - * @param $limit - * The number of query results to display per page. * @param $element * An optional integer to distinguish between multiple pagers on one page. * @param $interval @@ -412,7 +406,7 @@ function theme_pager_first($text, $limit, $element = 0, $parameters = array()) { * * @ingroup themeable */ -function theme_pager_previous($text, $limit, $element = 0, $interval = 1, $parameters = array()) { +function theme_pager_previous($text, $element = 0, $interval = 1, $parameters = array()) { global $pager_page_array; $output = ''; @@ -422,7 +416,7 @@ function theme_pager_previous($text, $limit, $element = 0, $interval = 1, $param // If the previous page is the first page, mark the link as such. if ($page_new[$element] == 0) { - $output = theme('pager_first', $text, $limit, $element, $parameters); + $output = theme('pager_first', $text, $element, $parameters); } // The previous page is not the first page. else { @@ -438,8 +432,6 @@ function theme_pager_previous($text, $limit, $element = 0, $interval = 1, $param * * @param $text * The name (or image) of the link. - * @param $limit - * The number of query results to display per page. * @param $element * An optional integer to distinguish between multiple pagers on one page. * @param $interval @@ -451,7 +443,7 @@ function theme_pager_previous($text, $limit, $element = 0, $interval = 1, $param * * @ingroup themeable */ -function theme_pager_next($text, $limit, $element = 0, $interval = 1, $parameters = array()) { +function theme_pager_next($text, $element = 0, $interval = 1, $parameters = array()) { global $pager_page_array, $pager_total; $output = ''; @@ -460,7 +452,7 @@ function theme_pager_next($text, $limit, $element = 0, $interval = 1, $parameter $page_new = pager_load_array($pager_page_array[$element] + $interval, $element, $pager_page_array); // If the next page is the last page, mark the link as such. if ($page_new[$element] == ($pager_total[$element] - 1)) { - $output = theme('pager_last', $text, $limit, $element, $parameters); + $output = theme('pager_last', $text, $element, $parameters); } // The next page is not the last page. else { @@ -476,8 +468,6 @@ function theme_pager_next($text, $limit, $element = 0, $interval = 1, $parameter * * @param $text * The name (or image) of the link. - * @param $limit - * The number of query results to display per page. * @param $element * An optional integer to distinguish between multiple pagers on one page. * @param $parameters @@ -487,7 +477,7 @@ function theme_pager_next($text, $limit, $element = 0, $interval = 1, $parameter * * @ingroup themeable */ -function theme_pager_last($text, $limit, $element = 0, $parameters = array()) { +function theme_pager_last($text, $element = 0, $parameters = array()) { global $pager_page_array, $pager_total; $output = ''; diff --git a/modules/aggregator/aggregator.pages.inc b/modules/aggregator/aggregator.pages.inc index 79d80d0413c..16cd6cf707c 100644 --- a/modules/aggregator/aggregator.pages.inc +++ b/modules/aggregator/aggregator.pages.inc @@ -261,7 +261,7 @@ function theme_aggregator_categorize_items($form) { * @see aggregator-wrapper.tpl.php */ function template_preprocess_aggregator_wrapper(&$variables) { - $variables['pager'] = theme('pager', NULL, 20, 0); + $variables['pager'] = theme('pager', NULL); } /** diff --git a/modules/blog/blog.pages.inc b/modules/blog/blog.pages.inc index 943e5491fd9..b6b0346f5fe 100644 --- a/modules/blog/blog.pages.inc +++ b/modules/blog/blog.pages.inc @@ -46,7 +46,7 @@ function blog_page_user($account) { $nodes = node_load_multiple($nids); $build += node_build_multiple($nodes); $build['pager'] = array( - '#markup' => theme('pager', NULL, variable_get('default_nodes_main', 10)), + '#markup' => theme('pager', NULL), '#weight' => 5, ); } @@ -95,7 +95,7 @@ function blog_page_last() { $nodes = node_load_multiple($nids); $build += node_build_multiple($nodes); $build['pager'] = array( - '#markup' => theme('pager', NULL, variable_get('default_nodes_main', 10)), + '#markup' => theme('pager', NULL), '#weight' => 5, ); } diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc index a3cbe494dae..15c426390c6 100644 --- a/modules/comment/comment.admin.inc +++ b/modules/comment/comment.admin.inc @@ -103,7 +103,7 @@ function comment_admin_overview($type = 'new', $arg) { ); $form['pager'] = array( - '#markup' => theme('pager', NULL, 50, 0) + '#markup' => theme('pager', NULL) ); return $form; diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 13e272ecdd1..74f6c21b260 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1194,7 +1194,7 @@ function comment_render($node, $cid = 0) { $comments .= ''; } $output .= $comments; - $output .= theme('pager', NULL, $comments_per_page, 0); + $output .= theme('pager', NULL); } // If enabled, show new comment form if it's not already being displayed. diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc index 764776d8edc..c5a27f86d5d 100644 --- a/modules/dblog/dblog.admin.inc +++ b/modules/dblog/dblog.admin.inc @@ -103,7 +103,7 @@ function dblog_overview() { } $output .= theme('table', $header, $rows, array('id' => 'admin-dblog')); - $output .= theme('pager', NULL, 50, 0); + $output .= theme('pager', NULL); return $output; } @@ -145,7 +145,7 @@ function dblog_top($type) { } $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); + $output .= theme('pager', NULL); return $output; } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index aa95728248c..268645cfcdb 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -909,7 +909,7 @@ function template_preprocess_forum_topic_list(&$variables) { $variables['topic_id'] = $variables['tid']; unset($variables['tid']); - $variables['pager'] = theme('pager', NULL, $variables['forum_per_page'], 0); + $variables['pager'] = theme('pager', NULL); } /** diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index 8e0c2519e7c..4ae6980fc52 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -525,7 +525,7 @@ function node_admin_nodes() { '#type' => 'checkboxes', '#options' => $nodes, ); - $form['pager'] = array('#markup' => theme('pager', NULL, 50, 0)); + $form['pager'] = array('#markup' => theme('pager', NULL)); $form['#theme'] = 'node_admin_nodes'; return $form; } diff --git a/modules/node/node.module b/modules/node/node.module index 8bcafaeb281..8bd143d23aa 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2080,7 +2080,7 @@ function node_page_default() { $feed_url = url('rss.xml', array('absolute' => TRUE)); drupal_add_feed($feed_url, variable_get('site_name', 'Drupal') . ' ' . t('RSS')); $build['pager'] = array( - '#markup' => theme('pager', NULL, variable_get('default_nodes_main', 10)), + '#markup' => theme('pager', NULL), '#weight' => 5, ); } diff --git a/modules/path/path.admin.inc b/modules/path/path.admin.inc index 20999cc92c6..cab9b5d1f34 100644 --- a/modules/path/path.admin.inc +++ b/modules/path/path.admin.inc @@ -65,7 +65,7 @@ function path_admin_overview($keys = NULL) { } $output .= theme('table', $header, $rows); - $output .= theme('pager', NULL, 50, 0); + $output .= theme('pager', NULL); return $output; } diff --git a/modules/poll/poll.pages.inc b/modules/poll/poll.pages.inc index 4d15afe0f38..f0776b4beea 100644 --- a/modules/poll/poll.pages.inc +++ b/modules/poll/poll.pages.inc @@ -81,7 +81,7 @@ function poll_votes($node) { ); } $output .= theme('table', $header, $rows); - $output .= theme('pager', NULL, $votes_per_page, 0); + $output .= theme('pager', NULL); return $output; } diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc index e1e01d9e061..788e2de61cd 100644 --- a/modules/profile/profile.pages.inc +++ b/modules/profile/profile.pages.inc @@ -66,7 +66,7 @@ function profile_browse() { $content .= theme('profile_listing', $account, $profile); } $output = theme('profile_wrapper', $content); - $output .= theme('pager', NULL, 20); + $output .= theme('pager', NULL); if ($field->type == 'selection' || $field->type == 'list' || $field->type == 'textfield') { $title = strtr(check_plain($field->page), array('%value' => theme('placeholder', $value))); @@ -98,7 +98,7 @@ function profile_browse() { $content .= theme('profile_listing', $account, $profile); } $output = theme('profile_wrapper', $content); - $output .= theme('pager', NULL, 20); + $output .= theme('pager', NULL); drupal_set_title(t('User list'), PASS_THROUGH); return $output; diff --git a/modules/search/search.pages.inc b/modules/search/search.pages.inc index 502612d3891..f431994d826 100644 --- a/modules/search/search.pages.inc +++ b/modules/search/search.pages.inc @@ -78,7 +78,7 @@ function template_preprocess_search_results(&$variables) { foreach ($variables['results'] as $result) { $variables['search_results'] .= theme('search_result', $result, $variables['type']); } - $variables['pager'] = theme('pager', NULL, 10, 0); + $variables['pager'] = theme('pager', NULL); // Provide alternate search results template. $variables['template_files'][] = 'search-results-' . $variables['type']; } diff --git a/modules/statistics/statistics.admin.inc b/modules/statistics/statistics.admin.inc index cfe260a584e..7f49deb12e4 100644 --- a/modules/statistics/statistics.admin.inc +++ b/modules/statistics/statistics.admin.inc @@ -40,7 +40,7 @@ function statistics_recent_hits() { } $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); + $output .= theme('pager', NULL); return $output; } @@ -84,7 +84,7 @@ function statistics_top_pages() { drupal_set_title(t('Top pages in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))), PASS_THROUGH); $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); + $output .= theme('pager', NULL); return $output; } @@ -134,7 +134,7 @@ function statistics_top_visitors() { drupal_set_title(t('Top visitors in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))), PASS_THROUGH); $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); + $output .= theme('pager', NULL); return $output; } @@ -179,7 +179,7 @@ function statistics_top_referrers() { } $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); + $output .= theme('pager', NULL); return $output; } diff --git a/modules/statistics/statistics.pages.inc b/modules/statistics/statistics.pages.inc index f416054fe55..ce508cf61a6 100644 --- a/modules/statistics/statistics.pages.inc +++ b/modules/statistics/statistics.pages.inc @@ -44,7 +44,7 @@ function statistics_node_tracker() { drupal_set_title($node->title); $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); + $output .= theme('pager', NULL); return $output; } else { @@ -81,7 +81,7 @@ function statistics_user_tracker() { drupal_set_title($account->name); $output = theme('table', $header, $rows); - $output .= theme('pager', NULL, 30, 0); + $output .= theme('pager', NULL); return $output; } else { diff --git a/modules/system/system.module b/modules/system/system.module index df27362eac9..96897c6e292 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1683,7 +1683,7 @@ function system_actions_manage() { } if ($row) { - $pager = theme('pager', NULL, 50, 0); + $pager = theme('pager', NULL); if (!empty($pager)) { $row[] = array(array('data' => $pager, 'colspan' => '3')); } diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc index bdddea75d3a..5c5c4adb7e0 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -620,7 +620,7 @@ function theme_taxonomy_overview_terms($form) { $header = array(t('Name'), t('Operations')); $output = theme('table', $header, $rows, array('id' => 'taxonomy')); $output .= drupal_render_children($form); - $output .= theme('pager', NULL, $page_increment); + $output .= theme('pager', NULL); return $output; } diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc index 57f1c6e7471..65c81cbb128 100644 --- a/modules/taxonomy/taxonomy.pages.inc +++ b/modules/taxonomy/taxonomy.pages.inc @@ -67,7 +67,7 @@ function taxonomy_term_page($terms, $depth = 0, $op = 'page') { $nodes = node_load_multiple($nids); $build += node_build_multiple($nodes); $build['pager'] = array( - '#markup' => theme('pager', NULL, variable_get('default_nodes_main', 10)), + '#markup' => theme('pager', NULL), '#weight' => 5, ); } diff --git a/modules/tracker/tracker.pages.inc b/modules/tracker/tracker.pages.inc index d28c2a95ab7..e99965927bf 100644 --- a/modules/tracker/tracker.pages.inc +++ b/modules/tracker/tracker.pages.inc @@ -82,7 +82,7 @@ function tracker_page($account = NULL, $set_title = FALSE) { $output = '
'; $output .= theme('table', $header, $rows); - $output .= theme('pager', NULL, 25, 0); + $output .= theme('pager', NULL); $output .= '
'; return $output; diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index bb398077963..eb5e621f9c3 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -197,7 +197,7 @@ function user_admin_account() { '#type' => 'checkboxes', '#options' => $accounts ); - $form['pager'] = array('#markup' => theme('pager', NULL, 50, 0)); + $form['pager'] = array('#markup' => theme('pager', NULL)); return $form; }