Lines 901-907
sub _new_schema {
Link Here
|
901 |
my $db_user = $context->config("user"); |
901 |
my $db_user = $context->config("user"); |
902 |
my $db_passwd = $context->config("pass"); |
902 |
my $db_passwd = $context->config("pass"); |
903 |
my $schema= Koha::Schema->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", |
903 |
my $schema= Koha::Schema->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", |
904 |
$db_user, $db_passwd); |
904 |
$db_user, $db_passwd); |
905 |
return $schema; |
905 |
return $schema; |
906 |
} |
906 |
} |
907 |
|
907 |
|
Lines 925-931
sub schema {
Link Here
|
925 |
my $sth; |
925 |
my $sth; |
926 |
|
926 |
|
927 |
if (defined($context->{"schema"}) && $context->{"schema"}->ping()) { |
927 |
if (defined($context->{"schema"}) && $context->{"schema"}->ping()) { |
928 |
return $context->{"schema"}; |
928 |
return $context->{"schema"}; |
929 |
} |
929 |
} |
930 |
|
930 |
|
931 |
# No database handle or it died . Create one. |
931 |
# No database handle or it died . Create one. |