use DBI;
use CGI;
+use Encode;
use English qw(-no_match_vars);
use Fcntl;
use File::Copy;
$form->{favicon} = "favicon.ico";
if ($form->{action}) {
- if ($auth->authenticate_root($form->{rpw}, 0) != $auth->OK()) {
+ if ($auth->authenticate_root($form->{rpw}) != $auth->OK()) {
$form->{error_message} = $locale->text('Incorrect Password!');
adminlogin();
} else {
$main::auth->save_group($group);
}
+ _apply_dbupgrade_scripts();
login();
}
delete $members{"root login"};
- map { $_->{templates} =~ s|.*/||; } values %members;
+ for (values %members) {
+ $_->{templates} =~ s|.*/||;
+ $_->{login_url} = $::locale->is_utf8 ? Encode::encode('utf-8-strict', $_->{login}) : $_->{login_url};
+ }
$form->{title} = "Lx-Office ERP " . $locale->text('Administration');
$form->{LOCKED} = -e _nologin_file_name();
$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.'));
$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 = $::lx_office_conf{system}->{dbcharset};
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.'));