* Mon Oct 06 2025 Brian Read <brianr@koozali.org> 11.0.0-5.sme

- Add UTF8 and avoid potential DB caching problems [SME: 13209]
This commit is contained in:
2025-10-06 20:07:53 +01:00
parent 22e28b97b1
commit b9a151c128
3 changed files with 42 additions and 37 deletions

View File

@@ -7,11 +7,11 @@
#
use esmith::util;
use esmith::util::network;
use esmith::ConfigDB;
use esmith::HostsDB;
use esmith::AccountsDB;
use esmith::ConfigDB::UTF8;
use esmith::HostsDB::UTF8;
use esmith::AccountsDB::UTF8;
use esmith::NetworksDB;
use esmith::DomainsDB;
use esmith::DomainsDB::UTF8;
use constant FALSE => 0;
use constant TRUE => 1;
@@ -82,7 +82,7 @@ use constant users_FIELD_MAPPING => (
sub actual_users {
my @ret = ();
my $adb = esmith::AccountsDB->open() or die("Couldn't open Accounts db");
my $adb = esmith::AccountsDB::UTF8->open() or die("Couldn't open Accounts db");
# Optionally add the local admin user
push @ret, {
@@ -138,7 +138,7 @@ use constant panels_FIELD_MAPPING => (
sub actual_panels {
my $c = shift;
my %usp_data = shift;
my $adb = esmith::AccountsDB->open() or die("Couldn't open Accounts db");
my $adb = esmith::AccountsDB::UTF8->open() or die("Couldn't open Accounts db");
my $accounts_key = $c->param('Selected');
# Pass it back to the template and then back to the perform routine via a hidden field
$c->stash(accounts_key=>$accounts_key);
@@ -259,7 +259,7 @@ sub get_panels {
my $AdminPanels = join(',', @selected);
#$c->log->info("Selected IDs: $joined");
#Write back to the property AdminPanels
my $adb = esmith::AccountsDB->open() or die("Couldn't open Accounts db");
my $adb = esmith::AccountsDB::UTF8->open() or die("Couldn't open Accounts db");
my $accounts_key = $c->param('accounts_key'); #hidden field in form
#$c->log->info("AccKey: $accounts_key");
$adb->set_prop($accounts_key,'AdminPanels',$AdminPanels);