Bugfix: Now special folders from sent subfolders plugin are correctly
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 17 Jan 2002 13:45:06 +0000 (13:45 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 17 Jan 2002 13:45:06 +0000 (13:45 +0000)
recognized.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2150 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php

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