Fixed the paginator (which I previously broke)...
authorthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 5 Nov 2001 02:17:08 +0000 (02:17 +0000)
committerthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 5 Nov 2001 02:17:08 +0000 (02:17 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1691 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index 361373da78b7930e63380aa3c73333a8c8c4bee8..3cad43f9108f383c4b47d462956da2e547cfe4b7 100644 (file)
       do_hook('mailbox_index_before');
 
       $msg_cnt_str = get_msgcnt_str($start_msg, $end_msg, $num_msgs);
-      $paginator_str = get_paginator_str($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num);
+      $paginator_str = get_paginator_str($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num, $sort);
 
       if (! isset($msg)) {
           $msg = '';
      * This function computes the paginator string.
      */
     function get_paginator_str
-    ($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num) {
+    ($urlMailbox, $start_msg, $end_msg, $num_msgs, $show_num, $sort) {
+        global $username, $data_dir, $use_mailbox_cache;
+
         $nextGroup = $start_msg + $show_num;
         $prevGroup = $start_msg - $show_num;
 
                 $j++;
             }
             $start_msgs = min( $start_msgs, $num_msgs );
-            $p = intval( $start_msgs / $show_num ) + 1;
+            $p = intval( $start_msg / $show_num ) + 1;
             $i = 1;
             while( $i < $p ) {
                 $pg = intval( $i );
                 $start = ( ($pg-1) * $show_num ) + 1;
                 $mMore .= "<a href=\"right_main.php?use_mailbox_cache=$use_mailbox_cache&startMessage=$start" .
-                          "&mailbox=$urlMailbox\" TARGET=\"right\">$pg</a> ";
+                          "&mailbox=$urlMailbox\" TARGET=\"right\">$pg</a>&nbsp;";
                 $i += $k;
             }
-            $mMore .= "<b>$p</b> ";
+            $mMore .= "<B>$p</B>&nbsp;";
             $i += $k;
             while( $i <= $j ) {
                $pg = intval( $i );
                $start = ( ($pg-1) * $show_num ) + 1;
                $mMore .= "<a href=\"right_main.php?use_mailbox_cache=$use_mailbox_cache&startMessage=$start"
-                       . "&mailbox=$urlMailbox\" TARGET=\"right\">$pg</a> ";
+                       . "&mailbox=$urlMailbox\" TARGET=\"right\">$pg</a>&nbsp;";
                $i+=$k;
             }
-            $mMore .= ' | ';
+            $mMore .= '&nbsp;|&nbsp;';
         }
 
         /* Return the resulting string. */