projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
88262ee
)
Vorkommen von "LxOffice" (und andere Schreibweisen) durch "kivitendo" ersetzen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 5 Jun 2013 08:48:28 +0000
(10:48 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 13 Jun 2013 14:24:19 +0000
(16:24 +0200)
SL/DB.pm
patch
|
blob
|
history
SL/DB/Helper/Mappings.pm
patch
|
blob
|
history
SL/DB/Object.pm
patch
|
blob
|
history
modules/override/Rose/DBx/Cache/Anywhere.pm
patch
|
blob
|
history
scripts/rose_auto_create_model.pl
patch
|
blob
|
history
diff --git
a/SL/DB.pm
b/SL/DB.pm
index
47f597d
..
f20e189
100644
(file)
--- a/
SL/DB.pm
+++ b/
SL/DB.pm
@@
-50,10
+50,10
@@
sub _register_db {
my $initial_sql;
if (!%::myconfig) {
my $initial_sql;
if (!%::myconfig) {
- $type = '
LXOFFICE
_EMPTY';
+ $type = '
KIVITENDO
_EMPTY';
%connect_settings = ( driver => 'Pg' );
%connect_settings = ( driver => 'Pg' );
- } elsif ($type eq '
LXOFFICE
_AUTH') {
+ } elsif ($type eq '
KIVITENDO
_AUTH') {
%connect_settings = ( driver => $::myconfig{dbdriver} || 'Pg',
database => $::auth->{DB_config}->{db},
host => $::auth->{DB_config}->{host} || 'localhost',
%connect_settings = ( driver => $::myconfig{dbdriver} || 'Pg',
database => $::auth->{DB_config}->{db},
host => $::auth->{DB_config}->{host} || 'localhost',
@@
-82,7
+82,7
@@
sub _register_db {
my %flattened_settings = _flatten_settings(%connect_settings);
my %flattened_settings = _flatten_settings(%connect_settings);
- $domain = '
LXOFFICE' if $type =~ m/^LXOFFICE
/;
+ $domain = '
KIVITENDO' if $type =~ m/^KIVITENDO
/;
$type .= join($SUBSCRIPT_SEPARATOR, map { ($_, $flattened_settings{$_} || '') } sort grep { $_ ne 'dbpasswd' } keys %flattened_settings);
my $idx = "${domain}::${type}";
$type .= join($SUBSCRIPT_SEPARATOR, map { ($_, $flattened_settings{$_} || '') } sort grep { $_ ne 'dbpasswd' } keys %flattened_settings);
my $idx = "${domain}::${type}";
diff --git
a/SL/DB/Helper/Mappings.pm
b/SL/DB/Helper/Mappings.pm
index
81f4512
..
d1f2971
100644
(file)
--- a/
SL/DB/Helper/Mappings.pm
+++ b/
SL/DB/Helper/Mappings.pm
@@
-11,13
+11,13
@@
our @EXPORT_OK = qw(get_table_for_package get_package_for_table get_package_name
# these will not be managed as Rose::DB models, because they are not normalized,
# significant changes are needed to get them done, or they were done by CRM.
# these will not be managed as Rose::DB models, because they are not normalized,
# significant changes are needed to get them done, or they were done by CRM.
-my @
lxoffice
_blacklist_permanent = qw(
+my @
kivitendo
_blacklist_permanent = qw(
leads
);
# these are not managed _yet_, but will hopefully at some point.
# if you are confident that one of these works, remove it here.
leads
);
# these are not managed _yet_, but will hopefully at some point.
# if you are confident that one of these works, remove it here.
-my @
lxoffice
_blacklist_temp = qw(
+my @
kivitendo
_blacklist_temp = qw(
);
# tables created by crm module
);
# tables created by crm module
@@
-29,12
+29,12
@@
my @cash_register_blacklist = qw(
ekartikel ekbon ekkunde ektext erptasten
);
ekartikel ekbon ekkunde ektext erptasten
);
-my @
lxoffice_blacklist = (@lxoffice_blacklist_permanent, @lxoffice
_blacklist_temp, @crm_blacklist, @cash_register_blacklist);
+my @
kivitendo_blacklist = (@kivitendo_blacklist_permanent, @kivitendo
_blacklist_temp, @crm_blacklist, @cash_register_blacklist);
# map table names to their models.
# unlike rails we have no singular<->plural magic.
# remeber: tables should be named as the plural of the model name.
# map table names to their models.
# unlike rails we have no singular<->plural magic.
# remeber: tables should be named as the plural of the model name.
-my %
lxoffice
_package_names = (
+my %
kivitendo
_package_names = (
acc_trans => 'acc_transaction',
audittrail => 'audit_trail',
'auth.clients' => 'auth_client',
acc_trans => 'acc_transaction',
audittrail => 'audit_trail',
'auth.clients' => 'auth_client',
@@
-112,42
+112,42
@@
my %lxoffice_package_names = (
vendor => 'vendor',
);
vendor => 'vendor',
);
-my (%
lxoffice_tables_to_packages, %lxoffice_tables_to_manager_packages, %lxoffice
_packages_to_tables);
+my (%
kivitendo_tables_to_packages, %kivitendo_tables_to_manager_packages, %kivitendo
_packages_to_tables);
sub get_blacklist {
sub get_blacklist {
- return
LXOFFICE => \@lxoffice
_blacklist;
+ return
KIVITENDO => \@kivitendo
_blacklist;
}
sub get_package_names {
}
sub get_package_names {
- return
LXOFFICE => \%lxoffice
_package_names;
+ return
KIVITENDO => \%kivitendo
_package_names;
}
sub get_package_for_table {
}
sub get_package_for_table {
- %
lxoffice_tables_to_packages = map { ($_ => "SL::DB::" . camelify($lxoffice_package_names{$_})) } keys %lxoffice
_package_names
- unless %
lxoffice
_tables_to_packages;
+ %
kivitendo_tables_to_packages = map { ($_ => "SL::DB::" . camelify($kivitendo_package_names{$_})) } keys %kivitendo
_package_names
+ unless %
kivitendo
_tables_to_packages;
- return $
lxoffice
_tables_to_packages{ $_[0] };
+ return $
kivitendo
_tables_to_packages{ $_[0] };
}
sub get_manager_package_for_table {
}
sub get_manager_package_for_table {
- %
lxoffice_tables_to_manager_packages = map { ($_ => "SL::DB::Manager::" . camelify($lxoffice_package_names{$_})) } keys %lxoffice
_package_names
- unless %
lxoffice
_tables_to_manager_packages;
+ %
kivitendo_tables_to_manager_packages = map { ($_ => "SL::DB::Manager::" . camelify($kivitendo_package_names{$_})) } keys %kivitendo
_package_names
+ unless %
kivitendo
_tables_to_manager_packages;
- return $
lxoffice
_tables_to_manager_packages{ $_[0] };
+ return $
kivitendo
_tables_to_manager_packages{ $_[0] };
}
sub get_table_for_package {
}
sub get_table_for_package {
- get_package_for_table('dummy') if !%
lxoffice
_tables_to_packages;
- %
lxoffice_packages_to_tables = reverse %lxoffice_tables_to_packages unless %lxoffice
_packages_to_tables;
+ get_package_for_table('dummy') if !%
kivitendo
_tables_to_packages;
+ %
kivitendo_packages_to_tables = reverse %kivitendo_tables_to_packages unless %kivitendo
_packages_to_tables;
my $package = $_[0] =~ m/^SL::DB::/ ? $_[0] : "SL::DB::" . $_[0];
my $package = $_[0] =~ m/^SL::DB::/ ? $_[0] : "SL::DB::" . $_[0];
- return $
lxoffice
_packages_to_tables{ $package };
+ return $
kivitendo
_packages_to_tables{ $package };
}
sub db {
my $string = $_[0];
}
sub db {
my $string = $_[0];
- my $lookup = $
lxoffice
_package_names{$_[0]} ||
- plurify($
lxoffice
_package_names{singlify($_[0])});
+ my $lookup = $
kivitendo
_package_names{$_[0]} ||
+ plurify($
kivitendo
_package_names{singlify($_[0])});
for my $thing ($string, $lookup) {
for my $thing ($string, $lookup) {
diff --git
a/SL/DB/Object.pm
b/SL/DB/Object.pm
index
8b86e97
..
c072e90
100755
(executable)
--- a/
SL/DB/Object.pm
+++ b/
SL/DB/Object.pm
@@
-26,7
+26,7
@@
sub new {
sub init_db {
my $class_or_self = shift;
my $class = ref($class_or_self) || $class_or_self;
sub init_db {
my $class_or_self = shift;
my $class = ref($class_or_self) || $class_or_self;
- my $type = $class =~ m/::Auth/ ? '
LXOFFICE_AUTH' : 'LXOFFICE
';
+ my $type = $class =~ m/::Auth/ ? '
KIVITENDO_AUTH' : 'KIVITENDO
';
return SL::DB::create(undef, $type);
}
return SL::DB::create(undef, $type);
}
diff --git
a/modules/override/Rose/DBx/Cache/Anywhere.pm
b/modules/override/Rose/DBx/Cache/Anywhere.pm
index
9580e06
..
abc87c7
100644
(file)
--- a/
modules/override/Rose/DBx/Cache/Anywhere.pm
+++ b/
modules/override/Rose/DBx/Cache/Anywhere.pm
@@
-43,8
+43,8
@@
sub prepare_db {
return;
}
return;
}
- # if this a dummy
lx office
dbh, don't try to actually prepare this.
- if ($db->type =~ /
LXOFFICE
_EMPTY/) {
+ # if this a dummy
kivitendo
dbh, don't try to actually prepare this.
+ if ($db->type =~ /
KIVITENDO
_EMPTY/) {
return;
}
return;
}
diff --git
a/scripts/rose_auto_create_model.pl
b/scripts/rose_auto_create_model.pl
index
1850f45
..
e935fac
100755
(executable)
--- a/
scripts/rose_auto_create_model.pl
+++ b/
scripts/rose_auto_create_model.pl
@@
-222,10
+222,10
@@
sub usage {
sub make_tables {
my @tables;
if ($config{all}) {
sub make_tables {
my @tables;
if ($config{all}) {
- my $db = SL::DB::create(undef, '
LXOFFICE
');
+ my $db = SL::DB::create(undef, '
KIVITENDO
');
@tables =
@tables =
- map { $package_names{
LXOFFICE}->{$_} ? "$_=" . $package_names{LXOFFICE
}->{$_} : $_ }
- grep { my $table = $_; !any { $_ eq $table } @{ $blacklist{
LXOFFICE
} } }
+ map { $package_names{
KIVITENDO}->{$_} ? "$_=" . $package_names{KIVITENDO
}->{$_} : $_ }
+ grep { my $table = $_; !any { $_ eq $table } @{ $blacklist{
KIVITENDO
} } }
$db->list_tables;
} elsif (@ARGV) {
@tables = @ARGV;
$db->list_tables;
} elsif (@ARGV) {
@tables = @ARGV;
@@
-251,7
+251,7
@@
my @tables = make_tables();
for my $table (@tables) {
# add default model name unless model name is given or no defaults exists
for my $table (@tables) {
# add default model name unless model name is given or no defaults exists
- $table .= '=' . $package_names{
LXOFFICE}->{lc $table} if $table !~ /=/ && $package_names{LXOFFICE
}->{lc $table};
+ $table .= '=' . $package_names{
KIVITENDO}->{lc $table} if $table !~ /=/ && $package_names{KIVITENDO
}->{lc $table};
process_table($table);
}
process_table($table);
}