return the new vars!
[squirrelmail.git] / config / conf.pl
index 21eb19be35b2ba2bab0f3aa8b61bb50e754155b4..b981d6a4db3a7c443e72431818146d9082daecee 100755 (executable)
@@ -294,6 +294,15 @@ if ( !$noselect_fix_enable ) {
 if ( !$frame_top ) {
     $frame_top = "_top";
 }
+
+if ( !$provider_uri ) {
+    $provider_uri = "http://www.squirrelmail.org/";
+}
+
+if ( !$provider_name ) {
+    $provider_name = "SquirrelMail";
+}
+
 if ( !$edit_identity ) {
     $edit_identity = "true";
 }
@@ -309,7 +318,9 @@ if ( !$allow_server_sort ) {
 if ( !$uid_support ) {
     $uid_support = 'true';
 }
-
+if ( !$no_list_for_subscribe ) {
+    $no_list_for_subscribe = 'false';
+}
 if ( !$allow_charset_search ) {
     $allow_charset_search = 'true';
 }
@@ -381,6 +392,9 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         print "5.  Signout Page           : $WHT$signout_page$NRM\n";
         print "6.  Default Language       : $WHT$squirrelmail_default_language$NRM\n";
         print "7.  Top Frame              : $WHT$frame_top$NRM\n";
+        print "8.  Provider link          : $WHT$provider_uri$NRM\n";
+        print "9.  Provider name          : $WHT$provider_name$NRM\n";
+
         print "\n";
         print "R   Return to Main Menu\n";
     } elsif ( $menu == 2 ) {
@@ -584,6 +598,9 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
             elsif ( $command == 5 ) { $signout_page                  = command4(); }
             elsif ( $command == 6 ) { $squirrelmail_default_language = command5(); }
             elsif ( $command == 7 ) { $frame_top                     = command6(); }
+            elsif ( $command == 8 ) { $provider_uri                  = command7(); }
+            elsif ( $command == 9 ) { $provider_name                 = command8(); }
+
         } elsif ( $menu == 2 ) {
             if    ( $command == 1 )  { $domain                 = command11(); }
             elsif ( $command == 2 )  { $imapServerAddress      = command12(); }
@@ -787,6 +804,37 @@ sub command6 {
     return $new_frame_top;
 }
 
+# Default link to provider
+sub command7 {
+    print "Here you can set the link on the right of the page.\n";
+    print "The default is 'http://www.squirrelmail.org/'\n";
+    print "\n";
+    print "[$WHT$provider_uri$NRM]: $WHT";
+    $new_provider_uri = <STDIN>;
+    if ( $new_provider_uri eq "\n" ) {
+        $new_provider_uri = 'http://www.squirrelmail.org/';
+    } else {
+        $new_provider_uri =~ s/[\r|\n]//g;
+        $new_provider_uri =~ s/^\s+$//g;
+    }
+    return $new_provider_uri;
+}
+
+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 "\n";
+    print "[$WHT$provider_name$NRM]: $WHT";
+    $new_provider_name = <STDIN>;
+    if ( $new_provider_name eq "\n" ) {
+        $new_provider_name = 'SquirrelMail';
+    } else {
+        $new_provider_name =~ s/[\r|\n]//g;
+        $new_provider_name =~ s/^\s+$//g;
+    }
+    return $new_provider_name;
+}
+
 ####################################################################################
 
 # domain
@@ -2323,6 +2371,12 @@ sub save_data {
         print CF "\$frame_top     = '$frame_top';\n";
         print CF "\n";
 
+        print CF "\$provider_uri     = '$provider_uri';\n";
+        print CF "\n";
+
+        print CF "\$provider_name     = '$provider_name';\n";
+        print CF "\n";
+
        # string that can contain variables
         print CF "\$motd = \"$motd\";\n";
         print CF "\n";
@@ -2497,7 +2551,7 @@ sub save_data {
        # string
         print CF "\$prefs_val_field = '$prefs_val_field';\n";
        # boolean
-       print CF "\$no_list_for_subscribe = '$no_list_for_subscribe';\n";
+       print CF "\$no_list_for_subscribe = $no_list_for_subscribe;\n";
         print CF "\n";
 
         print CF "/**\n";