Lines 1005-1012
sub _new_schema {
Link Here
|
1005 |
my $db_port = $context->config("port") || ''; |
1005 |
my $db_port = $context->config("port") || ''; |
1006 |
my $db_user = $context->config("user"); |
1006 |
my $db_user = $context->config("user"); |
1007 |
my $db_passwd = $context->config("pass"); |
1007 |
my $db_passwd = $context->config("pass"); |
1008 |
my $schema= Koha::Schema->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", |
1008 |
my $schema = Koha::Schema->connect( |
1009 |
$db_user, $db_passwd); |
1009 |
"DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", |
|
|
1010 |
$db_user, $db_passwd ); |
1010 |
return $schema; |
1011 |
return $schema; |
1011 |
} |
1012 |
} |
1012 |
|
1013 |
|
Lines 1029-1035
sub schema {
Link Here
|
1029 |
my $self = shift; |
1030 |
my $self = shift; |
1030 |
my $sth; |
1031 |
my $sth; |
1031 |
|
1032 |
|
1032 |
if (defined($context->{"schema"}) && $context->{"schema"}->ping()) { |
1033 |
if ( defined( $context->{"schema"} ) && $context->{"schema"}->ping() ) { |
1033 |
return $context->{"schema"}; |
1034 |
return $context->{"schema"}; |
1034 |
} |
1035 |
} |
1035 |
|
1036 |
|