From de74555eb9470ae23796b4fc224e59f6bb1458e7 Mon Sep 17 00:00:00 2001 From: centaurix Date: Wed, 28 Apr 2004 07:48:12 +0000 Subject: [PATCH] added conf.pl support for advanced search functionality you can have both forms, only advanced search or disable it. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7296 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/conf.pl | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/config/conf.pl b/config/conf.pl index 03f9c0ea..8ee43ff8 100755 --- a/config/conf.pl +++ b/config/conf.pl @@ -289,6 +289,7 @@ $allow_thread_sort = 'false' if ( !$allow_thread_sort ); $allow_server_sort = 'false' if ( !$allow_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) ; $prefs_user_field = 'user' if ( !$prefs_user_field ); $prefs_key_field = 'prefkey' if ( !$prefs_key_field ); $prefs_val_field = 'prefval' if ( !$prefs_val_field ); @@ -476,7 +477,8 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) { print "10. Allow server thread sort : $WHT$allow_thread_sort$NRM\n"; print "11. Allow server-side sorting : $WHT$allow_server_sort$NRM\n"; print "12. Allow server charset search : $WHT$allow_charset_search$NRM\n"; - print "13. PHP session name : $WHT$session_name$NRM\n"; + print "13. Allow advanced search : $WHT$allow_advanced_search$NRM\n"; + print "14. PHP session name : $WHT$session_name$NRM\n"; print "\n"; print "R Return to Main Menu\n"; } elsif ( $menu == 5 ) { @@ -698,7 +700,8 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) { elsif ( $command == 10 ) { $allow_thread_sort = command312(); } elsif ( $command == 11 ) { $allow_server_sort = command313(); } elsif ( $command == 12 ) { $allow_charset_search = command314(); } - elsif ( $command == 13 ) { $session_name = command316(); } + elsif ( $command == 13 ) { $allow_advanced_search = command316(); } + elsif ( $command == 14 ) { $session_name = command317(); } } elsif ( $menu == 5 ) { if ( $command == 1 ) { command41(); } elsif ( $command == 2 ) { $theme_css = command42(); } @@ -2141,7 +2144,23 @@ sub command314 { # command315 (UID support) obsoleted. +# advanced search option + sub command316 { + print "This option allows you to change the advanced search form.\n"; + print "Set to 0 to disable the advanced search, 1 to have advanced\n"; + print "and search only or 2 for both forms.\n"; + print "[$WHT$allow_advanced_search$NRM]: $WHT"; + $allows_advanced_search = ; + chomp($allows_advanced_search); + if ( $allows_advanced_search eq "" ) { + $allows_advanced_searchn=0; + } + return $allows_advanced_search; +} + + +sub command317 { print "This option allows you to change the name of the PHP session used\n"; print "by SquirrelMail. Unless you know what you are doing, you probably\n"; print "don't need or want to change this from the default of SQMSESSID.\n"; @@ -3227,6 +3246,8 @@ sub save_data { print CF "\$use_smtp_tls = $use_smtp_tls;\n"; # string print CF "\$session_name = '$session_name';\n"; + # string + print CF "\$allow_advanced_search = '$allow_advanced_search';\n"; print CF "\n"; -- 2.25.1