#
# $Id$
############################################################
-$conf_pl_version = "1.4.0";
+$conf_pl_version = "1.5.0";
############################################################
# Check what directory we're supposed to be running in, and
# First, lets read in the data already in there...
############################################################
if ( -e "config.php" ) {
+ # Make sure that file is readable
+ if (! -r "config.php") {
+ clear_screen();
+ print "WARNING:\n";
+ print "The file \"config/config.php\" was found, but you don't\n";
+ print "have rights to read it.\n";
+ print "\n";
+ print "Press any key to continue";
+ $ctu = <STDIN>;
+ exit;
+ }
open( FILE, "config.php" );
while ( $line = <FILE> ) {
$line =~ s/^\s+//;
if ( $config_version ne $conf_pl_version ) {
clear_screen();
- print $WHT. "WARNING:\n" . $NRM;
+ print "WARNING:\n";
print " The file \"config/config.php\" was found, but it is for\n";
print " an older version of SquirrelMail. It is possible to still\n";
print " read the defaults from this file but be warned that many\n";
if ( $config_version ne $conf_pl_version ) {
clear_screen();
- print $WHT. "WARNING:\n" . $NRM;
+ print "WARNING:\n";
print " You are trying to use a 'config_default.php' from an older\n";
print " version of SquirrelMail. This is HIGHLY unrecommended. You\n";
print " should get the 'config_default.php' that matches the version\n";
$sub =~ s/\'\]//;
$sub =~ s/^fontsets\[\'//;
$fontsets{$sub} = $options[1];
+ } elsif ( $options[0] =~ /^theme\[[0-9]+\]\[['"]PATH|NAME['"]\]/ ) {
+ ##
+ ## $color themes are no longer supported. Please leave this
+ ## so conf.pl doesn't barf if it encounters a $theme.
+ ##
} elsif ( $options[0] =~ /^ldap_server\[[0-9]+\]/ ) {
$sub = $options[0];
$sub =~ s/\]//;
$prefs_key_size = 64 if ( !$prefs_key_size );
$prefs_val_size = 65536 if ( !$prefs_val_size );
-# since 1.5.2
-$icon_theme_def = '' if ( !$icon_theme_def );
-
# add qmail-inject test here for backwards compatibility
if ( !$sendmail_args && $sendmail_path =~ /qmail-inject/ ) {
$sendmail_args = '';
$config_location_base = '' if ( !$config_location_base );
$smtp_sitewide_user = '' if ( !$smtp_sitewide_user );
$smtp_sitewide_pass = '' if ( !$smtp_sitewide_pass );
+$icon_theme_def = '' if ( !$icon_theme_def );
if ( $ARGV[0] eq '--install-plugin' ) {
print "Activating plugin " . $ARGV[1] . "\n";
}
-
sub command_userThemes {
print "\nDefine the user themes that you wish to use. If you have added\n";
print "a theme of your own, just follow the instructions (?) about\n";
print "how to add them. You can also change the default theme.\n\n";
- print "[user_themes] command (?=help) > ";
+
+ print "Available user themes:\n";
+ $count = 0;
+ while ( $count <= $#user_theme_name ) {
+ if ( $count == $user_theme_default ) {
+ print " *";
+ } else {
+ print " ";
+ }
+ if ( $count < 10 ) {
+ print " ";
+ }
+ $name = $user_theme_name[$count];
+ $num_spaces = 35 - length($name);
+ for ( $i = 0 ; $i < $num_spaces ; $i++ ) {
+ $name = $name . " ";
+ }
+
+ print " $count. $name";
+ print "($user_theme_path[$count])\n";
+
+ $count++;
+ }
+
+ print "\n";
+ print ".------------------------------------.\n";
+ print "| t (detect user themes) |\n";
+ print "| + (add user theme) |\n";
+ print "| - N (remove user theme) |\n";
+ print "| m N (mark default user theme) |\n";
+ print "| l (list user themes) |\n";
+ print "| d (done) |\n";
+ print "`------------------------------------'\n";
+
+ print "\n[user_themes] command (?=help) > ";
$input = <STDIN>;
$input =~ s/[\r\n]//g;
while ( $input ne "d" ) {
print "\nDefine the icon themes that you wish to use. If you have added\n";
print "a theme of your own, just follow the instructions (?) about\n";
print "how to add them. You can also change the default theme.\n\n";
- print "[icon_themes] command (?=help) > ";
+
+ print "Available icon themes:\n\n";
+
+ $count = 0;
+ while ( $count <= $#icon_theme_name ) {
+ if ( $count == $icon_theme_def ) {
+ print " *";
+ } else {
+ print " ";
+ }
+ if ( $count < 10 ) {
+ print " ";
+ }
+ $name = $icon_theme_name[$count];
+ $num_spaces = 35 - length($name);
+ for ( $i = 0 ; $i < $num_spaces ; $i++ ) {
+ $name = $name . " ";
+ }
+
+ print " $count. $name";
+ print "($icon_theme_path[$count])\n";
+
+ $count++;
+ }
+
+ print "\n";
+ print ".------------------------------------.\n";
+ print "| t (detect icon themes) |\n";
+ print "| + (add icon theme) |\n";
+ print "| - N (remove icon theme) |\n";
+ print "| m N (mark default icon theme) |\n";
+ print "| l (list icon themes) |\n";
+ print "| d (done) |\n";
+ print "`------------------------------------'\n";
+
+ print "\n[icon_themes] command (?=help) > ";
$input = <STDIN>;
$input =~ s/[\r\n]//g;
while ( $input ne "d" ) {
}
sub command_templates {
- print "\nDefine the template sets that you wish to use. If you have added ";
- print "a template set of your own, just follow the instructions (?) about how to add ";
- print "them. You can also change the default template.\n";
+ print "\nDefine the template sets that you wish to use. If you have added\n";
+ print "a template set of your own, just follow the instructions (?) about\n";
+ print "how to add them. You can also change the default template.\n";
print "\n Available Templates:\n";
print "First, we need to have the hostname or the IP address where\n";
print "this LDAP server resides. Example: ldap.bigfoot.com\n";
- print "\n";
- print "You can use any URI compatible with your LDAP library. Please\n";
+ print "\n";
+ print "You can use any URI compatible with your LDAP library. Please\n";
print "note that StartTLS option is not compatible with ldaps and\n";
- print "ldapi URIs.\n";
+ print "ldapi URIs.\n";
print "hostname: ";
$name = <STDIN>;
$name =~ s/[\r\n]//g;
# Default Icon theme
sub commandB7 {
- print "You may change the path to the default icon theme to be used, if icons\n";
- print "have been enabled. This theme will be used when an icon cannot be\n";
- print "found in the current theme, or when no icon theme is specified. If\n";
- print "left blank, and icons are enabled, the default theme will be used\n";
- print "from images/themes/default/.\n";
+ print "You may change the path to the default icon theme to be used, if icons\n";
+ print "have been enabled. This theme will be used when an icon cannot be\n";
+ print "found in the current theme, or when no icon theme is specified. If\n";
+ print "left blank, and icons are enabled, the default theme will be used\n";
+ print "from images/themes/default/.\n";
print "\n";
print "To clear out an existing value, just type a space for the input.\n";
print "\n";