From: stekkel Date: Thu, 14 Nov 2002 10:29:30 +0000 (+0000) Subject: fix for checking specialmailboxes. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=92fa9f52e412d8978ce09438c0792d2d29f03bb6;p=squirrelmail.git fix for checking specialmailboxes. This solves the problem when a special mailbox isn't set and IsBoxBelow gives a warning git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4145 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 0cae7082..2e92dd27 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -136,14 +136,13 @@ function isSpecialMailbox( $box ) { $move_to_trash, $move_to_sent, $save_as_draft; $ret = ( (strtolower($box) == 'inbox') || - ( $move_to_trash && isBoxBelow( $box, $trash_folder ) ) || - ( $move_to_sent && isBoxBelow( $box, $sent_folder )) || + ( $move_to_trash && $trash_folder && isBoxBelow( $box, $trash_folder )) || + ( $move_to_sent && $sent_folder && isBoxBelow( $box, $sent_folder )) || ($save_as_draft && $box == $draft_folder ) ); if ( !$ret ) { $ret = do_hook_function( 'special_mailbox', $box ); } - return $ret; }