From: Jason M. <jm...@us...> - 2002-06-11 14:56:42
|
Update of /cvsroot/squirrelmail/squirrelmail/config In directory usw-pr-cvs1:/tmp/cvs-serv10037/config Modified Files: Tag: SM-1_2-STABLE conf.pl config_default.php Log Message: This makes the "%" in the LSUB command when getting the folder list optional. The default is to not use it as it does not work with several IMAP servers. see patch #452178. Index: conf.pl =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/config/conf.pl,v retrieving revision 1.118 retrieving revision 1.118.2.1 diff -u -w -r1.118 -r1.118.2.1 --- conf.pl 23 May 2002 09:33:39 -0000 1.118 +++ conf.pl 11 Jun 2002 14:56:39 -0000 1.118.2.1 @@ -278,6 +278,9 @@ if ( !$delete_folder ) { $delete_folder = "false"; } +if ( !$noselect_fix_enable ) { + $noselect_fix_enable = "false"; +} if ( !$frame_top ) { $frame_top = "_top"; } @@ -410,6 +413,7 @@ print "15. Default Unseen Type : $WHT$default_unseen_type$NRM\n"; print "16. Auto Create Special Folders : $WHT$auto_create_special$NRM\n"; print "17. Don't move folders into Trash : $WHT$delete_folder$NRM\n"; + print "18. Enable /NoSelect folder fix : $WHT$noselect_fix_enable$NRM\n"; print "\n"; print "R Return to Main Menu\n"; } elsif ( $menu == 4 ) { @@ -596,6 +600,7 @@ elsif ( $command == 15 ) { $default_unseen_type = command213(); } elsif ( $command == 16 ) { $auto_create_special = command214(); } elsif ( $command == 17 ) { $delete_folder = command215(); } + elsif ( $command == 18 ) { $noselect_fix_enable = command216(); } } elsif ( $menu == 4 ) { if ( $command == 1 ) { $default_charset = command31(); } elsif ( $command == 2 ) { $data_dir = command33a(); } @@ -1463,6 +1468,27 @@ return $delete_folder; } +#noselect fix +sub command216 { + print "Some IMAP server allow subfolders to exist even if the parent\n"; + print "folders do not. This fixes some problems with the folder list\n"; + print "when this is the case, causing the /NoSelect folders to be displayed\n"; + print "\n"; + + if ( lc($noselect_fix_enable) eq "true" ) { + $default_value = "y"; + } else { + $default_value = "n"; + } + print "enable noselect fix? (y/n) [$WHT$noselect_fix_enable$NRM]: $WHT"; + $noselect_fix_enable = <STDIN>; + if ( ( $noselect_fix_enable =~ /^y\n/i ) || ( ( $noselect_fix_enable =~ /^\n/ ) && ( $default_value eq "y" ) ) ) { + $noselect_fix_enable = "true"; + } else { + $noselect_fix_enable = "false"; + } + return $noselect_fix_enable; +} ############# GENERAL OPTIONS ##################### # Default Charset @@ -2321,6 +2347,9 @@ print CF "\$auto_create_special = $auto_create_special;\n"; # boolean print CF "\$delete_folder = $delete_folder;\n"; + # boolean + print CF "\$noselect_fix_enable = $noselect_fix_enable;\n"; + print CF "\n"; # string Index: config_default.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/config/config_default.php,v retrieving revision 1.74.2.1 retrieving revision 1.74.2.2 diff -u -w -r1.74.2.1 -r1.74.2.2 --- config_default.php 10 Jun 2002 18:46:11 -0000 1.74.2.1 +++ config_default.php 11 Jun 2002 14:56:39 -0000 1.74.2.2 @@ -488,8 +488,17 @@ * Your IMAP server must support the SORT extension for this * to work. */ + global $allow_server_sort; $allow_server_sort = false; + +/** + * This enables the no select fix for Cyrus when subfolders + * exist but parent folders do not + */ + +global $noselect_fix_enable; +$noselect_fix_enable = false; /** * Make sure there are no characters after the PHP closing |