Module config to control deletion prompt
authorJamie Cameron <jcameron@webmin.com>
Sat, 1 Nov 2008 18:18:46 +0000 (18:18 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 1 Nov 2008 18:18:46 +0000 (18:18 +0000)
postfix/CHANGELOG
postfix/config
postfix/config-freebsd
postfix/config-mandrake-linux
postfix/config-msc-linux
postfix/config-netbsd
postfix/config.info
postfix/delete_queues.cgi

index c4f1226..1116885 100644 (file)
@@ -60,4 +60,4 @@ Properly handle multiple reject_rbl_client DNS domains on the SMTP Client Restri
 ---- Changes since 1.430 ----
 Converted all pages to use the new Webmin UI library, for a more consistent and themable look.
 Autoreply messages containing non-ASCII characters are now properly quoted-printable encoded.
-
+Added a module config option to control if the user is prompted for confirmation before deleting queued messages.
index c2a2ec8..6aaf51e 100644 (file)
@@ -26,3 +26,4 @@ columns=2
 show_cmts=0
 prefix_cmts=0
 ldap_doms=0
+delete_confirm=1
index 3d4176c..9fb6981 100644 (file)
@@ -26,3 +26,4 @@ columns=2
 show_cmts=0
 prefix_cmts=0
 ldap_doms=0
+delete_confirm=1
index c2a2ec8..6aaf51e 100644 (file)
@@ -26,3 +26,4 @@ columns=2
 show_cmts=0
 prefix_cmts=0
 ldap_doms=0
+delete_confirm=1
index c2a2ec8..6aaf51e 100644 (file)
@@ -26,3 +26,4 @@ columns=2
 show_cmts=0
 prefix_cmts=0
 ldap_doms=0
+delete_confirm=1
index c2a2ec8..6aaf51e 100644 (file)
@@ -26,3 +26,4 @@ columns=2
 show_cmts=0
 prefix_cmts=0
 ldap_doms=0
+delete_confirm=1
index faedf1b..b2bf55e 100644 (file)
@@ -9,6 +9,7 @@ mailq_sort=Sort mail queue by,1,0-Queue ID,1-From address,2-To address,4-Status,
 mailq_count=Show size of mail queue on main page?,1,0-Yes,1-No
 check_config=Test config file after change?,1,1-Yes,0-No
 index_check=Check Postfix configuration on main page?,1,1-Yes,0-No
+delete_confirm=Prompt for confirmation before deleting?,1,1-Yes,0-No
 
 line2=System configuration,11
 postfix_control_command=Full path to Postfix control command,0
index 1d2f14c..58d5c8a 100755 (executable)
@@ -29,7 +29,7 @@ elsif ($in{'unhold'}) {
        }
 else {
        @files = split(/\0/, $in{'file'});
-       if ($in{'confirm'}) {
+       if ($in{'confirm'} || !$config{'delete_confirm'}) {
                # Deleting messages
                if ($postfix_version < 1.1) {
                        @qfiles = &recurse_files($config{'mailq_dir'});
@@ -53,7 +53,7 @@ else {
                &ui_print_header(undef, $text{'delq_titles'}, "");
                print &ui_confirmation_form("delete_queues.cgi",
                        &text('delq_rusure', scalar(@files)),
-                       [ map { [ 'f', $_ ] } @files ],
+                       [ map { [ 'file', $_ ] } @files ],
                        [ [ 'confirm', $text{'delq_confirm'} ] ],
                        );
                &ui_print_footer("mailq.cgi", $text{'mailq_return'});