From 6fdbdbc1e8174cc655a3d3591ff1c150a8794d65 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Mon, 6 Oct 2025 11:30:01 +0100 Subject: [PATCH] * Mon Oct 06 2025 Brian Read 1.4-31.sme - Add UTF8 and avoid potential DB caching problems [SME: 13209] --- .../share/smanager/lib/SrvMngr/Controller/Qmh.pm | 14 +++++++++++--- smeserver-qmHandle.spec | 5 ++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm index 47ee822..0803384 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Qmh.pm @@ -18,19 +18,20 @@ use warnings; use Mojo::Base 'Mojolicious::Controller'; use esmith::FormMagick qw(gen_locale_date_string); -use esmith::ConfigDB; +use esmith::ConfigDB::UTF8; use Locale::gettext; use SrvMngr::I18N; use SrvMngr qw(theme_list init_session); -our $cdb = esmith::ConfigDB->open() || die 'Cannot open configuration base'; +my $cdb; sub main { my $c = shift; $c->app->log->info($c->log_req); + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; my %qmh_datas = (); my $title = $c->l('qmh_QMH_TITLE'); @@ -47,6 +48,7 @@ sub do_update { my $c = shift; $c->app->log->info($c->log_req); + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; my %qmh_datas = (); my $result = ""; @@ -118,6 +120,7 @@ sub do_update { sub reportType_list { my $c = shift; + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; my $rec = $cdb->get('altqmail'); my $altqmail = ($cdb->get('altqmail')->value || 0) if $rec; @@ -145,6 +148,7 @@ sub reportType_list { sub showListQueues { my ($c, $altq) = @_; + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; my $out = ''; my $reporttype = 'list-queues'; @@ -174,6 +178,7 @@ sub showListQueues { sub showListLocalQueue { my ($c, $altq) = @_; + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; my $out = ''; my $reporttype = 'list-local-queue'; @@ -203,6 +208,7 @@ sub showListLocalQueue { sub showListRemoteQueue { my ($c, $altq) = @_; + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; my $out = ''; my $reporttype = 'list-remote-queue'; @@ -232,6 +238,7 @@ sub showListRemoteQueue { sub resend { my ($c, $altq) = @_; + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; my $out = ''; my $reporttype = 'resend'; @@ -279,6 +286,7 @@ sub AddLinks { sub showDeleteMessageNumber { my ($c, $msgid, $altq, $reporttype) = @_; + $cdb = esmith::ConfigDB::UTF8->open() || die 'Cannot open configuration base'; if ($msgid =~ /^(\d+)$/) { $msgid = $1; @@ -326,4 +334,4 @@ sub deleteMessageNumber { } -1; +1; \ No newline at end of file diff --git a/smeserver-qmHandle.spec b/smeserver-qmHandle.spec index 4dbc1d8..a3307d2 100644 --- a/smeserver-qmHandle.spec +++ b/smeserver-qmHandle.spec @@ -1,7 +1,7 @@ %define name smeserver-qmHandle Name: %{name} %define version 1.4 -%define release 30 +%define release 31 Version: %{version} Release: %{release}%{?dist} BuildArch: noarch @@ -29,6 +29,9 @@ A panel for managing the Qmail queues using qmHandle (http://sourceforge.net/projects/qmhandle) %changelog +* Mon Oct 06 2025 Brian Read 1.4-31.sme +- Add UTF8 and avoid potential DB caching problems [SME: 13209] + * Sat Oct 04 2025 Brian Read 1.4-30.sme - Remove smanager-refresh from spec file [SME: 13212]