$tmp =~ s/[\'\"]?,?\s*$//;
$tmp =~ s/[\'\"]?\);\s*$//;
$listing = $tmp;
+ } elsif ( $tmp =~ /^\s*[\'\"]writeable[\'\"]/i ) {
+ $tmp =~ s/^\s*[\'\"]writeable[\'\"]\s*=>\s*[\'\"]?//i;
+ $tmp =~ s/[\'\"]?,?\s*$//;
+ $tmp =~ s/[\'\"]?\);\s*$//;
+ $writeable = $tmp;
} elsif ( $tmp =~ /^\s*[\'\"]search_tree[\'\"]/i ) {
$tmp =~ s/^\s*[\'\"]search_tree[\'\"]\s*=>\s*[\'\"]?//i;
$tmp =~ s/[\'\"]?,?\s*$//;
$ldap_protocol[$sub] = $protocol;
$ldap_limit_scope[$sub] = $limit_scope;
$ldap_listing[$sub] = $listing;
+ $ldap_writeable[$sub] = $writeable;
$ldap_search_tree[$sub] = $search_tree;
$ldap_starttls[$sub] = $starttls;
} elsif ( $options[0] =~ /^(data_dir|attachment_dir|theme_css|org_logo|signout_page)$/ ) {
$optional_delimiter = "detect" if ( !$optional_delimiter );
$auto_create_special = 'false' if ( !$auto_create_special );
$default_use_priority = 'true' if ( !$default_use_priority );
-$hide_sm_attributions = 'false' if ( !$hide_sm_attributions );
$default_use_mdn = 'true' if ( !$default_use_mdn );
$delete_folder = 'false' if ( !$delete_folder );
$noselect_fix_enable = 'false' if ( !$noselect_fix_enable );
$provider_name = '' if ( !$provider_name );
$edit_identity = 'true' if ( !$edit_identity );
$edit_name = 'true' if ( !$edit_name );
-$disable_thread_sort = 'false' if ( !$disable_thread_sort );
-$disable_server_sort = 'false' if ( !$disable_server_sort );
$no_list_for_subscribe = 'false' if ( !$no_list_for_subscribe );
$allow_charset_search = 'true' if ( !$allow_charset_search );
$allow_advanced_search = 0 if ( !$allow_advanced_search) ;
$skip_SM_header = 'false' if ( !$skip_SM_header );
$default_use_javascript_addr_book = 'false' if (! $default_use_javascript_addr_book);
+# since 1.2.0
+$hide_sm_attributions = 'false' if ( !$hide_sm_attributions );
+
# since 1.4.0
$use_smtp_tls= 'false' if ( !$use_smtp_tls);
$smtp_auth_mech = 'none' if ( !$smtp_auth_mech );
# implementation changes. options are provided by limit_languages plugin
# $available_languages = 'all' if ( !$available_languages );
$aggressive_decoding = 'false' if ( !$aggressive_decoding );
-$advanced_tree = 'false' if ( !$advanced_tree );
+# available only in 1.5.0 and 1.5.1
+# $advanced_tree = 'false' if ( !$advanced_tree );
$use_php_recode = 'false' if ( !$use_php_recode );
$use_php_iconv = 'false' if ( !$use_php_iconv );
$use_imap_tls = 1 if ( $use_imap_tls eq 'true');
$use_smtp_tls = 0 if ( $use_smtp_tls eq 'false');
$use_smtp_tls = 1 if ( $use_smtp_tls eq 'true');
+# sorting options changed names and reversed values in 1.5.1
+$disable_thread_sort = 'false' if ( !$disable_thread_sort );
+$disable_server_sort = 'false' if ( !$disable_server_sort );
if ( $ARGV[0] eq '--install-plugin' ) {
print "Activating plugin " . $ARGV[1] . "\n";
print "R Return to Main Menu\n";
} elsif ( $menu == 11 ) {
print $WHT. "Interface tweaks\n" . $NRM;
- print "1. Advanced tree : $WHT$advanced_tree$NRM\n";
- print "2. Display html mails in iframe : $WHT$use_iframe$NRM\n";
- print "3. Use Icons : $WHT$use_icons$NRM\n";
+ print "1. Display html mails in iframe : $WHT$use_iframe$NRM\n";
+ print "2. Use Icons : $WHT$use_icons$NRM\n";
print "\n";
print $WHT. "PHP tweaks\n" . $NRM;
- print "4. Use php recode functions : $WHT$use_php_recode$NRM\n";
- print "5. Use php iconv functions : $WHT$use_php_iconv$NRM\n";
+ print "3. Use php recode functions : $WHT$use_php_recode$NRM\n";
+ print "4. Use php iconv functions : $WHT$use_php_iconv$NRM\n";
print "\n";
print $WHT. "Configuration tweaks\n" . $NRM;
- print "6. Allow remote configtest : $WHT$allow_remote_configtest$NRM\n";
+ print "5. Allow remote configtest : $WHT$allow_remote_configtest$NRM\n";
print "\n";
print "R Return to Main Menu\n";
}
elsif ( $command == 4 ) { $aggressive_decoding = commandA4(); }
elsif ( $command == 5 ) { $lossy_encoding = commandA5(); }
} elsif ( $menu == 11 ) {
- if ( $command == 1 ) { $advanced_tree = commandB1(); }
- if ( $command == 2 ) { $use_iframe = commandB2(); }
- elsif ( $command == 3 ) { $use_icons = commandB3(); }
- elsif ( $command == 4 ) { $use_php_recode = commandB4(); }
- elsif ( $command == 5 ) { $use_php_iconv = commandB5(); }
- elsif ( $command == 6 ) { $allow_remote_configtest = commandB6(); }
+ if ( $command == 1 ) { $use_iframe = commandB2(); }
+ elsif ( $command == 2 ) { $use_icons = commandB3(); }
+ elsif ( $command == 3 ) { $use_php_recode = commandB4(); }
+ elsif ( $command == 4 ) { $use_php_iconv = commandB5(); }
+ elsif ( $command == 5 ) { $allow_remote_configtest = commandB6(); }
}
}
}
sub command8 {
print "Here you can set the name of the link on the right of the page.\n";
- print "The default is 'SquirrelMail/'\n";
+ print "The default is 'SquirrelMail'\n";
print "\n";
print "[$WHT$provider_name$NRM]: $WHT";
$new_provider_name = <STDIN>;
} else {
$new_provider_name =~ s/[\r\n]//g;
$new_provider_name =~ s/^\s+$//g;
+ $new_provider_name =~ s/\'/\\'/g;
}
return $new_provider_name;
}
}
sub command312 {
- print "This option makes it possible to disable the use of thread sorting if your server\n";
- print "supports thread sort. Your IMAP server must support the THREAD command for this\n";
- print "to have any effect.\n";
+ print "This option allows you to disable server side thread sorting if your server \n";
+ print "declares THREAD support, but you don't want to provide threading options \n";
+ print "to end users or THREAD extension is broken or extension does not work with \n";
+ print "options used by SquirrelMail. Option is not used, if THREAD extension is \n";
+ print "not declared in IMAP CAPABILITY.\n";
print "\n";
- if ( lc($allow_thread_sort) eq 'true' ) {
+ if ( lc($disable_thread_sort) eq 'true' ) {
$default_value = "y";
} else {
$default_value = "n";
}
- print "Disallow server side thread sorting? (y/n) [$WHT$default_value$NRM]: $WHT";
+ print "Disable server side thread sorting? (y/n) [$WHT$default_value$NRM]: $WHT";
$disable_thread_sort = <STDIN>;
if ( ( $disable_thread_sort =~ /^y\n/i ) || ( ( $disable_thread_sort =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
$disable_thread_sort = 'true';
}
sub command313 {
- print "This option makes it possible to disable server-side sorting if your server\n";
- print "supports server side sorting. Your IMAP server must support the SORT command\n";
- print "for this to have any effect\n";
+ print "This option allows you to disable server side sorting if your server declares \n";
+ print "SORT support, but SORT extension is broken or does not work with options \n";
+ print "used by SquirrelMail. Option is not used, if SORT extension is not declared \n";
+ print "in IMAP CAPABILITY.\n";
+ print "\n";
+ print "It is strongly recommended to keep server side sorting enabled, if your ";
+ print "IMAP server supports it.";
print "\n";
if ( lc($disable_server_sort) eq 'true' ) {
} else {
$default_value = "n";
}
- print "Disallow server-side sorting? (y/n) [$WHT$default_value$NRM]: $WHT";
+ print "Disable server-side sorting? (y/n) [$WHT$default_value$NRM]: $WHT";
$disable_server_sort = <STDIN>;
if ( ( $disable_server_sort =~ /^y\n/i ) || ( ( $disable_server_sort =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
$disable_server_sort = 'true';
if ( $ldap_listing[$count] ) {
print " listing: $ldap_listing[$count]\n";
}
+ if ( $ldap_writeable[$count] ) {
+ print " writeable: $ldap_writeable[$count]\n";
+ }
if ( $ldap_search_tree[$count] ) {
print " search_tree: $ldap_search_tree[$count]\n";
}
print "Number of displayed entries is limited by maxrows setting.\n";
print "\n";
print "Don't enable this option for public LDAP directories.\n";
- print "This feature is experimental.\n";
print "\n";
print "Allow listing of LDAP directory? (y/N):";
$name = <STDIN>;
print "\n";
+ print "You can control write access to LDAP address book here. This option can\n";
+ print "be useful if you run small LDAP server and want to provide writable\n";
+ print "shared address book stored in LDAP to users of webmail interface.\n";
+ print "\n";
+ print "Don't enable this option for public LDAP directories.\n";
+ print "\n";
+ print "Allow writing to LDAP directory? (y/N):";
+ $name = <STDIN>;
+ if ( $name =~ /^y\n/i ) {
+ $name = 'true';
+ } else {
+ $name = 'false';
+ }
+ $ldap_writeable[$sub] = $name;
+
+ print "\n";
+
print "You can specify an additional search filter.\n";
print "This could be something like \"(objectclass=posixAccount)\".\n";
print "No filtering is performed by default. Press ENTER for default.\n";
@new_ldap_protocol = ();
@new_ldap_limit_scope = ();
@new_ldap_listing = ();
+ @new_ldap_writeable = ();
@new_ldap_search_tree = ();
@new_ldap_starttls = ();
@new_ldap_protocol = ( @new_ldap_protocol, $ldap_protocol[$count] );
@new_ldap_limit_scope = ( @new_ldap_limit_scope, $ldap_limit_scope[$count] );
@new_ldap_listing = ( @new_ldap_listing, $ldap_listing[$count] );
+ @new_ldap_writeable = ( @new_ldap_writeable, $ldap_writeable[$count] );
@new_ldap_search_tree = ( @new_ldap_search_tree, $ldap_search_tree[$count] );
@new_ldap_starttls = ( @new_ldap_starttls, $ldap_starttls[$count] );
}
@ldap_protocol = @new_ldap_protocol;
@ldap_limit_scope = @new_ldap_limit_scope;
@ldap_listing = @new_ldap_listing;
+ @ldap_writeable = @new_ldap_writeable;
@ldap_search_tree = @new_ldap_search_tree;
@ldap_starttls = @new_ldap_starttls;
print "This option controls what character set is used when sending\n";
print "mail and when sending HTML to the browser. Option works only\n";
print "with US English (en_US) translation. Other translations use\n";
- print "charsets that are set in functions/i18n.php.\n";
+ print "charsets that are set in translation settings.\n";
print "\n";
print "[$WHT$default_charset$NRM]: $WHT";
return $lossy_encoding;
}
-
-# Advanced tree
-sub commandB1 {
- print "Enable this option if you want to use DHTML based folder listing.\n";
- print "Code is experimental, works only with some browsers and there might\n";
- print "be some glitches.\n";
- print "\n";
-
- if ( lc($advanced_tree) eq 'true' ) {
- $default_value = "y";
- } else {
- $default_value = "n";
- }
- print "Use advanced tree in folder listing? (y/n) [$WHT$default_value$NRM]: $WHT";
- $advanced_tree = <STDIN>;
- if ( ( $advanced_tree =~ /^y\n/i ) || ( ( $advanced_tree =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
- $advanced_tree = 'true';
- } else {
- $advanced_tree = 'false';
- }
- return $advanced_tree;
-}
# display html emails in iframe
sub commandB2 {
print "This option can enable html email rendering inside iframe.\n";
# boolean
print CF " 'listing' => $ldap_listing[$count]";
}
+ if ( $ldap_writeable[$count] ) {
+ print CF ",\n";
+ # boolean
+ print CF " 'writeable' => $ldap_writeable[$count]";
+ }
if ( $ldap_search_tree[$count] ) {
print CF ",\n";
# integer
print CF "\n";
- # boolean
- print CF "\$advanced_tree = $advanced_tree;\n";
- print CF "\n";
# boolean
print CF "\$use_iframe = $use_iframe;\n";
print CF "\n";
$disp_default_folder_prefix = "<none>";
$force_username_lowercase = false;
+ # Delimiter might differ if unixhierarchysep is set to yes.
+ $message = "\nIf you have enabled unixhierarchysep, you must change delimiter and special folder names.\n";
+
$continue = 1;
} elsif ( $server eq "uw" ) {
$imap_server_type = "uw";