* Sun Oct 05 2025 Brian Read <brianr@koozali.org> 2.0.4-27.sme

- Add UTF8 and avoid potential DB caching problems [SME: 13209]
This commit is contained in:
2025-10-05 15:42:41 +01:00
parent 2406e0f1a5
commit 13853ba844
2 changed files with 15 additions and 9 deletions

View File

@@ -35,14 +35,14 @@ use SrvMngr qw(theme_list init_session);
use Data::Dumper;
use esmith::util;
use esmith::HostsDB;
use esmith::AccountsDB;
use esmith::HostsDB::UTF8;
use esmith::AccountsDB::UTF8;
use Net::Ping;
use esmith::util::network qw(:all);
use Socket qw( inet_aton );
#our $adb = esmith::AccountsDB->open() or die("Unable to open accounts DB");
#our $adb = esmith::AccountsDB::UTF8->open() or die("Unable to open accounts DB");
my %dhcp_data = ();
@@ -56,6 +56,9 @@ sub main {
do_display($c);
}
my $db;
sub do_display {
#
# Front parameters page
@@ -65,7 +68,7 @@ sub do_display {
my $title = $c->l("dhcpd_DHCP manager");
my $modul = '';
my $trt = "SETTINGS";
our $db = esmith::ConfigDB->open() or die("Unable to open Configuration DB");
$db = esmith::ConfigDB::UTF8->open() or die("Unable to open Configuration DB");
our %sme_conf = $db->get('dhcpd')->props;
our %smb_conf = $db->get('smb')->props;
$dhcp_data{trt} = $trt;
@@ -175,7 +178,7 @@ sub do_update_check {
my $c = shift;
my $dhcpd_check = $c->param ('dhcp_check');
###Update SME configuration dbase
my $dbh_sme = esmith::ConfigDB->open('/home/e-smith/db/configuration');
my $dbh_sme = esmith::ConfigDB::UTF8->open('/home/e-smith/db/configuration');
##Initiate get method --> create record object
my $sme_record = $dbh_sme->get('dhcpd');
$sme_record->set_prop('check' , $dhcpd_check);
@@ -205,7 +208,7 @@ sub Main_Save ($){
my $dhcpd_gateway = $q->param ('dhcp_gateway');
###Update SME configuration dbase
my $dbh_sme = esmith::ConfigDB->open('/home/e-smith/db/configuration');
my $dbh_sme = esmith::ConfigDB::UTF8->open('/home/e-smith/db/configuration');
##Initiate get method --> create record object
my $sme_record = $dbh_sme->get('dhcpd');
@@ -536,7 +539,7 @@ sub get_mac_address_by_ping {
sub Scan_Local_Network ($) {
my $nmap_sme = esmith::ConfigDB->open('/home/e-smith/db/configuration');
my $nmap_sme = esmith::ConfigDB::UTF8->open('/home/e-smith/db/configuration');
my $mask = $nmap_sme->get_value('LocalNetmask');
my $network = $nmap_sme->get_prop('InternalInterface','Network');
@@ -580,7 +583,7 @@ sub Load_leases ($){
@detail $work_line $header /;
my $name_file = '/var/lib/dhcpd/dhcpd.leases' ;
our @liste_computer = '' ;
our $db = esmith::ConfigDB->open() or die("Unable to open Configuration DB");
our $db = esmith::ConfigDB::UTF8->open() or die("Unable to open Configuration DB");
our %sme_conf = $db->get('dhcpd')->props;
#Ouverture du fichier en lecture seule
open(FILE,"<$name_file") || die "Read error $name_file, Error: $!" ;

View File

@@ -1,6 +1,6 @@
%define name smeserver-dhcpmanager
%define version 2.0.4
%define release 26
%define release 27
Summary: provide a dhcp panel in the server-manager for The SME Server
Name: %{name}
@@ -25,6 +25,9 @@ AutoReqProv: no
Implementation of some feature arround dhcp clients like : wol, cleaning dhcpd.leases, Scan of your network etc//
%changelog
* Sun Oct 05 2025 Brian Read <brianr@koozali.org> 2.0.4-27.sme
- Add UTF8 and avoid potential DB caching problems [SME: 13209]
* Sat Oct 04 2025 Brian Read <brianr@koozali.org> 2.0.4-26.sme
- Delete en.pm and create .lex file if needed [SME: 13214]