ソースを参照

fix for checking specialmailboxes.
This solves the problem when a special mailbox isn't set and IsBoxBelow
gives a warning

stekkel 22 年 前
コミット
44fd88a40a
1 ファイル変更2 行追加3 行削除
  1. 2 3
      functions/imap_mailbox.php

+ 2 - 3
functions/imap_mailbox.php

@@ -136,14 +136,13 @@ function isSpecialMailbox( $box ) {
            $move_to_trash, $move_to_sent, $save_as_draft;
            $move_to_trash, $move_to_sent, $save_as_draft;
 
 
     $ret = ( (strtolower($box) == 'inbox') ||
     $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 ) );
              ($save_as_draft && $box == $draft_folder ) );
 
 
     if ( !$ret ) {
     if ( !$ret ) {
         $ret = do_hook_function( 'special_mailbox', $box );
         $ret = do_hook_function( 'special_mailbox', $box );
     }
     }
-
     return $ret;
     return $ret;
 }
 }