Verwendete Schnittstelle (CGI/FastCGI) in Versionsinfoscreen anzeigen
[kivitendo-erp.git] / bin / mozilla / admin.pl
index 3d1185d..b89487c 100755 (executable)
@@ -194,6 +194,7 @@ sub create_auth_tables {
     $main::auth->save_group($group);
   }
 
+  _apply_dbupgrade_scripts();
   login();
 }
 
@@ -767,12 +768,12 @@ sub create_dataset {
   }
   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);
@@ -846,7 +847,7 @@ sub backup_dataset {
   $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);
@@ -870,7 +871,7 @@ sub backup_dataset_start {
   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.'));
@@ -934,7 +935,7 @@ sub backup_dataset_start {
 
     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();
 
@@ -955,10 +956,10 @@ sub restore_dataset {
   $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}  = [];
@@ -982,7 +983,7 @@ sub restore_dataset_start {
   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.'));