From: fidian Date: Sun, 4 Feb 2001 01:56:08 +0000 (+0000) Subject: Fixed "Select All" link problem for searches. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=323218d76c3821b2d49b1e0fa614e619fc0a6f14 Fixed "Select All" link problem for searches. Made Select/Unselect All link a function, so we can put it at the bottom of searches too. Made Select/Unselect All link to the current page instead of hardcoding it. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1051 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 1e4b69c8..f52cd122 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -463,10 +463,7 @@ echo '
'; echo "$More\n"; if (!$startMessage) $startMessage=1; - if ( $checkall == '1') - echo "\n" . _("Unselect All") . "\n"; - else - echo "\n" . _("Select All") . "\n"; + ShowSelectAllLink($startMessage, $sort); echo '
'; echo ''; @@ -501,10 +498,7 @@ echo ""; echo '
'; echo "$More\n"; - if ( $checkall == '1') - echo "\n" . _("Unselect All") . "\n"; - else - echo "\n" . _("Select All") . "\n"; + ShowSelectAllLink($startMessage, $sort); echo '
'; echo ''; @@ -605,4 +599,25 @@ } echo "\n"; } + + function ShowSelectAllLink($startMessage, $sort) + { + global $checkall, $PHP_SELF, $what, $where, $mailbox; + + echo "\n"; + if (isset($checkall) && $checkall == '1') + echo _("Unselect All"); + else + echo _("Select All"); + echo "\n"; + } + ?>