Browse Source

Bugfix: Now special folders from sent subfolders plugin are correctly
recognized.

philippe_mingo 23 years ago
parent
commit
137f07afc6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      functions/imap_mailbox.php

+ 2 - 2
functions/imap_mailbox.php

@@ -24,11 +24,11 @@ function isSpecialMailbox( $box ) {
     if ( $move_to_sent  ) {
     if ( $move_to_sent  ) {
         $i = strpos( $sent_folder, $delimiter, strlen( $folder_prefix ) );
         $i = strpos( $sent_folder, $delimiter, strlen( $folder_prefix ) );
     }
     }
-     
+     // echo '[' . substr( $sent_folder, 0, $i ) . '] (' . $box . ')'; 
     $ret = ( (strtolower($box) == 'inbox') ||
     $ret = ( (strtolower($box) == 'inbox') ||
              ($box == $trash_folder &&
              ($box == $trash_folder &&
               $move_to_trash) ||
               $move_to_trash) ||
-             ( substr( $sent_folder, 0, max( $i, strlen( $box ) ) ) == $box &&
+             ( substr( $sent_folder, 0, $i ) == substr( $box, 0, $i ) &&
               $move_to_sent) ||
               $move_to_sent) ||
              ($box == $draft_folder &&
              ($box == $draft_folder &&
               $save_as_draft) );
               $save_as_draft) );