|
Lines 775-781
sub _new_Zconn {
Link Here
|
| 775 |
sub _new_dbh |
775 |
sub _new_dbh |
| 776 |
{ |
776 |
{ |
| 777 |
|
777 |
|
| 778 |
Koha::Database->schema({ new => 1 })->storage->dbh; |
778 |
$context->{dbh} = Koha::Database->schema({ new => 1 })->storage->dbh; |
|
|
779 |
return $context->{dbh}; |
| 779 |
} |
780 |
} |
| 780 |
|
781 |
|
| 781 |
=head2 dbh |
782 |
=head2 dbh |
|
Lines 801-810
sub dbh
Link Here
|
| 801 |
my $sth; |
802 |
my $sth; |
| 802 |
|
803 |
|
| 803 |
unless ( $params->{new} ) { |
804 |
unless ( $params->{new} ) { |
| 804 |
return Koha::Database->schema->storage->dbh; |
805 |
return $context->{dbh} if $context->{dbh}; |
|
|
806 |
$context->{dbh} = Koha::Database->schema->storage->dbh; |
| 807 |
return $context->{dbh}; |
| 805 |
} |
808 |
} |
| 806 |
|
809 |
|
| 807 |
return Koha::Database->schema({ new => 1 })->storage->dbh; |
810 |
$context->{dbh} = Koha::Database->schema({ new => 1 })->storage->dbh; |
|
|
811 |
return $context->{dbh}; |
| 808 |
} |
812 |
} |
| 809 |
|
813 |
|
| 810 |
=head2 new_dbh |
814 |
=head2 new_dbh |
|
Lines 1182-1187
sub interface {
Link Here
|
| 1182 |
return $context->{interface} // 'opac'; |
1186 |
return $context->{interface} // 'opac'; |
| 1183 |
} |
1187 |
} |
| 1184 |
|
1188 |
|
|
|
1189 |
sub flush { |
| 1190 |
my ( $class ) = @_; |
| 1191 |
delete $context->{dbh} |
| 1192 |
if $context and $context->{dbh}; |
| 1193 |
} |
| 1194 |
|
| 1185 |
1; |
1195 |
1; |
| 1186 |
__END__ |
1196 |
__END__ |
| 1187 |
|
1197 |
|