View | Details | Raw Unified | Return to bug 28306
Collapse All | Expand All

(-)a/Koha/Database.pm (-5 / +17 lines)
Lines 37-48 use Koha::Config; Link Here
37
37
38
our $database;
38
our $database;
39
39
40
# FIXME: It is useless to have a Koha::Database object since all methods
40
=head2 new
41
# below act as class methods
41
42
# Koha::Database->new->schema is exactly the same as Koha::Database->schema
42
    $schema = Koha::Database->new->schema;
43
# We should use Koha::Database->schema everywhere and remove the `new` method
43
44
    FIXME: It is useless to have a Koha::Database object since all methods
45
    below act as class methods
46
    Koha::Database->new->schema is exactly the same as Koha::Database->schema
47
    We should use Koha::Database->schema everywhere and remove the `new` method
48
49
=cut
50
44
sub new { bless {}, shift }
51
sub new { bless {}, shift }
45
52
53
=head2 dbh
54
55
    $dbh = Koha::Database->new->dbh;
56
57
=cut
58
46
sub dbh {
59
sub dbh {
47
    my $config = Koha::Config->get_instance;
60
    my $config = Koha::Config->get_instance;
48
    my $driver = db_scheme2dbi($config->get('db_scheme'));
61
    my $driver = db_scheme2dbi($config->get('db_scheme'));
49
- 

Return to bug 28306