Skip to content

Commit

Permalink
Fixing bug 1205 by setting role_prefix on copy
Browse files Browse the repository at this point in the history
--HG--
extra : source : 5e26055a66002625869a45e53f7bc874102dcaf1
  • Loading branch information
einhverfr committed Sep 15, 2014
1 parent 4212b36 commit d8d2bcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Changelog
Expand Up @@ -7,6 +7,10 @@ API Enhancements:
Changelog for 1.4 Series
Released 2014-09-15

Changelog for 1.4.1
* Fixing 1205, copy does not copy roles (Chris T)

Changelog for 1.4.0
General Enhancements:
* Performance enhancements on menu routines (Chris T and Steven M)
* Added +/- selection indicators to menu CSS (Chris T)
Expand Down
6 changes: 6 additions & 0 deletions LedgerSMB/Scripts/setup.pm
Expand Up @@ -236,6 +236,12 @@ sub copy_db {
my $database = _get_database($request);
my $rc = $database->copy($request->{new_name})
|| die 'An error occurred. Please check your database logs.' ;
my $dbh = LedgerSMB::Database->new(
{%$database, (company_name => $request->{new_name})}
)->dbh;
$dbh->prepare("SELECT setting__set(?, ?)")->execute(
"role_prefix", "lsmb_$database->{company_name}__");
$dbh->disconnect;
complete($request);
}

Expand Down

0 comments on commit d8d2bcf

Please sign in to comment.