From 794d59c03f4269cdbb49e0789e94a9368a7b0a24 Mon Sep 17 00:00:00 2001 From: jmunro Date: Wed, 17 Apr 2002 18:52:22 +0000 Subject: [PATCH] fixed for changes to conf.pl. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2748 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 20 ++++++++++---------- src/options_display.php | 2 +- src/read_body.php | 16 ++++++++-------- src/right_main.php | 2 +- src/search.php | 4 ++-- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 5458024c..1e1fd417 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -257,7 +257,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs, } } - if ($allow_server_sort == 'true' && $thread_sort_messages != 1) { + if ($allow_server_sort == TRUE && $thread_sort_messages != 1) { $server_sort_order = $sort; $id = sqimap_get_sort_order($imapConnection, $server_sort_order); if ($id == 'no') { @@ -265,7 +265,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs, 'is not supported by your IMAP server.
Please report this'. ' to the system administrator.'; $sort = $server_sort_order; - $allow_server_sort = false; + $allow_server_sort = FALSE; $id = array(); } else { @@ -292,7 +292,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs, if ($sort < 6 ) { $id = range(1, $num_msgs); } - elseif ($thread_sort_messages != 1 && $allow_server_sort != 'true' && $sort == 6) { + elseif ($thread_sort_messages != 1 && $allow_server_sort != TRUE && $sort == 6) { /* if it's not sorted */ if ($start_msg + ($show_num - 1) < $num_msgs){ $end_msg = $start_msg + ($show_num - 1); @@ -456,7 +456,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs, } } session_register('msort'); - } elseif ($thread_sort_messages == 1 || $allow_server_sort == 'true') { + } elseif ($thread_sort_messages == 1 || $allow_server_sort == TRUE) { $msort = $msgs; session_unregister('msgs'); session_register('msort'); @@ -673,7 +673,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, . " \n"; /* draws thread sorting links */ - if ($allow_thread_sort == 'true') { + if ($allow_thread_sort == TRUE) { if ($thread_sort_messages == 1 ) { $set_thread = 2; $thread_name = 'Unthread View'; @@ -705,7 +705,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, * instead. but here we reset sort for a bit * since its easy */ - if ($allow_server_sort == 'true') { + if ($allow_server_sort == TRUE) { $sort = $server_sort_order; } /* Print the headers. */ @@ -721,21 +721,21 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, } else { echo ' ' . _("From") . ''; } - if ($allow_thread_sort != 'true' || $thread_sort_messages != 1) { + if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 2, 3); } echo "\n"; break; case 3: /* date */ echo ' ' . _("Date") . ''; - if ($allow_thread_sort != 'true' || $thread_sort_messages != 1) { + if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 0, 1); } echo "\n"; break; case 4: /* subject */ echo ' ' . _("Subject") . ' '; - if ($allow_thread_sort != 'true' || $thread_sort_messages != 1) { + if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 4, 5); } echo "\n"; @@ -748,7 +748,7 @@ function mail_message_listing_beginning ($imapConnection, $moveURL, /* if using server-sorting, * send sort back to 6 */ - if ($allow_server_sort == 'true') { + if ($allow_server_sort == TRUE) { $sort = 6; } echo "\n"; diff --git a/src/options_display.php b/src/options_display.php index f009b0c1..a4714406 100644 --- a/src/options_display.php +++ b/src/options_display.php @@ -281,7 +281,7 @@ function load_optpage_data_display() { 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_ALL ); - if ($allow_thread_sort == 'true') { + if ($allow_thread_sort == TRUE) { $optvals[SMOPT_GRP_MESSAGE][] = array( 'name' => 'sort_by_ref', 'caption' => _("Use References header for thread sort"), diff --git a/src/read_body.php b/src/read_body.php index 477cacbd..4b7b1a28 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -32,10 +32,10 @@ function findNextMessage() { $server_sort_array; if (!is_array($server_sort_array)) { $thread_sort_messages = 0; - $allow_server_sort = 'false'; + $allow_server_sort = FALSE; } $result = -1; - if ($thread_sort_messages == 1 || $allow_server_sort == 'true') { + if ($thread_sort_messages == 1 || $allow_server_sort == TRUE) { reset($server_sort_array); while(list($key, $value) = each ($server_sort_array)) { if ($currentArrayIndex == $value) { @@ -48,13 +48,13 @@ function findNextMessage() { } } } - elseif ($sort == 6 && $allow_server_sort != 'true' && + elseif ($sort == 6 && $allow_server_sort != TRUE && $thread_sort_messages != 1) { if ($currentArrayIndex != 1) { $result = $currentArrayIndex - 1; } } - elseif ($allow_server_sort != 'true' && $thread_sort_messages != 1 ) { + elseif ($allow_server_sort != TRUE && $thread_sort_messages != 1 ) { if (!is_array($msort)) { return -1; } @@ -95,9 +95,9 @@ function findPreviousMessage() { $result = -1; if (!is_array($server_sort_array)) { $thread_sort_messages = 0; - $allow_server_sort = 'false'; + $allow_server_sort = FALSE; } - if ($thread_sort_messages == 1 || $allow_server_sort == 'true') { + if ($thread_sort_messages == 1 || $allow_server_sort == TRUE) { reset($server_sort_array); while(list($key, $value) = each ($server_sort_array)) { if ($currentArrayIndex == $value) { @@ -110,14 +110,14 @@ function findPreviousMessage() { } } } - elseif ($sort == 6 && $allow_server_sort != 'true' && + elseif ($sort == 6 && $allow_server_sort != TRUE && $thread_sort_messages != 1) { $numMessages = sqimap_get_num_messages($imapConnection, $mailbox); if ($currentArrayIndex != $numMessages) { $result = $currentArrayIndex + 1; } } - elseif ($thread_sort_messages != 1 && $allow_server_sort != 'true') { + elseif ($thread_sort_messages != 1 && $allow_server_sort != TRUE) { if (!is_array($msort)) { return -1; } diff --git a/src/right_main.php b/src/right_main.php index 306bbdd0..2d5d2bdb 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -81,7 +81,7 @@ if ($imap_server_type == 'uw' && (strstr($mailbox, '../') || /* decide if we are thread sorting or not */ global $allow_thread_sort; -if ($allow_thread_sort == 'true') { +if ($allow_thread_sort == TRUE) { if (isset($set_thread)) { if ($set_thread == 1) { setPref($data_dir, $username, "thread_$mailbox", 1); diff --git a/src/search.php b/src/search.php index a31a5c9b..3d49744e 100644 --- a/src/search.php +++ b/src/search.php @@ -368,9 +368,9 @@ do_hook('search_after_form'); */ $old_value = 0; -if ($allow_thread_sort == true) { +if ($allow_thread_sort == TRUE) { $old_value = $allow_thread_sort; - $allow_thread_sort = false; + $allow_thread_sort = FALSE; } if ($search_all == 'all') { -- 2.25.1