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

(-)a/misc/admin/koha-preferences (-4 / +5 lines)
Lines 28-33 use YAML::XS; Link Here
28
28
29
use Koha::Logger;
29
use Koha::Logger;
30
30
31
use Koha::Database;
32
31
our %NOT_SET_PREFS = map { $_, 1 } qw( Version );
33
our %NOT_SET_PREFS = map { $_, 1 } qw( Version );
32
34
33
=head1 NAME
35
=head1 NAME
Lines 68-74 sub _set_preference { Link Here
68
}
70
}
69
71
70
sub GetPreferences {
72
sub GetPreferences {
71
    my $dbh = C4::Context->dbh;
73
    my $dbh = Koha::Database->dbh;
72
74
73
    return {
75
    return {
74
        map { $_->{variable},  $_->{value} }
76
        map { $_->{variable},  $_->{value} }
Lines 83-89 sub GetPreferences { Link Here
83
sub SetPreferences {
85
sub SetPreferences {
84
    my ( %preferences ) = @_;
86
    my ( %preferences ) = @_;
85
87
86
    my $dbh = C4::Context->dbh;
88
    my $dbh = Koha::Database->dbh;
87
89
88
    # First, a quick check to make sure all of the system preferences exist
90
    # First, a quick check to make sure all of the system preferences exist
89
    my $current_state = $dbh->selectall_arrayref( "
91
    my $current_state = $dbh->selectall_arrayref( "
Lines 109-115 sub SetPreferences { Link Here
109
sub _fetch_preference {
111
sub _fetch_preference {
110
    my ( $preference ) = @_;
112
    my ( $preference ) = @_;
111
113
112
    my $dbh = C4::Context->dbh;
114
    my $dbh = Koha::Database->dbh;
113
115
114
    my $row = $dbh->selectrow_hashref( "
116
    my $row = $dbh->selectrow_hashref( "
115
        SELECT
117
        SELECT
116
- 

Return to bug 37657