/[smecontribs]/rpms/smeserver-qmHandle/contribs10/smeserver-qmHandle-1.4-bz12160-sm2-changes-to-match-bz12151.patch
ViewVC logotype

Annotation of /rpms/smeserver-qmHandle/contribs10/smeserver-qmHandle-1.4-bz12160-sm2-changes-to-match-bz12151.patch

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


Revision 1.1 - (hide annotations) (download)
Tue Sep 20 22:45:04 2022 UTC (19 months, 3 weeks ago) by trevorb
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, HEAD
bz12160 patch - mojo changes for 12151 and 12147

1 trevorb 1.1 diff -urN smeserver-qmHandle-1.4_old/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm smeserver-qmHandle-1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm
2     --- smeserver-qmHandle-1.4_old/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm 2022-09-20 17:54:54.270430467 +1000
3     +++ smeserver-qmHandle-1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm 2022-09-21 08:13:00.000000000 +1000
4     @@ -95,18 +95,16 @@
5    
6     if ($trt eq 'MSG') {
7     my $msgid = $c->param('msgid');
8     - $result = $c->render_to_string(inline => showDeleteMessageNumber($c, $msgid)) if $msgid;
9     + $result = $c->render_to_string(inline => showDeleteMessageNumber($c, $msgid, $altq, $report_type)) if $msgid;
10     $qmh_datas{'msgid'} = $msgid;
11     }
12    
13    
14     if ($trt eq 'DEL') {
15     my $msgid = $c->param('msgid');
16     - $result = $c->render_to_string(inline => deleteMessageNumber($c, $msgid)) if $msgid;
17     + $result = $c->render_to_string(inline => deleteMessageNumber($c, $msgid, $altq, $report_type)) if $msgid;
18     my $message = $c->l('qmh_DELETE') . ' <br> ' . $msgid;
19     #$c->app->log->info($message.' '.$result);
20     - $c->flash( success => $message );
21     - $c->redirect_to('/qmh');
22     }
23    
24    
25     @@ -149,6 +149,7 @@
26     my ($c, $altq) = @_;
27    
28     my $out = '';
29     + my $reporttype = 'list-queues';
30    
31     my $opt = ($altq ? 'altqmail: ' : '');
32     $out .= sprintf("<h2>%s</h2><br>", $opt . $c->l('qmh_SHOWLISTQUEUES'));
33     @@ -159,11 +160,12 @@
34     $MailQueues =~ s/</'/g;
35     $MailQueues =~ s/>/'/g;
36    
37     - $MailQueues = AddLinks($MailQueues, $c, $altq);
38     + $MailQueues = AddLinks($MailQueues, $altq, $reporttype);
39    
40     $out .= sprintf "<pre>";
41     $out .= "$MailQueues";
42     $out .= sprintf "</pre>";
43     + $out .= sprintf "<input type=hidden name=\"Report_type\" value=\"$reporttype\">";
44     return $out;
45     }
46    
47     @@ -176,6 +178,7 @@
48     my ($c, $altq) = @_;
49    
50     my $out = '';
51     + my $reporttype = 'list-local-queue';
52    
53     my $opt = ($altq ? 'altqmail: ' : '');
54     $out .= sprintf("<h2>%s</h2><br>", $opt . $c->l('qmh_LIST_LOCAL_QUEUE'));
55     @@ -186,11 +189,12 @@
56     $LocalQueue =~ s/</'/g;
57     $LocalQueue =~ s/>/'/g;
58    
59     - $LocalQueue = AddLinks($LocalQueue, $c, $altq);
60     + $LocalQueue = AddLinks($LocalQueue, $altq, $reporttype);
61    
62     $out .= sprintf "<pre>";
63     $out .= "$LocalQueue";
64     $out .= sprintf "</pre>";
65     + $out .= sprintf "<input type=hidden name=\"Report_type\" value=\"$reporttype\">";
66     return $out;
67     }
68    
69     @@ -203,6 +207,7 @@
70     my ($c, $altq) = @_;
71    
72     my $out = '';
73     + my $reporttype = 'list-remote-queue';
74    
75     my $opt = ($altq ? 'altqmail: ' : '');
76     $out .= sprintf("<h2>%s</h2><br>", $opt . $c->l('qmh_LIST_REMOTE_QUEUE'));
77     @@ -213,11 +218,12 @@
78     $RemoteQueue =~ s/</'/g;
79     $RemoteQueue =~ s/>/'/g;
80    
81     - $RemoteQueue = AddLinks($RemoteQueue, $c, $altq);
82     + $RemoteQueue = AddLinks($RemoteQueue, $altq, $reporttype);
83    
84     $out .= sprintf "<pre>";
85     $out .= "$RemoteQueue";
86     $out .= sprintf "</pre>";
87     + $out .= sprintf "<input type=hidden name=\"Report_type\" value=\"$reporttype\">";
88     return $out;
89     }
90    
91     @@ -230,6 +236,7 @@
92     my ($c, $altq) = @_;
93    
94     my $out = '';
95     + my $reporttype = 'resend';
96    
97     my $opt = ($altq ? 'altqmail: ' : '');
98     $out .= sprintf("<h2>%s</h2><br>", $opt . $c->l('qmh_TRY_SEND_QUEUE'));
99     @@ -240,11 +247,12 @@
100     $Res =~ s/</'/g;
101     $Res =~ s/>/'/g;
102    
103     - $Res = AddLinks($Res, $c, $altq);
104     + $Res = AddLinks($Res, $altq, $reporttype);
105    
106     $out .= sprintf "<pre>";
107     $out .= "$Res";
108     $out .= sprintf "</pre>";
109     + $out .= sprintf "<input type=hidden name=\"Report_type\" value=\"$reporttype\">";
110     $out .= sprintf "<h3>Done</h3>";
111     return $out;
112     }
113     @@ -252,13 +260,13 @@
114    
115     sub AddLinks {
116    
117     - my ($queues, $altq) = @_;
118     + my ($queues, $altq, $reporttype) = @_;
119    
120     my @splitq = split(/\n/, $queues);
121    
122     for (my $i = 0; $i < $#splitq; $i++) {
123     if ($splitq[$i] =~ /^(\d+)\s+(\(\d+\,\s+\d+\/+\d+\)\s*)$/ ) {
124     - $splitq[$i] = "<a href=\"qmh2?trt=MSG&msgid=$1\">$1</a> $2";
125     + $splitq[$i] = "<a href=\"qmh2?trt=MSG&msgid=$1&Report_type=$reporttype\">$1</a> $2";
126     }
127     }
128     $queues = join("\n", @splitq);
129     @@ -272,7 +280,7 @@
130     #------------------------------------------------------------
131     sub showDeleteMessageNumber {
132    
133     - my ($c, $msgid, $altq) = @_;
134     + my ($c, $msgid, $altq, $reporttype) = @_;
135    
136     if ($msgid =~ /^(\d+)$/) {
137     $msgid = $1;
138     @@ -290,15 +298,16 @@
139     my $Message = `/usr/bin/qmHandle $opt`;
140    
141     $out .= sprintf "<pre>";
142     - $out .= "$Message";
143     + $out .= "<textarea name=\"message\" rows=30 cols=80>$Message</textarea>";
144     $out .= sprintf "</pre>";
145     + $out .= sprintf "<input type=hidden name=\"Report_type\" value=\"$reporttype\">";
146     return $out;
147     }
148    
149    
150     sub deleteMessageNumber {
151    
152     - my ($c, $msgid, $altq) = @_;
153     + my ($c, $msgid, $altq, $reporttype) = @_;
154    
155     if ($msgid =~ /^(\d+)$/) {
156     $msgid = $1;
157     @@ -313,6 +322,7 @@
158     $out .= sprintf "<pre>";
159     $out .= "$Output";
160     $out .= sprintf "</pre>";
161     + $out .= sprintf "<input type=hidden name=\"Report_type\" value=\"$reporttype\">";
162     return $out;
163    
164     }
165     diff -urN smeserver-qmHandle-1.4_old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/en.pm smeserver-qmHandle-1.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/en.pm
166     --- smeserver-qmHandle-1.4_old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/en.pm 1970-01-01 10:00:00.000000000 +1000
167     +++ smeserver-qmHandle-1.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/en.pm 2022-09-18 15:00:00.000000000 +1000
168     @@ -0,0 +1,39 @@
169     +package SrvMngr::I18N::Modules::Qmh::en;
170     +use strict;
171     +use warnings;
172     +use utf8;
173     +use Mojo::Base 'SrvMngr::I18N';
174     +
175     +use SrvMngr::I18N::Modules::General::en;
176     +
177     +my %lexicon = (
178     +'qmh_QMH_TITLE' => 'Qmail queue management',
179     +'qmh_OPERATION_STATUS_REPORT' => 'Operation status report',
180     +'qmh_QMH_DESC' => 'This panel uses <b>qmHandle</b> to manage the qmail message queues. Key features are the ability to view and delete messages in the queues.',
181     +'qmh_TRY_SEND_QUEUE' => 'Force resending of the Qmail queue',
182     +'qmh_SEND_QUEUE_AT' => 'Resend Qmail queue at: ',
183     +'qmh_LIST_QUEUE' => 'List message queues',
184     +'qmh_LIST_LOCAL_QUEUE' => 'List local message queue',
185     +'qmh_SHOWLISTQUEUES' => 'List Qmail local and remote queues',
186     +'qmh_LIST_REMOTE_QUEUE' => 'List remote message queue',
187     +'qmh_VIEW_TIME' => 'Qmail message queue, viewed at: ',
188     +'qmh_LIST_LOCAL_QUEUE' => 'List Qmail local queue',
189     +'qmh_LIST_REMOTE_QUEUE' => 'List Qmail remote queue',
190     +'qmh_RESEND_QUEUE' => 'Try to send queued messages now (qmail must be running)',
191     +'qmh_DELETE_MSG_TITLEB' => 'Queue management: delete Message',
192     +'qmh_DELETE_MESSAGE' => 'Delete this message from the queue ? (Only the first 100 lines are listed)',
193     +'qmh_DELETE' => 'Delete',
194     +'qmh_SELECT_AN_ACTION' => 'Select an action',
195     +'qmh_FROM_QUEUE' => 'from message queue',
196     +'qmh_Administration' => 'Administration',
197     +'qmh_RETURN_TO_QUEUE' => 'Return to Queue',
198     +'E-mail Warteschlange' => 'E-Mail queue management',
199     +);
200     +
201     +our %Lexicon = (
202     + %{ SrvMngr::I18N::Modules::General::en::Lexicon },
203     + %lexicon
204     +);
205     +
206     +
207     +1;
208     diff -urN smeserver-qmHandle-1.4_old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/fr.pm smeserver-qmHandle-1.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/fr.pm
209     --- smeserver-qmHandle-1.4_old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/fr.pm 1970-01-01 10:00:00.000000000 +1000
210     +++ smeserver-qmHandle-1.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Qmh/fr.pm 2022-09-18 15:00:00.000000000 +1000
211     @@ -0,0 +1,39 @@
212     +package SrvMngr::I18N::Modules::Qmh::fr;
213     +use strict;
214     +use warnings;
215     +use utf8;
216     +use Mojo::Base 'SrvMngr::I18N';
217     +
218     +use SrvMngr::I18N::Modules::General::fr;
219     +
220     +my %lexicon = (
221     +'qmh_QMH_TITLE' => 'Administration de file d\'attente',
222     +'qmh_OPERATION_STATUS_REPORT' => 'Rapport d\'état de l\'opération',
223     +'qmh_QMH_DESC' => 'Ce panel utilise <b>qmHandle</b> pour administrer la file d\'attente de Qmail. Les fonctionnalités principales sont de voir et d\'effacer des messages dans la file d\'attente. ',
224     +'qmh_TRY_SEND_QUEUE' => 'Forcer le renvoi de la file d\'attente de qmail',
225     +'qmh_SEND_QUEUE_AT' => 'Renvoi la file d\'attente Qmail le : ',
226     +'qmh_LIST_QUEUE' => 'Message de la file d\'attente',
227     +'qmh_LIST_LOCAL_QUEUE' => 'File d\'attente locale',
228     +'qmh_SHOWLISTQUEUES' => 'Files d\'attente locale et distante',
229     +'qmh_LIST_REMOTE_QUEUE' => 'File d\'attente distante de QMAIL',
230     +'qmh_VIEW_TIME' => 'La file d\'attente des messages de Qmail le : ',
231     +'qmh_LIST_LOCAL_QUEUE' => 'File d\'attente locale de QMAIL',
232     +'qmh_LIST_REMOTE_QUEUE' => 'File d\'attente distante de QMAIL',
233     +'qmh_RESEND_QUEUE' => 'Renvoyer les messages de la file d\'attente maintenant (Qmail doit être en fonction)',
234     +'qmh_DELETE_MSG_TITLEB' => 'Administration de file d\'attente : effacer le Message',
235     +'qmh_DELETE_MESSAGE' => 'Effacez ce message de la file d\'attente? (Seulement les 100 premières lignes sont affichées)',
236     +'qmh_DELETE' => 'Supprimer',
237     +'qmh_SELECT_AN_ACTION' => 'Sélectionnez une action :',
238     +'qmh_iFROM_QUEUE' => 'de la file d\'attente des messages',
239     +'qmh_Administration' => 'Administration',
240     +'qmh_RETURN_TO_QUEUE' => 'Retour à la file d\'attente',
241     +'E-mail Warteschlange' => 'Administration de file d\'attente des courriels',
242     +);
243     +
244     +our %Lexicon = (
245     + %{ SrvMngr::I18N::Modules::General::fr::Lexicon },
246     + %lexicon
247     +);
248     +
249     +
250     +1;
251     diff -urN smeserver-qmHandle-1.4_old/root/usr/share/smanager/themes/default/templates/qmh.html.ep smeserver-qmHandle-1.4/root/usr/share/smanager/themes/default/templates/qmh.html.ep
252     --- smeserver-qmHandle-1.4_old/root/usr/share/smanager/themes/default/templates/qmh.html.ep 2022-09-20 17:54:54.270430467 +1000
253     +++ smeserver-qmHandle-1.4/root/usr/share/smanager/themes/default/templates/qmh.html.ep 2022-09-20 21:06:00.000000000 +1000
254     @@ -34,6 +34,12 @@
255     % $btn = l('NEXT');
256     %= $c->render_to_string( inline => stash 'modul' )
257     %}
258     + % if ($qmh_datas->{trt} eq 'DEL') {
259     + % $btn = l('qmh_RETURN_TO_QUEUE');
260     + %= $c->render_to_string( inline => stash 'modul' )
261     + %= hidden_field 'msgid' => $qmh_datas->{msgid}
262     + % $qmh_datas->{trt} = 'LST';
263     + %}
264     % if ($qmh_datas->{trt} eq 'MSG') {
265     % $btn = l('Delete');
266     %= $c->render_to_string( inline => stash 'modul' )

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