}
}
- 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') {
'is not supported by your IMAP server.<br>Please report this'.
' to the system administrator.</center></small></b>';
$sort = $server_sort_order;
- $allow_server_sort = false;
+ $allow_server_sort = FALSE;
$id = array();
}
else {
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);
}
}
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');
. " </TR>\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';
* 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. */
} else {
echo ' <TD WIDTH="25%"><B>' . _("From") . '</B>';
}
- if ($allow_thread_sort != 'true' || $thread_sort_messages != 1) {
+ if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) {
ShowSortButton($sort, $mailbox, 2, 3);
}
echo "</TD>\n";
break;
case 3: /* date */
echo ' <TD NOWRAP WIDTH="5%"><B>' . _("Date") . '</B>';
- if ($allow_thread_sort != 'true' || $thread_sort_messages != 1) {
+ if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) {
ShowSortButton($sort, $mailbox, 0, 1);
}
echo "</TD>\n";
break;
case 4: /* subject */
echo ' <TD><B>' . _("Subject") . '</B> ';
- if ($allow_thread_sort != 'true' || $thread_sort_messages != 1) {
+ if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) {
ShowSortButton($sort, $mailbox, 4, 5);
}
echo "</TD>\n";
/* if using server-sorting,
* send sort back to 6
*/
- if ($allow_server_sort == 'true') {
+ if ($allow_server_sort == TRUE) {
$sort = 6;
}
echo "</TR>\n";
'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"),
$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) {
}
}
}
- 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;
}
$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) {
}
}
}
- 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;
}
/* 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);
*/
$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') {