From 712a30b520c67ddc71c3f5a7b0a33ea3ae7b57b7 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Mon, 8 Dec 2003 18:30:20 +0000
Subject: [PATCH] - Improvements by Goba:   + removes the lots of pagers and
 indirect pager themeing   + add the theme_pager() function, which should be
 called as     theme("pager", ...) to get a pager.

---
 includes/pager.inc                   | 59 ++--------------------------
 modules/blog.module                  |  4 +-
 modules/blog/blog.module             |  4 +-
 modules/comment.module               |  4 +-
 modules/comment/comment.module       |  4 +-
 modules/forum.module                 |  2 +-
 modules/forum/forum.module           |  2 +-
 modules/locale.module                |  2 +-
 modules/locale/locale.module         |  2 +-
 modules/node.module                  |  2 +-
 modules/node/node.module             |  2 +-
 modules/path.module                  |  2 +-
 modules/path/path.module             |  2 +-
 modules/statistics.module            |  6 +--
 modules/statistics/statistics.module |  6 +--
 modules/taxonomy.module              |  2 +-
 modules/taxonomy/taxonomy.module     |  2 +-
 modules/tracker.module               |  2 +-
 modules/tracker/tracker.module       |  2 +-
 modules/user.module                  |  2 +-
 modules/user/user.module             |  2 +-
 modules/watchdog.module              |  2 +-
 modules/watchdog/watchdog.module     |  2 +-
 23 files changed, 33 insertions(+), 86 deletions(-)

diff --git a/includes/pager.inc b/includes/pager.inc
index c48e11d0425f..98ffd4613ead 100644
--- a/includes/pager.inc
+++ b/includes/pager.inc
@@ -57,24 +57,6 @@ function pager_query($query, $limit = 10, $element = 0, $count_query = "") {
   return db_query_range($query, (int)$pager_from_array[$element], (int)$limit);
 
 }
-
-/**
- * Use this function in your module or theme to display a pager.
- *
- * @param $tags defines your buttons; text or img.
- * @param $limit how many nodes are displayed per page
- * @param $element support for multiple pagers per page (specify which this
- *   is)
- * @param $type allows for distinction between pagers on main page and admin
- *   page, etc. Supported types are "default", "admin" and "simple".
- * @param $attributes extra html attributes for \<a href> (eg. title,
- *   onMouseOver, etc.)
- *
- * @return string html of pager
- */
-function pager_display($tags = "", $limit = 10, $element = 0, $type = "default", $attributes = array()) {
-  return theme("pager_display_". $type, $tags, $limit, $element, $attributes);
-}
 /** @} End of defgroup pager_api */
 
 /**
@@ -83,13 +65,10 @@ function pager_display($tags = "", $limit = 10, $element = 0, $type = "default",
  */
 
 /**
- * DEFAULT PAGER: When writing themes, you can rewrite this pager function in
- * your theme. This is the most common pager type, and thus the main one to
- * re-write in your theme.
- *
- * @see pager_display
+ * When writing themes, you can rewrite this pager function in your theme.
+ * You need to call theme("pager", ...) to get a pager.
  */
-function theme_pager_display_default($tags = "", $limit = 10, $element = 0, $attributes = array()) {
+function theme_pager($tags = "", $limit = 10, $element = 0, $attributes = array()) {
   global $pager_total;
   if ($pager_total[$element] > $limit) {
     $output .= "<div id=\"pager\" class=\"container-inline\">";
@@ -103,38 +82,6 @@ function theme_pager_display_default($tags = "", $limit = 10, $element = 0, $att
     return $output;
   }
 }
-
-/**
- * SIMPLE PAGER: When writing themes, you can rewrite this pager function in
- * your theme. Keep in mind that the pager it defines is intended to have a
- * "simple" look, possibly located in a table or block.
- *
- * @see pager_display
- */
-function theme_pager_display_simple($tags = "", $limit = 10, $element = 0, $attributes = array()) {
-  /*
-  ** It's left as an exercise to theme writers to create an alternative
-  ** pager for pager_display_simple().  if your theme does not offer a
-  ** replacement, the theme.inc pager_display_default() is used.
-  */
-  return theme_pager_display_default($tags, $limit, $element, $attributes);
-}
-
-/**
- * ADMIN PAGER: When writing themes, you can rewrite this pager function in your
- * theme. Most themes will probably NOT re-write this function, as admin pages
- * are not normally themed.
- *
- * @see pager_display
- */
-function theme_pager_display_admin($tags = "", $limit = 10, $element = 0, $attributes = array()) {
-  /*
-  ** It's left as an exercise to theme writers to create an alternative
-  ** pager for pager_display_admin().  if your theme does not offer a
-  ** replacement, the pager.inc pager_display_default() is used.
-  */
-  return theme_pager_display_default($tags, $limit, $element, $attributes);
-}
 /** @} End of addtogroup themeable */
 
 /**
diff --git a/modules/blog.module b/modules/blog.module
index 90c9e7d609cd..3eef093949cb 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -122,7 +122,7 @@ function blog_page_user($uid) {
   while ($node = db_fetch_object($result)) {
     $output .= node_view(node_load(array("nid" => $node->nid)), 1);
   }
-  $output .= pager_display(NULL, variable_get("default_nodes_main", 10));
+  $output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
   $output .= "<div class=\"xml-icon\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>";
 
   print theme("page", $output, $title);
@@ -138,7 +138,7 @@ function blog_page_last() {
   while ($node = db_fetch_object($result)) {
     $output .= node_view(node_load(array("nid" => $node->nid)), 1);
   }
-  $output .= pager_display(NULL, variable_get("default_nodes_main", 10));
+  $output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
   $output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."</div>";
 
   print theme("page", $output);
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 90c9e7d609cd..3eef093949cb 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -122,7 +122,7 @@ function blog_page_user($uid) {
   while ($node = db_fetch_object($result)) {
     $output .= node_view(node_load(array("nid" => $node->nid)), 1);
   }
-  $output .= pager_display(NULL, variable_get("default_nodes_main", 10));
+  $output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
   $output .= "<div class=\"xml-icon\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>";
 
   print theme("page", $output, $title);
@@ -138,7 +138,7 @@ function blog_page_last() {
   while ($node = db_fetch_object($result)) {
     $output .= node_view(node_load(array("nid" => $node->nid)), 1);
   }
-  $output .= pager_display(NULL, variable_get("default_nodes_main", 10));
+  $output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
   $output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."</div>";
 
   print theme("page", $output);
diff --git a/modules/comment.module b/modules/comment.module
index 34e5f039a674..635b7048771d 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -743,7 +743,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 = pager_display(NULL, $comments_per_page, 0, "default", array("comments_per_page" => $comments_per_page))) {
+      if ($pager = theme("pager", NULL, $comments_per_page, 0, array("comments_per_page" => $comments_per_page))) {
         $output .= $pager;
       }
 
@@ -994,7 +994,7 @@ function comment_admin_overview($status = 0) {
     $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("mark") : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid"));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 6));
   }
 
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 34e5f039a674..635b7048771d 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -743,7 +743,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 = pager_display(NULL, $comments_per_page, 0, "default", array("comments_per_page" => $comments_per_page))) {
+      if ($pager = theme("pager", NULL, $comments_per_page, 0, array("comments_per_page" => $comments_per_page))) {
         $output .= $pager;
       }
 
@@ -994,7 +994,7 @@ function comment_admin_overview($status = 0) {
     $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("mark") : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid"));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 6));
   }
 
diff --git a/modules/forum.module b/modules/forum.module
index 23c545f8a14b..d2bbbdc544eb 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -617,7 +617,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset
       }
     }
 
-    if ($pager = pager_display(NULL, $forum_per_page, 0, "default", tablesort_pager())) {
+    if ($pager = theme("pager", NULL, $forum_per_page, 0, tablesort_pager())) {
       $rows[] = array(array("data" => $pager, "colspan" => "5", "class" => "pager"));
     }
   }
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 23c545f8a14b..d2bbbdc544eb 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -617,7 +617,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset
       }
     }
 
-    if ($pager = pager_display(NULL, $forum_per_page, 0, "default", tablesort_pager())) {
+    if ($pager = theme("pager", NULL, $forum_per_page, 0, tablesort_pager())) {
       $rows[] = array(array("data" => $pager, "colspan" => "5", "class" => "pager"));
     }
   }
diff --git a/modules/locale.module b/modules/locale.module
index 1e047cb79311..29c619798e9b 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -229,7 +229,7 @@ function locale_seek() {
       }
     }
 
-    if ($pager = pager_display(NULL, 50, 0, "admin", $request)) {
+    if ($pager = theme("pager", NULL, 50, 0, $request)) {
       $rows[] = array(array("data" => "$pager", "colspan" => "5"));
     }
 
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 1e047cb79311..29c619798e9b 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -229,7 +229,7 @@ function locale_seek() {
       }
     }
 
-    if ($pager = pager_display(NULL, 50, 0, "admin", $request)) {
+    if ($pager = theme("pager", NULL, 50, 0, $request)) {
       $rows[] = array(array("data" => "$pager", "colspan" => "5"));
     }
 
diff --git a/modules/node.module b/modules/node.module
index 12e2e6197c00..5dbca8e6031e 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -694,7 +694,7 @@ function node_admin_nodes() {
     $rows[] = array(form_checkbox(NULL, "status][$node->nid", 1, 0), l($node->title, "node/view/$node->nid") ." ". (node_is_new($node->nid, $node->changed) ? theme_mark() : ""), module_invoke($node->type, "node", "name"), format_name($node), ($node->status ? t("published") : t("not published")), l(t("edit node"), "admin/node/edit/$node->nid"), l(t("delete node"), "admin/node/delete/$node->nid"));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin")) {
+  if ($pager = theme("pager", NULL, 50, 0)) {
     $rows[] = array(array("data" => $pager, "colspan" => 7));
   }
 
diff --git a/modules/node/node.module b/modules/node/node.module
index 12e2e6197c00..5dbca8e6031e 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -694,7 +694,7 @@ function node_admin_nodes() {
     $rows[] = array(form_checkbox(NULL, "status][$node->nid", 1, 0), l($node->title, "node/view/$node->nid") ." ". (node_is_new($node->nid, $node->changed) ? theme_mark() : ""), module_invoke($node->type, "node", "name"), format_name($node), ($node->status ? t("published") : t("not published")), l(t("edit node"), "admin/node/edit/$node->nid"), l(t("delete node"), "admin/node/delete/$node->nid"));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin")) {
+  if ($pager = theme("pager", NULL, 50, 0)) {
     $rows[] = array(array("data" => $pager, "colspan" => 7));
   }
 
diff --git a/modules/path.module b/modules/path.module
index 86039a68406a..91d0b904a1ad 100644
--- a/modules/path.module
+++ b/modules/path.module
@@ -204,7 +204,7 @@ function path_overview() {
     $rows[] = array($data->dst, $data->src, l(t("edit"), "admin/path/edit/$data->pid"), l(t("delete"), "admin/path/delete/$data->pid"));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => "4"));
   }
 
diff --git a/modules/path/path.module b/modules/path/path.module
index 86039a68406a..91d0b904a1ad 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -204,7 +204,7 @@ function path_overview() {
     $rows[] = array($data->dst, $data->src, l(t("edit"), "admin/path/edit/$data->pid"), l(t("delete"), "admin/path/delete/$data->pid"));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => "4"));
   }
 
diff --git a/modules/statistics.module b/modules/statistics.module
index 2579261d4b18..d4e8efb4ed2c 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -232,7 +232,7 @@ function statistics_admin_topnodes_table() {
   while ($nid = db_fetch_array($result)) {
     $rows[] = array(l($nid["title"], "node/view/". $nid["nid"], array("title" => t("View this posting."))), $nid["daycount"], $nid["totalcount"], format_date($nid["timestamp"], "small"), l("track node", "admin/statistics/log/node/$nid[nid]"));
   }
-  if ($pager = pager_display(NULL, 20, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 20, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 5));
   }
 
@@ -291,7 +291,7 @@ function statistics_admin_accesslog_table($type, $id) {
     $rows[] = array(array("data" => format_date($log->timestamp, "small"), "nowrap" => "nowrap"), ($log->nid ? l($log->title, "node/view/$log->nid") : message_na()), format_name($user), $log->hostname ? $log->hostname : message_na(), $url, ($log->nid ? l(t("track node"), "admin/statistics/log/node/$log->nid") : ""), ($user->uid ? l(t("track user"), "admin/statistics/log/user/$user->uid") : ""), ($log->hostname ? l(t("track host"), "admin/statistics/log/host/$log->hostname") : ""));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 8));
   }
 
@@ -332,7 +332,7 @@ function statistics_top_refer() {
   while ($referrer = db_fetch_array($result)) {
     $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr($referrer["url"], 0, 100) ."</a>", format_date($referrer["last_view"], "small"), $referrer["count"]);
   }
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 3));
   }
 
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 2579261d4b18..d4e8efb4ed2c 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -232,7 +232,7 @@ function statistics_admin_topnodes_table() {
   while ($nid = db_fetch_array($result)) {
     $rows[] = array(l($nid["title"], "node/view/". $nid["nid"], array("title" => t("View this posting."))), $nid["daycount"], $nid["totalcount"], format_date($nid["timestamp"], "small"), l("track node", "admin/statistics/log/node/$nid[nid]"));
   }
-  if ($pager = pager_display(NULL, 20, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 20, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 5));
   }
 
@@ -291,7 +291,7 @@ function statistics_admin_accesslog_table($type, $id) {
     $rows[] = array(array("data" => format_date($log->timestamp, "small"), "nowrap" => "nowrap"), ($log->nid ? l($log->title, "node/view/$log->nid") : message_na()), format_name($user), $log->hostname ? $log->hostname : message_na(), $url, ($log->nid ? l(t("track node"), "admin/statistics/log/node/$log->nid") : ""), ($user->uid ? l(t("track user"), "admin/statistics/log/user/$user->uid") : ""), ($log->hostname ? l(t("track host"), "admin/statistics/log/host/$log->hostname") : ""));
   }
 
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 8));
   }
 
@@ -332,7 +332,7 @@ function statistics_top_refer() {
   while ($referrer = db_fetch_array($result)) {
     $rows[] = array("<a href=\"". $referrer["url"] ."\">". substr($referrer["url"], 0, 100) ."</a>", format_date($referrer["last_view"], "small"), $referrer["count"]);
   }
-  if ($pager = pager_display(NULL, 50, 0, "admin", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 50, 0, tablesort_pager())) {
     $rows[] = array(array("data" => $pager, "colspan" => 3));
   }
 
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index 6274798b11b6..dd31cc688280 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -688,7 +688,7 @@ function taxonomy_render_nodes($result) {
   while ($node = db_fetch_object($result)) {
     $output .= node_view(node_load(array("nid" => $node->nid, "type" => $node->type)), 1);
   }
-  $output .= pager_display(NULL, variable_get("default_nodes_main", 10), 0);
+  $output .= theme("pager", NULL, variable_get("default_nodes_main", 10), 0);
   return $output;
 }
 
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 6274798b11b6..dd31cc688280 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -688,7 +688,7 @@ function taxonomy_render_nodes($result) {
   while ($node = db_fetch_object($result)) {
     $output .= node_view(node_load(array("nid" => $node->nid, "type" => $node->type)), 1);
   }
-  $output .= pager_display(NULL, variable_get("default_nodes_main", 10), 0);
+  $output .= theme("pager", NULL, variable_get("default_nodes_main", 10), 0);
   return $output;
 }
 
diff --git a/modules/tracker.module b/modules/tracker.module
index b75096f8d85a..75373a1ca2f2 100644
--- a/modules/tracker.module
+++ b/modules/tracker.module
@@ -79,7 +79,7 @@ function tracker_posts($id = 0) {
     $rows[] = array(array("data" => $type, "class" => "type"), array("data" => $title . $comments, "class" => "content"), array("data" => $author, "class" => "author"), array("data" => format_date($node->last_activity, "small"), "class" => "last_post"));
   }
 
-  if ($pager = pager_display(NULL, 10, 0, "default", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 10, 0, tablesort_pager())) {
    $rows[] = array(array("data" => $pager, "colspan" => 4));
   }
 
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module
index b75096f8d85a..75373a1ca2f2 100644
--- a/modules/tracker/tracker.module
+++ b/modules/tracker/tracker.module
@@ -79,7 +79,7 @@ function tracker_posts($id = 0) {
     $rows[] = array(array("data" => $type, "class" => "type"), array("data" => $title . $comments, "class" => "content"), array("data" => $author, "class" => "author"), array("data" => format_date($node->last_activity, "small"), "class" => "last_post"));
   }
 
-  if ($pager = pager_display(NULL, 10, 0, "default", tablesort_pager())) {
+  if ($pager = theme("pager", NULL, 10, 0, tablesort_pager())) {
    $rows[] = array(array("data" => $pager, "colspan" => 4));
   }
 
diff --git a/modules/user.module b/modules/user.module
index 185781be23f4..c101f634756d 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -1479,7 +1479,7 @@ function user_admin_account() {
     $rows[] = array($account->uid, format_name($account), $status[$account->status], $account->rolename, format_date($account->timestamp, "small"), l(t("edit account"), "admin/user/edit/$account->uid"));
   }
 
-  $pager = pager_display(NULL, 50, 0, "admin", tablesort_pager());
+  $pager = theme("pager", NULL, 50, 0, tablesort_pager());
   if (!empty($pager)) {
     $rows[] = array(array("data" => $pager, "colspan" => 6));
   }
diff --git a/modules/user/user.module b/modules/user/user.module
index 185781be23f4..c101f634756d 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1479,7 +1479,7 @@ function user_admin_account() {
     $rows[] = array($account->uid, format_name($account), $status[$account->status], $account->rolename, format_date($account->timestamp, "small"), l(t("edit account"), "admin/user/edit/$account->uid"));
   }
 
-  $pager = pager_display(NULL, 50, 0, "admin", tablesort_pager());
+  $pager = theme("pager", NULL, 50, 0, tablesort_pager());
   if (!empty($pager)) {
     $rows[] = array(array("data" => $pager, "colspan" => 6));
   }
diff --git a/modules/watchdog.module b/modules/watchdog.module
index 4a80c2a91b4e..479b52cd2184 100644
--- a/modules/watchdog.module
+++ b/modules/watchdog.module
@@ -98,7 +98,7 @@ function watchdog_overview($type) {
     $rows[] = array(array("data" => t("No log messages available."), "colspan" => "5"));
   }
 
-  $pager = pager_display(NULL, 50, 0, "admin", tablesort_pager());
+  $pager = theme("pager", NULL, 50, 0, tablesort_pager());
   if (!empty($pager)) {
     $rows[] = array(array("data" => $pager, "colspan" => "5"));
   }
diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module
index 4a80c2a91b4e..479b52cd2184 100644
--- a/modules/watchdog/watchdog.module
+++ b/modules/watchdog/watchdog.module
@@ -98,7 +98,7 @@ function watchdog_overview($type) {
     $rows[] = array(array("data" => t("No log messages available."), "colspan" => "5"));
   }
 
-  $pager = pager_display(NULL, 50, 0, "admin", tablesort_pager());
+  $pager = theme("pager", NULL, 50, 0, tablesort_pager());
   if (!empty($pager)) {
     $rows[] = array(array("data" => $pager, "colspan" => "5"));
   }
-- 
GitLab