diff -ruN smeserver-qmHandle-1.4.old/root/etc/e-smith/web/functions/qmh smeserver-qmHandle-1.4/root/etc/e-smith/web/functions/qmh --- smeserver-qmHandle-1.4.old/root/etc/e-smith/web/functions/qmh 2022-08-18 10:19:12.218699029 +0100 +++ smeserver-qmHandle-1.4/root/etc/e-smith/web/functions/qmh 2022-08-18 15:11:54.398571625 +0100 @@ -24,7 +24,7 @@ $fm->parse_xml(); my $conf = esmith::ConfigDB->open() - || die $fm->localise('CANNOT_OPEN').'/home/e-smith/configuration'; + || die $fm->localise('CANNOT_OPEN').'/home/e-smith/configuration'; # We need this hash for some esmith::cgi calls, so... tie my %conf, 'esmith::config', $conf->file; @@ -67,16 +67,16 @@ if ($msg eq '') { - esmith::cgi::genHeaderNonCacheable ($q, \%conf, - $fm->localise('QMH_TITLE')); + esmith::cgi::genHeaderNonCacheable ($q, \%conf, + $fm->localise('QMH_TITLE')); } else { - esmith::cgi::genHeaderNonCacheable - ($q, \%conf, $fm->localise('OPERATION_STATUS_REPORT')); + esmith::cgi::genHeaderNonCacheable + ($q, \%conf, $fm->localise('OPERATION_STATUS_REPORT')); - print $q->div ({-class => "sme-error"}, $msg); - print $q->hr; + print $q->div ({-class => "sme-error"}, $msg); + print $q->hr; } # Hack to evaluate embedded vars @@ -126,44 +126,44 @@ my $default_action = 'list-queues'; print $q->startform( - -method => 'POST', - -action => $q->url (-absolute => 1) - ),"\n"; + -method => 'POST', + -action => $q->url (-absolute => 1) + ),"\n"; print $q->start_table ({-class => "sme-noborders"}),"\n"; print $q->Tr( - $q->td({-class => "sme-noborders-label"}, + $q->td({-class => "sme-noborders-label"}, $fm->localise("SELECT_AN_ACTION")), - $q->td({-class => "sme-noborders-content"}, + $q->td({-class => "sme-noborders-content"}, $q->popup_menu ( -name => 'function', -values => [ @labels ], -default => $default_action, -labels => \%labels - ) - ) - ),"\n"; - + ) + ) + ),"\n"; + print $q->end_table,"\n"; - print $q->start_table ({width => "100%", -class => "sme-noborders"}), - "\n"; + print $q->start_table ({width => "100%", -class => "sme-noborders"}), + "\n"; - print esmith::cgi::genButtonRow( - $q, - $q->submit (-name => 'action', -value => - $fm->localise('PERFORM')) - ); + print esmith::cgi::genButtonRow( + $q, + $q->submit (-name => 'action', -value => + $fm->localise('PERFORM')) + ); - print $q->end_table,"\n"; + print $q->end_table,"\n"; print $q->hidden ( - -name => 'state', - -override => 1, - -default => 'perform' - ),"\n"; + -name => 'state', + -override => 1, + -default => 'perform' + ),"\n"; print $q->endform,"\n"; @@ -180,23 +180,23 @@ if ($function eq 'refresh') { - showInitial ($q, ''); + showInitial ($q, ''); } elsif ($function eq 'list-queues') { - showListQueues ($q); + showListQueues ($q); } elsif ($function eq 'list-local-queue') { - showListLocalQueue ($q); + showListLocalQueue ($q); } elsif ($function eq 'list-remote-queue') { - showListRemoteQueue ($q); + showListRemoteQueue ($q); } elsif ($function eq 'resend') { - resend($q); + resend($q); } elsif ($function eq 'confirm-delete-message-number') { @@ -204,7 +204,7 @@ } elsif ($function eq 'delete-message-number') { - deleteMessageNumber($q); + deleteMessageNumber($q); } elsif ($function eq 'alt-list-queues') @@ -232,11 +232,10 @@ deleteAltMessageNumber($q); } - else { - # Unknown function - refresh the screen anyway - showInitial ($q, 'unknown'); + # Unknown function - refresh the screen anyway + showInitial ($q, 'unknown'); } return; @@ -253,19 +252,19 @@ my ($q) = @_; - esmith::cgi::genHeaderNonCacheable ($q, \%conf, - $fm->localise('SHOWLISTQUEUES')); + esmith::cgi::genHeaderNonCacheable ($q, \%conf, + $fm->localise('SHOWLISTQUEUES')); { print $q->hr; - print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; - + print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; + my $MailQueues = `/usr/bin/qmHandle -l`; $MailQueues =~ s//'/g; - + $MailQueues = AddLinks($MailQueues, $q); - + print $q->p ($q->pre ("$MailQueues")); } @@ -278,8 +277,8 @@ my ($q) = @_; - esmith::cgi::genHeaderNonCacheable ($q, \%conf, - "altqmail: ". $fm->localise('SHOWLISTQUEUES')); + esmith::cgi::genHeaderNonCacheable ($q, \%conf, + "altqmail: ". $fm->localise('SHOWLISTQUEUES')); { print $q->hr; @@ -305,7 +304,7 @@ my @splitq = split(/\n/, $queues); for (my $i = 0; $i < $#splitq; $i++) { - if ($splitq[$i] =~ /^(\d+)\s+(\(\d+\,\s+\d+\/+\d+\)\s*)$/ ) { + if ($splitq[$i] =~ /^(\d+)\s+(\(\d+\,\s+\d+\/+\d+\)\s*)$/ ) { $splitq[$i] = "url( -absolute => 1 ) . "?state=perform&function=confirm-delete-message-number" . @@ -346,10 +345,10 @@ esmith::cgi::genHeaderNonCacheable ($q, \%conf, - $fm->localise('LIST_LOCAL_QUEUE')); + $fm->localise('LIST_LOCAL_QUEUE')); { print $q->hr; - print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; + print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; my $LocalQueue = `/usr/bin/qmHandle -L`; $LocalQueue =~ s//'/g;