Permalink
Browse files

Fix Koha::RoseDB to work with Plack-local contexts

  • Loading branch information...
1 parent eb6cd43 commit fe91b4b099745cd6cfc0e01946d802ead5d82425 @ctfliblime ctfliblime committed Jul 5, 2011
Showing with 5 additions and 7 deletions.
  1. +5 −7 Koha/RoseDB.pm
View
@@ -8,15 +8,13 @@ our @ISA = qw(Rose::DB);
# Use a private registry for this class
__PACKAGE__->use_private_registry;
-my $context = C4::Context->new;
-
__PACKAGE__->register_db(
driver => 'mysql',
- database => $context->config('database'),
- host => $context->config('hostname'),
- port => $context->config('port'),
- username => $context->config('user'),
- password => $context->config('pass'),
+ database => C4::Context->config('database'),
+ host => C4::Context->config('hostname'),
+ port => C4::Context->config('port'),
+ username => C4::Context->config('user'),
+ password => C4::Context->config('pass'),
);
1;

0 comments on commit fe91b4b

Please sign in to comment.