/[smecontribs]/rpms/smeserver-qmHandle/contribs10/smeserver-qmHandle-1.4-bz12151-enhance-message-deletion.patch
ViewVC logotype

Contents of /rpms/smeserver-qmHandle/contribs10/smeserver-qmHandle-1.4-bz12151-enhance-message-deletion.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Aug 18 15:18:29 2022 UTC (2 years, 3 months ago) by jcrisp
Branch: MAIN
CVS Tags: smeserver-qmHandle-1_4-22_el7_sme, smeserver-qmHandle-1_4-21_el7_sme, smeserver-qmHandle-1_4-24_el7_sme, smeserver-qmHandle-1_4-23_el7_sme, smeserver-qmHandle-1_4-25_el7_sme, smeserver-qmHandle-1_4-20_el7_sme, HEAD
Error occurred while calculating annotation data.
* Thu Aug 18 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 1.4-20.sme
- Enhance message deletion [SME: 12151]

1 diff -ruN smeserver-qmHandle-1.4.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/qmh smeserver-qmHandle-1.4/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/qmh
2 --- smeserver-qmHandle-1.4.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/qmh 2022-08-18 15:58:00.788032805 +0100
3 +++ smeserver-qmHandle-1.4/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/qmh 2022-08-18 16:13:35.804380241 +0100
4 @@ -72,6 +72,14 @@
5 <trans>Delete</trans>
6 </entry>
7 <entry>
8 + <base>DELETED</base>
9 + <trans>Message deleted</trans>
10 + </entry>
11 + <entry>
12 + <base>RETURN_TO_QUEUE</base>
13 + <trans>Return to queue</trans>
14 + </entry>
15 + <entry>
16 <base>SELECT_AN_ACTION</base>
17 <trans>Select an action</trans>
18 </entry>
19 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
20 --- smeserver-qmHandle-1.4.old/root/etc/e-smith/web/functions/qmh 2022-08-18 15:58:00.786032773 +0100
21 +++ smeserver-qmHandle-1.4/root/etc/e-smith/web/functions/qmh 2022-08-18 16:09:36.191447216 +0100
22 @@ -260,10 +260,12 @@
23 print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n";
24
25 my $MailQueues = `/usr/bin/qmHandle -l`;
26 + my $queuetype = 'list-queues';
27 +
28 $MailQueues =~ s/</'/g;
29 $MailQueues =~ s/>/'/g;
30
31 - $MailQueues = AddLinks($MailQueues, $q);
32 + $MailQueues = AddLinks($MailQueues, $queuetype, $q);
33
34 print $q->p ($q->pre ("$MailQueues"));
35 }
36 @@ -285,10 +287,12 @@
37 print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n";
38
39 my $MailQueues = `/usr/bin/qmHandle -X -l`;
40 + my $queuetype = 'alt-list-queues';
41 +
42 $MailQueues =~ s/</'/g;
43 $MailQueues =~ s/>/'/g;
44
45 - $MailQueues = AddAltLinks($MailQueues, $q);
46 + $MailQueues = AddAltLinks($MailQueues, $queuetype, $q);
47
48 print $q->p ($q->pre ("$MailQueues"));
49 }
50 @@ -300,6 +304,7 @@
51 sub AddLinks
52 {
53 my $queues = shift;
54 + my $queueType = shift;
55
56 my @splitq = split(/\n/, $queues);
57
58 @@ -307,7 +312,7 @@
59 if ($splitq[$i] =~ /^(\d+)\s+(\(\d+\,\s+\d+\/+\d+\)\s*)$/ ) {
60 $splitq[$i] = "<a href=\"" .
61 $q->url( -absolute => 1 ) .
62 - "?state=perform&function=confirm-delete-message-number" .
63 + "?state=perform&function=confirm-delete-message-number&queue=$queueType" .
64 "&msgid=$1\">$1</a> $2";
65 }
66 }
67 @@ -319,6 +324,7 @@
68 sub AddAltLinks
69 {
70 my $queues = shift;
71 + my $queueType = shift;
72
73 my @splitq = split(/\n/, $queues);
74
75 @@ -326,7 +332,7 @@
76 if ($splitq[$i] =~ /^(\d+)\s+(\(\d+\,\s+\d+\/+\d+\)\s*)$/ ) {
77 $splitq[$i] = "<a href=\"" .
78 $q->url( -absolute => 1 ) .
79 - "?state=perform&function=alt-confirm-delete-message-number" .
80 + "?state=perform&function=alt-confirm-delete-message-number&queue=$queueType" .
81 "&msgid=$1\">$1</a> $2";
82 }
83 }
84 @@ -350,8 +356,11 @@
85 print $q->hr;
86 print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n";
87 my $LocalQueue = `/usr/bin/qmHandle -L`;
88 + my $queuetype = 'list-local-queue';
89 +
90 $LocalQueue =~ s/</'/g;
91 $LocalQueue =~ s/>/'/g;
92 + $LocalQueue = AddLinks($LocalQueue, $queuetype);
93
94 print $q->p ($q->pre ("$LocalQueue"));
95 }
96 @@ -371,8 +380,11 @@
97 print $q->hr;
98 print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n";
99 my $LocalQueue = `/usr/bin/qmHandle -X -L`;
100 + my $queuetype = 'alt-list-local-queue';
101 +
102 $LocalQueue =~ s/</'/g;
103 $LocalQueue =~ s/>/'/g;
104 + $LocalQueue = AddAltLinks($LocalQueue, $queuetype);
105
106 print $q->p ($q->pre ("$LocalQueue"));
107 }
108 @@ -396,10 +408,12 @@
109 print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n";
110
111 my $RemoteQueue = `/usr/bin/qmHandle -R`;
112 + my $queuetype = 'list-remote-queue';
113 +
114 $RemoteQueue =~ s/</'/g;
115 $RemoteQueue =~ s/>/'/g;
116
117 - $RemoteQueue = AddLinks($RemoteQueue);
118 + $RemoteQueue = AddLinks($RemoteQueue, $queuetype);
119 print $q->p ($q->pre ("$RemoteQueue"));
120 }
121
122 @@ -418,10 +432,12 @@
123 print $q->p($fm->localise('VIEW_TIME')),scalar localtime(time),"\n";
124
125 my $RemoteQueue = `/usr/bin/qmHandle -X -R`;
126 + my $queuetype = 'alt-list-remote-queue';
127 +
128 $RemoteQueue =~ s/</'/g;
129 $RemoteQueue =~ s/>/'/g;
130
131 - $RemoteQueue = AddLinks($RemoteQueue);
132 + $RemoteQueue = AddAltLinks($RemoteQueue, $queuetype);
133 print $q->p ($q->pre ("$RemoteQueue"));
134 }
135
136 @@ -480,6 +496,7 @@
137 {
138 my ($q) = @_;
139 my $msgid = $q->param ('msgid');
140 + my $queuetype = $q->param ('queue');
141
142 if ($msgid =~ /^(\d+)$/) {
143 $msgid = $1;
144 @@ -502,7 +519,9 @@
145 print $q->hidden (-name => 'state', -override => 1, -default => 'perform');
146 print $q->hidden (-name => 'msgid', -override => 1, -default => "$msgid");
147 print $q->hidden (-name => 'function', -override => 1, -default => 'delete-message-number');
148 + print $q->hidden (-name => 'queue', -override => 1, -default => "$queuetype");
149 print $q->endform;
150 +
151 esmith::cgi::genFooter ($q);
152 return;
153 }
154 @@ -511,6 +530,7 @@
155 {
156 my ($q) = @_;
157 my $msgid = $q->param ('msgid');
158 + my $queuetype = $q->param ('queue');
159
160 if ($msgid =~ /^(\d+)$/) {
161 $msgid = $1;
162 @@ -530,10 +550,13 @@
163
164 esmith::cgi::genButtonRow ($q,
165 $q->submit (-name => 'action', -value => $fm->localise('Delete'))));
166 +
167 print $q->hidden (-name => 'state', -override => 1, -default => 'perform');
168 print $q->hidden (-name => 'msgid', -override => 1, -default => "$msgid");
169 print $q->hidden (-name => 'function', -override => 1, -default => 'delete-message-number');
170 + print $q->hidden (-name => 'queue', -override => 1, -default => "$queuetype");
171 print $q->endform;
172 +
173 esmith::cgi::genFooter ($q);
174 return;
175 }
176 @@ -544,6 +567,7 @@
177 my ($q) = @_;
178
179 my $msgid = $q->param ('msgid');
180 + my $queuetype = $q->param ('queue');
181
182 if ($msgid =~ /^(\d+)$/) {
183 $msgid = $1;
184 @@ -553,11 +577,22 @@
185 my $Output = `/usr/bin/qmHandle -d$msgid`;
186
187 esmith::cgi::genHeaderNonCacheable ($q, \%conf,
188 - "altqmail: ". $fm->localise('QMH_TITLE'));
189 + "qmail: ". $fm->localise('QMH_TITLE'));
190
191 print $q->hr;
192 - print $q->h3 ($fm->localise('DELETE'))," $msgid ";
193 -
194 + print $q->h3 ($fm->localise('DELETED'))," $msgid ";
195 + print $q->br();
196 + print $q->br();
197 +
198 + print $q->start_multipart_form(-method => 'POST', -action => $q->url (-absolute => 1));
199 + print $q->table ({border => 0, cellspacing => 0, cellpadding => 4},
200 + esmith::cgi::genButtonRow ($q,
201 + $q->submit (-name => 'action', -value => $fm->localise('RETURN_TO_QUEUE'))));
202 +
203 + print $q->hidden (-name => 'state', -override => 1, -default => 'perform');
204 + print $q->hidden (-name => 'function', -override => 1, -default => "$queuetype");
205 + print $q->endform;
206 +
207 esmith::cgi::genFooter ($q);
208 return;
209 }
210 @@ -567,7 +602,8 @@
211 my ($q) = @_;
212
213 my $msgid = $q->param ('msgid');
214 -
215 + my $queuetype = $q->param ('queue');
216 +
217 if ($msgid =~ /^(\d+)$/) {
218 $msgid = $1;
219 } else {
220 @@ -579,8 +615,19 @@
221 "altqmail: ". $fm->localise('QMH_TITLE'));
222
223 print $q->hr;
224 - print $q->h3 ($fm->localise('DELETE'))," $msgid ";
225 -
226 + print $q->h3 ($fm->localise('DELETED'))," $msgid ";
227 + print $q->br();
228 + print $q->br();
229 +
230 + print $q->start_multipart_form(-method => 'POST', -action => $q->url (-absolute => 1));
231 + print $q->table ({border => 0, cellspacing => 0, cellpadding => 4},
232 + esmith::cgi::genButtonRow ($q,
233 + $q->submit (-name => 'action', -value => $fm->localise('RETURN_TO_QUEUE'))));
234 +
235 + print $q->hidden (-name => 'state', -override => 1, -default => 'perform');
236 + print $q->hidden (-name => 'function', -override => 1, -default => "$queuetype");
237 + print $q->endform;
238 +
239 esmith::cgi::genFooter ($q);
240 return;
241 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed