1 |
jcrisp |
1.1 |
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 |
2 |
|
|
--- smeserver-qmHandle-1.4.old/root/etc/e-smith/web/functions/qmh 2022-08-18 10:19:12.218699029 +0100 |
3 |
|
|
+++ smeserver-qmHandle-1.4/root/etc/e-smith/web/functions/qmh 2022-08-18 15:11:54.398571625 +0100 |
4 |
|
|
@@ -24,7 +24,7 @@ |
5 |
|
|
$fm->parse_xml(); |
6 |
|
|
|
7 |
|
|
my $conf = esmith::ConfigDB->open() |
8 |
|
|
- || die $fm->localise('CANNOT_OPEN').'/home/e-smith/configuration'; |
9 |
|
|
+ || die $fm->localise('CANNOT_OPEN').'/home/e-smith/configuration'; |
10 |
|
|
|
11 |
|
|
# We need this hash for some esmith::cgi calls, so... |
12 |
|
|
tie my %conf, 'esmith::config', $conf->file; |
13 |
|
|
@@ -67,16 +67,16 @@ |
14 |
|
|
|
15 |
|
|
if ($msg eq '') |
16 |
|
|
{ |
17 |
|
|
- esmith::cgi::genHeaderNonCacheable ($q, \%conf, |
18 |
|
|
- $fm->localise('QMH_TITLE')); |
19 |
|
|
+ esmith::cgi::genHeaderNonCacheable ($q, \%conf, |
20 |
|
|
+ $fm->localise('QMH_TITLE')); |
21 |
|
|
} |
22 |
|
|
else |
23 |
|
|
{ |
24 |
|
|
- esmith::cgi::genHeaderNonCacheable |
25 |
|
|
- ($q, \%conf, $fm->localise('OPERATION_STATUS_REPORT')); |
26 |
|
|
+ esmith::cgi::genHeaderNonCacheable |
27 |
|
|
+ ($q, \%conf, $fm->localise('OPERATION_STATUS_REPORT')); |
28 |
|
|
|
29 |
|
|
- print $q->div ({-class => "sme-error"}, $msg); |
30 |
|
|
- print $q->hr; |
31 |
|
|
+ print $q->div ({-class => "sme-error"}, $msg); |
32 |
|
|
+ print $q->hr; |
33 |
|
|
} |
34 |
|
|
|
35 |
|
|
# Hack to evaluate embedded vars |
36 |
|
|
@@ -126,44 +126,44 @@ |
37 |
|
|
my $default_action = 'list-queues'; |
38 |
|
|
|
39 |
|
|
print $q->startform( |
40 |
|
|
- -method => 'POST', |
41 |
|
|
- -action => $q->url (-absolute => 1) |
42 |
|
|
- ),"\n"; |
43 |
|
|
+ -method => 'POST', |
44 |
|
|
+ -action => $q->url (-absolute => 1) |
45 |
|
|
+ ),"\n"; |
46 |
|
|
|
47 |
|
|
print $q->start_table ({-class => "sme-noborders"}),"\n"; |
48 |
|
|
|
49 |
|
|
print $q->Tr( |
50 |
|
|
- $q->td({-class => "sme-noborders-label"}, |
51 |
|
|
+ $q->td({-class => "sme-noborders-label"}, |
52 |
|
|
$fm->localise("SELECT_AN_ACTION")), |
53 |
|
|
- $q->td({-class => "sme-noborders-content"}, |
54 |
|
|
+ $q->td({-class => "sme-noborders-content"}, |
55 |
|
|
$q->popup_menu ( |
56 |
|
|
-name => 'function', |
57 |
|
|
-values => [ @labels ], |
58 |
|
|
-default => $default_action, |
59 |
|
|
-labels => \%labels |
60 |
|
|
- ) |
61 |
|
|
- ) |
62 |
|
|
- ),"\n"; |
63 |
|
|
- |
64 |
|
|
+ ) |
65 |
|
|
+ ) |
66 |
|
|
+ ),"\n"; |
67 |
|
|
+ |
68 |
|
|
|
69 |
|
|
print $q->end_table,"\n"; |
70 |
|
|
|
71 |
|
|
- print $q->start_table ({width => "100%", -class => "sme-noborders"}), |
72 |
|
|
- "\n"; |
73 |
|
|
+ print $q->start_table ({width => "100%", -class => "sme-noborders"}), |
74 |
|
|
+ "\n"; |
75 |
|
|
|
76 |
|
|
- print esmith::cgi::genButtonRow( |
77 |
|
|
- $q, |
78 |
|
|
- $q->submit (-name => 'action', -value => |
79 |
|
|
- $fm->localise('PERFORM')) |
80 |
|
|
- ); |
81 |
|
|
+ print esmith::cgi::genButtonRow( |
82 |
|
|
+ $q, |
83 |
|
|
+ $q->submit (-name => 'action', -value => |
84 |
|
|
+ $fm->localise('PERFORM')) |
85 |
|
|
+ ); |
86 |
|
|
|
87 |
|
|
- print $q->end_table,"\n"; |
88 |
|
|
+ print $q->end_table,"\n"; |
89 |
|
|
|
90 |
|
|
print $q->hidden ( |
91 |
|
|
- -name => 'state', |
92 |
|
|
- -override => 1, |
93 |
|
|
- -default => 'perform' |
94 |
|
|
- ),"\n"; |
95 |
|
|
+ -name => 'state', |
96 |
|
|
+ -override => 1, |
97 |
|
|
+ -default => 'perform' |
98 |
|
|
+ ),"\n"; |
99 |
|
|
|
100 |
|
|
print $q->endform,"\n"; |
101 |
|
|
|
102 |
|
|
@@ -180,23 +180,23 @@ |
103 |
|
|
|
104 |
|
|
if ($function eq 'refresh') |
105 |
|
|
{ |
106 |
|
|
- showInitial ($q, ''); |
107 |
|
|
+ showInitial ($q, ''); |
108 |
|
|
} |
109 |
|
|
elsif ($function eq 'list-queues') |
110 |
|
|
{ |
111 |
|
|
- showListQueues ($q); |
112 |
|
|
+ showListQueues ($q); |
113 |
|
|
} |
114 |
|
|
elsif ($function eq 'list-local-queue') |
115 |
|
|
{ |
116 |
|
|
- showListLocalQueue ($q); |
117 |
|
|
+ showListLocalQueue ($q); |
118 |
|
|
} |
119 |
|
|
elsif ($function eq 'list-remote-queue') |
120 |
|
|
{ |
121 |
|
|
- showListRemoteQueue ($q); |
122 |
|
|
+ showListRemoteQueue ($q); |
123 |
|
|
} |
124 |
|
|
elsif ($function eq 'resend') |
125 |
|
|
{ |
126 |
|
|
- resend($q); |
127 |
|
|
+ resend($q); |
128 |
|
|
} |
129 |
|
|
elsif ($function eq 'confirm-delete-message-number') |
130 |
|
|
{ |
131 |
|
|
@@ -204,7 +204,7 @@ |
132 |
|
|
} |
133 |
|
|
elsif ($function eq 'delete-message-number') |
134 |
|
|
{ |
135 |
|
|
- deleteMessageNumber($q); |
136 |
|
|
+ deleteMessageNumber($q); |
137 |
|
|
} |
138 |
|
|
|
139 |
|
|
elsif ($function eq 'alt-list-queues') |
140 |
|
|
@@ -232,11 +232,10 @@ |
141 |
|
|
deleteAltMessageNumber($q); |
142 |
|
|
} |
143 |
|
|
|
144 |
|
|
- |
145 |
|
|
else |
146 |
|
|
{ |
147 |
|
|
- # Unknown function - refresh the screen anyway |
148 |
|
|
- showInitial ($q, 'unknown'); |
149 |
|
|
+ # Unknown function - refresh the screen anyway |
150 |
|
|
+ showInitial ($q, 'unknown'); |
151 |
|
|
} |
152 |
|
|
|
153 |
|
|
return; |
154 |
|
|
@@ -253,19 +252,19 @@ |
155 |
|
|
my ($q) = @_; |
156 |
|
|
|
157 |
|
|
|
158 |
|
|
- esmith::cgi::genHeaderNonCacheable ($q, \%conf, |
159 |
|
|
- $fm->localise('SHOWLISTQUEUES')); |
160 |
|
|
+ esmith::cgi::genHeaderNonCacheable ($q, \%conf, |
161 |
|
|
+ $fm->localise('SHOWLISTQUEUES')); |
162 |
|
|
|
163 |
|
|
{ |
164 |
|
|
print $q->hr; |
165 |
|
|
- print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; |
166 |
|
|
- |
167 |
|
|
+ print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; |
168 |
|
|
+ |
169 |
|
|
my $MailQueues = `/usr/bin/qmHandle -l`; |
170 |
|
|
$MailQueues =~ s/</'/g; |
171 |
|
|
$MailQueues =~ s/>/'/g; |
172 |
|
|
- |
173 |
|
|
+ |
174 |
|
|
$MailQueues = AddLinks($MailQueues, $q); |
175 |
|
|
- |
176 |
|
|
+ |
177 |
|
|
print $q->p ($q->pre ("$MailQueues")); |
178 |
|
|
} |
179 |
|
|
|
180 |
|
|
@@ -278,8 +277,8 @@ |
181 |
|
|
my ($q) = @_; |
182 |
|
|
|
183 |
|
|
|
184 |
|
|
- esmith::cgi::genHeaderNonCacheable ($q, \%conf, |
185 |
|
|
- "altqmail: ". $fm->localise('SHOWLISTQUEUES')); |
186 |
|
|
+ esmith::cgi::genHeaderNonCacheable ($q, \%conf, |
187 |
|
|
+ "altqmail: ". $fm->localise('SHOWLISTQUEUES')); |
188 |
|
|
|
189 |
|
|
{ |
190 |
|
|
print $q->hr; |
191 |
|
|
@@ -305,7 +304,7 @@ |
192 |
|
|
my @splitq = split(/\n/, $queues); |
193 |
|
|
|
194 |
|
|
for (my $i = 0; $i < $#splitq; $i++) { |
195 |
|
|
- if ($splitq[$i] =~ /^(\d+)\s+(\(\d+\,\s+\d+\/+\d+\)\s*)$/ ) { |
196 |
|
|
+ if ($splitq[$i] =~ /^(\d+)\s+(\(\d+\,\s+\d+\/+\d+\)\s*)$/ ) { |
197 |
|
|
$splitq[$i] = "<a href=\"" . |
198 |
|
|
$q->url( -absolute => 1 ) . |
199 |
|
|
"?state=perform&function=confirm-delete-message-number" . |
200 |
|
|
@@ -346,10 +345,10 @@ |
201 |
|
|
|
202 |
|
|
|
203 |
|
|
esmith::cgi::genHeaderNonCacheable ($q, \%conf, |
204 |
|
|
- $fm->localise('LIST_LOCAL_QUEUE')); |
205 |
|
|
+ $fm->localise('LIST_LOCAL_QUEUE')); |
206 |
|
|
{ |
207 |
|
|
print $q->hr; |
208 |
|
|
- print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; |
209 |
|
|
+ print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n"; |
210 |
|
|
my $LocalQueue = `/usr/bin/qmHandle -L`; |
211 |
|
|
$LocalQueue =~ s/</'/g; |
212 |
|
|
$LocalQueue =~ s/>/'/g; |