From: Jonathan A. <jan...@us...> - 2005-08-25 16:02:20
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16812/functions Modified Files: Tag: SM-1_4-STABLE mailbox_display.php Log Message: "Toggle All" and "Select All" links pointless if there is no messages. Index: mailbox_display.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mailbox_display.php,v retrieving revision 1.321.2.26 retrieving revision 1.321.2.27 diff -u -w -r1.321.2.26 -r1.321.2.27 --- mailbox_display.php 9 Apr 2005 17:41:06 -0000 1.321.2.26 +++ mailbox_display.php 25 Aug 2005 16:02:12 -0000 1.321.2.27 @@ -491,8 +491,12 @@ $start_msg = $res[0]; $end_msg = $res[1]; + if ($num_msg > 0) { $paginator_str = get_paginator_str($mailbox, $start_msg, $end_msg, $num_msgs, $show_num, $sort); + } else { + $paginator_str = ''; + } $msg_cnt_str = get_msgcnt_str($start_msg, $end_msg, $num_msgs); @@ -687,9 +691,9 @@ if (!isset($msg)) { $msg = ''; } - $moveFields = '<input type="hidden" name="msg" value="'.htmlspecialchars($msg).'">' . - '<input type="hidden" name="mailbox" value="'.htmlspecialchars($mailbox).'">' . - '<input type="hidden" name="startMessage" value="'.htmlspecialchars($start_msg).'">'; + $moveFields = '<input type="hidden" name="msg" value="'.htmlspecialchars($msg).'">' . "\n" . + '<input type="hidden" name="mailbox" value="'.htmlspecialchars($mailbox).'">' . "\n" . + '<input type="hidden" name="startMessage" value="'.htmlspecialchars($start_msg).'">' . "\n"; // $moveURL = "move_messages.php?msg=$msg&mailbox=$urlMailbox" // . "&startMessage=$start_msg"; @@ -700,8 +704,11 @@ $safe_name = preg_replace("/[^0-9A-Za-z_]/", '_', $mailbox); $form_name = "FormMsgs" . $safe_name; echo '<form name="' . $form_name . '" method="post" action="move_messages.php">' ."\n" - . $moveFields - . html_tag( 'table' , + . $moveFields . "\n"; + + if (!empty($paginator) && !empty($msg_cnt_str)) { + + echo html_tag( 'table' , html_tag( 'tr', html_tag( 'td' , html_tag( 'table' , @@ -713,8 +720,9 @@ , 'left', '', '' ) , '', $color[0] ) , '', '', 'border="0" width="100%" cellpadding="1" cellspacing="0"' ); + } /* line between header and button area */ - echo '<tr><td HEIGHT="5" BGCOLOR="'.$color[4].'"></td></tr>'; + echo '</td></tr><tr><td HEIGHT="5" BGCOLOR="'.$color[4].'"></td></tr>'; echo '<tr><td>'; echo html_tag( 'tr' ) . "\n" |