]> wagnertech.de Git - kivitendo-erp.git/blobdiff - sql/Pg-upgrade2-auth/clients.pl
Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / sql / Pg-upgrade2-auth / clients.pl
index 074a15b18116e2cffeddc8790525f3b702b5f2bf..4791823db467528be780e2f9cf405b895d5912c5 100644 (file)
@@ -1,8 +1,8 @@
 # @tag: clients
-# @description: Einführung von Mandaten
+# @description: Einführung von Mandanten
 # @depends: release_3_0_0
 # @ignore: 0
-package SL::DBUpgrade2::clients;
+package SL::DBUpgrade2::Auth::clients;
 
 use strict;
 use utf8;
@@ -95,7 +95,6 @@ sub _group_into_clients {
 
     push @clients, {
       map({ $_ => $user->{$_} } @copy_fields),
-      name    => $::locale->text('Client #1', scalar(@clients) + 1),
       users   => [ $user->{id} ],
       groups  => [ map { $_->{id} } @{ $self->groups } ],
       enabled => 1,
@@ -113,6 +112,7 @@ sub _group_into_clients {
   my $num = 0;
   foreach my $client (@clients) {
     $num                += 1;
+    $client->{name}    ||= $::locale->text('Client #1', $num);
     $client->{dbhost}  ||= 'localhost';
     $client->{dbport}  ||= 5432;
     $client->{templates} =~ s:templates/::;