* Mon Jun 09 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-87.sme
- add datetime getYear_list [SME: 13031] - WIP use esmith::*DB::UTF8 to access db flat files [SME: 13027]
This commit is contained in:
@@ -20,8 +20,8 @@ use Locale::gettext;
|
||||
use SrvMngr::I18N;
|
||||
use SrvMngr qw(theme_list init_session ip_number_or_blank);
|
||||
use Quota;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::ConfigDB::UTF8;
|
||||
use esmith::AccountsDB::UTF8;
|
||||
use esmith::util;
|
||||
use File::Basename;
|
||||
use File::Find;
|
||||
@@ -36,9 +36,6 @@ use constant DEBUG => $ENV{MOJO_SMANAGER_DEBUG} || 0;
|
||||
use constant FALSE => 0;
|
||||
use constant TRUE => 1;
|
||||
|
||||
#our $cdb = esmith::ConfigDB->open || die "Couldn't open config db"; #remove as cached gives problems
|
||||
#our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||
#our $rdb = esmith::ConfigDB->open('/etc/e-smith/restore') || die "Couldn't open restore db";
|
||||
my ($cdb,$adb,$rdb);
|
||||
my $es_backup = new esmith::Backup or die "Couldn't create Backup object\n";
|
||||
my @directories = $es_backup->restore_list;
|
||||
@@ -56,9 +53,9 @@ sub main {
|
||||
my $c = shift;
|
||||
$c->app->log->info($c->log_req);
|
||||
my %bac_datas = ();
|
||||
$cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
||||
$adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||
$rdb = esmith::ConfigDB->open('/etc/e-smith/restore');
|
||||
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
||||
$adb = esmith::AccountsDB::UTF8->open || die "Couldn't open accounts db";
|
||||
$rdb = esmith::ConfigDB::UTF8->open('/etc/e-smith/restore');
|
||||
my $title = $c->l('bac_BACKUP_TITLE');
|
||||
my $notif;
|
||||
$bac_datas{'function'} = 'desktop_backup';
|
||||
@@ -115,9 +112,9 @@ sub do_display {
|
||||
my $rt = $c->current_route;
|
||||
my ($res, $result) = '';
|
||||
my $function = $c->param('Function');
|
||||
$cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
||||
$adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||
$rdb = esmith::ConfigDB->open('/etc/e-smith/restore');
|
||||
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
||||
$adb = esmith::AccountsDB::UTF8->open || die "Couldn't open accounts db";
|
||||
$rdb = esmith::ConfigDB::UTF8->open('/etc/e-smith/restore');
|
||||
|
||||
if ($function =~ /^(\S+)$/) {
|
||||
$function = $1;
|
||||
@@ -142,7 +139,7 @@ sub do_display {
|
||||
$c->render(template=>"backdown");
|
||||
#sleep(30);
|
||||
# Redirect to the front page
|
||||
#$c->redirect_to('/backup');
|
||||
#$c->redirect_to('/backup');
|
||||
return ""
|
||||
} ## end if ($function eq 'desktop_backup')
|
||||
|
||||
@@ -279,9 +276,9 @@ sub do_update {
|
||||
my $c = shift;
|
||||
$c->app->log->info($c->log_req);
|
||||
my $rt = $c->current_route;
|
||||
$cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
||||
$adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||
$rdb = esmith::ConfigDB->open('/etc/e-smith/restore');
|
||||
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
||||
$adb = esmith::AccountsDB::UTF8->open || die "Couldn't open accounts db";
|
||||
$rdb = esmith::ConfigDB::UTF8->open('/etc/e-smith/restore');
|
||||
my $function = $c->param('Function');
|
||||
DEBUG && warn("do_update $function");
|
||||
my %bac_datas = ();
|
||||
@@ -2132,4 +2129,4 @@ sub vmount {
|
||||
return (qx(/bin/mount -t nfs -o nolock,timeo=30,retrans=1,retry=0 "$host:/$share" $mountdir 2>&1));
|
||||
}
|
||||
} ## end sub vmount
|
||||
1;
|
||||
1;
|
||||
|
Reference in New Issue
Block a user