removed bulkquery binary
[squirrelmail.git] / config / conf.pl
index 553790385cfb49fd3eeee37ffe0aa387f73ae4ed..fbd3ae576222c69bc094ce1e633d9fad747deb31 100755 (executable)
@@ -663,11 +663,13 @@ sub command2a {
     if ( $new_org_logo_width eq '' ) {
         $new_org_logo_width = $org_logo_width;
     }
-    print "Height: [$WHT$org_logo_height$NRM]: $WHT";
-    $new_org_logo_height = <STDIN>;
-    $new_org_logo_height =~ tr/0-9//cd;  # only want digits!
-    unless ( $new_org_logo_height > 0 ) {
+    if ( $new_org_logo_width > 0 ) {
+        print "Height: [$WHT$org_logo_height$NRM]: $WHT";
+        $new_org_logo_height = <STDIN>;
+        $new_org_logo_height =~ tr/0-9//cd;  # only want digits!
         $new_org_logo_height = $org_logo_height;
+    } else {
+        $new_org_logo_height = 0;
     }
     return ($new_org_logo_width, $new_org_logo_height);
 }
@@ -984,7 +986,14 @@ sub command81 {
 
                     # sanitize the plugin
                     $dir = $unused_plugins[$ct];
-                    `./ri_once.pl ../plugins/$dir`;
+                    if (-d "../plugins/$dir") {
+                        `./ri_once.pl ../plugins/$dir`;
+                    } else {
+                        print "Could not locate ../plugins/$dir\n" ;
+                        print "The plugin $dir could *not* be sanitized!\n" ;
+                        print "If you want to try to do this manually, please run\n" ;
+                         print "config/ri_once.pl with the full path to the $dir plugin.\n" ;
+                    }
                 }
                 $ct++;
             }
@@ -1025,13 +1034,20 @@ sub command21 {
     if ( $new_default_folder_prefix eq "\n" ) {
         $new_default_folder_prefix = $default_folder_prefix;
     } else {
-        $new_default_folder_prefix =~ s/[\r|\n]//g;
+        $new_default_folder_prefix =~ s/[\r\n]//g;
     }
-    if ( ( $new_default_folder_prefix =~ /^\s*$/ ) || ( $new_default_folder_prefix =~ /none/i ) ) {
+    if ( ( $new_default_folder_prefix =~ /^\s*$/ ) || ( $new_default_folder_prefix =~ m/^none$/i ) ) {
         $new_default_folder_prefix = "";
     } else {
-        $new_default_folder_prefix =~ s/\/*$//g;
-        $new_default_folder_prefix =~ s/$/\//g;
+        # add the trailing delimiter only if we know what the server is.
+        if ($optional_delimiter and $optional_delimiter ne 'detect') {
+           $new_default_folder_prefix =~ s/${optional_delimiter}*$/$optional_delimiter/;
+        } elsif ($imap_server_type eq 'cyrus' or
+                 $imap_server_type eq 'courier') {
+           $new_default_folder_prefix =~ s/\.*$/\./;
+        } elsif ($imap_server_type eq 'uw') {
+           $new_default_folder_prefix =~ s/\/*$/\//;
+        }
     }
     return $new_default_folder_prefix;
 }