Username in header
authorJamie Cameron <jcameron@webmin.com>
Wed, 10 Jun 2009 19:00:17 +0000 (19:00 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 10 Jun 2009 19:00:17 +0000 (19:00 +0000)
fetchmail/check.cgi
fetchmail/edit_global.cgi
fetchmail/edit_poll.cgi
fetchmail/lang/en

index f0b9bfa..5a324c6 100755 (executable)
@@ -4,7 +4,6 @@
 
 require './fetchmail-lib.pl';
 &ReadParse();
-&ui_print_unbuffered_header(undef, $text{'check_title'}, "");
 
 if ($config{'config_file'}) {
        $file = $config{'config_file'};
@@ -13,8 +12,11 @@ else {
        &can_edit_user($in{'user'}) || &error($text{'poll_ecannot'});
        @uinfo = getpwnam($in{'user'});
        $file = "$uinfo[7]/.fetchmailrc";
+       $uheader = &text('poll_foruser', "<tt>$in{'user'}</tt>");
        }
 
+&ui_print_unbuffered_header($uheader, $text{'check_title'}, "");
+
 $cmd = "$config{'fetchmail_path'} -v -f '$file'";
 if ($config{'mda_command'}) {
        $cmd .= " -m '$config{'mda_command'}'";
index 078c491..b615437 100755 (executable)
@@ -4,7 +4,6 @@
 
 require './fetchmail-lib.pl';
 &ReadParse();
-&ui_print_header(undef, $text{'global_title'}, "");
 
 if ($config{'config_file'}) {
        $file = $config{'config_file'};
@@ -13,7 +12,11 @@ else {
        &can_edit_user($in{'user'}) || &error($text{'poll_ecannot'});
        @uinfo = getpwnam($in{'user'});
        $file = "$uinfo[7]/.fetchmailrc";
+       $uheader = &text('poll_foruser', "<tt>$in{'user'}</tt>");
        }
+
+&ui_print_header($uheader, $text{'global_title'}, "");
+
 @conf = &parse_config_file($file);
 foreach $c (@conf) {
        $poll = $c if ($c->{'defaults'});
index 96276d6..30a6b42 100755 (executable)
@@ -11,13 +11,14 @@ else {
        &can_edit_user($in{'user'}) || &error($text{'poll_ecannot'});
        @uinfo = getpwnam($in{'user'});
        $file = "$uinfo[7]/.fetchmailrc";
+       $uheader = &text('poll_foruser', "<tt>$in{'user'}</tt>");
        }
 
 if ($in{'new'}) {
-       &ui_print_header(undef, $text{'poll_create'}, "");
+       &ui_print_header($uheader, $text{'poll_create'}, "");
        }
 else {
-       &ui_print_header(undef, $text{'poll_edit'}, "");
+       &ui_print_header($uheader, $text{'poll_edit'}, "");
        @conf = &parse_config_file($file);
        $poll = $conf[$in{'idx'}];
        }
index 37ca948..12fcfe7 100644 (file)
@@ -64,6 +64,7 @@ poll_postconnect=Command to run after disconnecting
 poll_ecannot=You are not allowed to edit this user's fetchmail config
 poll_efile=Only users' fetchmail config files can be edited
 poll_eusername=User does not exist!
+poll_foruser=For user $1
 
 stop_err=Failed to stop fetchmail
 stop_ecannot=You are not allowed to stop fetchmail