--- includes/pager.inc	2004-09-09 06:51:08.000000000 +0100
+++ includes/pager.inc.new	2004-11-10 15:15:50.000000000 +0000
@@ -294,31 +294,49 @@
 
   // When there is more than one page, create the pager list.
   if ($i != $pager_max) {
-    $output = $text;
+    $output[] = $text;
     if ($i > 1) {
-      $output .= '... ';
+      $output[] = '... ';
     }
 
     // Now generate the actual pager piece.
     for (; $i <= $pager_last && $i <= $pager_max; $i++) {
       if ($i < $pager_current) {
-        $output .= pager_previous($i, $limit, $element, ($pager_current - $i), $attributes) ." ";
+        $output[] = pager_previous($i, $limit, $element, ($pager_current - $i), $attributes) ." ";
       }
       if ($i == $pager_current) {
-        $output .= '<strong>'. $i .'</strong> ';
+        $output[] = $i;
       }
       if ($i > $pager_current) {
-        $output .= pager_next($i, $limit, $element, ($i - $pager_current), $attributes) ." ";
+        $output[] = pager_next($i, $limit, $element, ($i - $pager_current), $attributes) ." ";
       }
     }
 
     if ($i < $pager_max) {
-      $output .= '...';
+      $output[] = '...';
     }
   }
 
+  return theme('pager_list', $output);
+}
+
+
+/**
+ * Format a themed pager_list
+ * @param $pager_list
+ *   an array with the pager items
+ */
+function theme_pager_list($pager_list) {
+  if( !empty($pager_list )) {
+    $output = '<ul class="pager">';
+    foreach( $pager_list as $pager_item ) {
+      $output .= '<li>'.$pager_item.'</li>';
+    }
+    $output .='</ul>';
+  }
   return $output;
 }
+
 /**
  * @} End of "Pager pieces".
  */
al[$element]) {
-    return "<a href=\"". pager_link($from_new, $attributes) ."\">$text</a>";
+    return "<a href=\"". pager_link($from_new, $element, $attributes) ."\">$text</a>";
   }
   return " ";
 }
@@ -281,18 +281,20 @@ function pager_list($limit, $element = 0
 }
 /* @} End of member group pager pieces */
 
-function pager_link($from_new, $attributes = array()) {
+function pager_link($from_new, $element, $attributes = array()) {
   $q = $_GET["q"];
+  $from = $_GET["from"];
 
   foreach($attributes as $key => $value) {
     $query[] = "$key=$value";
   }
 
+  $from_new = pager_load_array($from_new[$element], $element, explode("," ,$from));
   if (count($attributes)) {
-    $url = url($q, "from=". $from_new[0] ."&amp;". implode("&amp;", $query));
+    $url = url($q, "from=". implode($from_new, ",") ."&amp;". implode("&amp;", $query));
   }
   else {
-    $url = url($q, "from=". $from_new[0]);
+    $url = url($q, "from=". implode($from_new, ","));
   }
 
   return $url;
