$main::auth->save_group($group);
}
+ _apply_dbupgrade_scripts();
login();
}
}
closedir SQLDIR;
- my $default_charset = $main::dbcharset;
+ my $default_charset = $::lx_office_conf{system}->{dbcharset};
$default_charset ||= Common::DEFAULT_CHARSET;
my $cluster_encoding = User->dbclusterencoding($form);
if ($cluster_encoding && ($cluster_encoding =~ m/^(?:UTF-?8|UNICODE)$/i)) {
- if ($main::dbcharset !~ m/^UTF-?8$/i) {
+ if ($::lx_office_conf{system}->{dbcharset} !~ m/^UTF-?8$/i) {
$form->show_generic_error($locale->text('The selected PostgreSQL installation uses UTF-8 as its encoding. ' .
'Therefore you have to configure Lx-Office to use UTF-8 as well.'),
'back_button' => 1);
$form->{title} = "Lx-Office ERP " . $locale->text('Database Administration') . " / " . $locale->text('Backup Dataset');
if ($::lx_office_conf{applications}->{pg_dump} eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
my @dbsources = sort User->dbsources($form);
my $pg_dump_exe = $::lx_office_conf{applications}->{pg_dump} || "pg_dump";
if ("$pg_dump_exe" eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
$form->isblank("dbname", $locale->text('The dataset name is missing.'));
map { $mail->{$_} = $form->{$_} } qw(from to cc subject message);
- $mail->{charset} = $main::dbcharset ? $main::dbcharset : Common::DEFAULT_CHARSET;
+ $mail->{charset} = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET;
$mail->{attachments} = [ { "filename" => $tmp, "name" => $name } ];
$mail->send();
$form->{title} = "Lx-Office ERP " . $locale->text('Database Administration') . " / " . $locale->text('Restore Dataset');
if ($::lx_office_conf{applications}->{pg_restore} eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
- my $default_charset = $main::dbcharset;
+ my $default_charset = $::lx_office_conf{system}->{dbcharset};
$default_charset ||= Common::DEFAULT_CHARSET;
$form->{DBENCODINGS} = [];
my $pg_restore_exe = $::lx_office_conf{applications}->{pg_restore} || "pg_restore";
if ("$pg_restore_exe" eq "DISABLED") {
- $form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
+ $form->error($locale->text('Database backups and restorations are disabled in the configuration.'));
}
$form->isblank("new_dbname", $locale->text('The dataset name is missing.'));