|
Lines 68-86
sub delete {
Link Here
|
| 68 |
} |
68 |
} |
| 69 |
|
69 |
|
| 70 |
=head3 select_systempreferences |
70 |
=head3 select_systempreferences |
| 71 |
my $row = Koha::Config::SysPrefs->find($name); |
71 |
my $row = Koha::Config::SysPref->select_systempreferences($name); |
| 72 |
|
72 |
|
| 73 |
This subroutine retrieves systempreference records with a specific variable value |
73 |
This subroutine retrieves the value and type values for systempreference records with a specific variable value |
| 74 |
=cut |
74 |
=cut |
| 75 |
|
75 |
|
| 76 |
sub select_systempreferences { |
76 |
sub select_systempreferences { |
| 77 |
my ($self, $name) = @_; |
77 |
my ($self, $name) = @_; |
| 78 |
my $schema = Koha::Database->new()->schema(); |
78 |
my $dbh = C4::Context->dbh; |
| 79 |
my $syspref = $schema->resultset('Systempreference')->search( |
79 |
my $row = $dbh->selectrow_hashref( "SELECT value, type FROM systempreferences WHERE variable = ?", {}, $name ); |
| 80 |
{variable => $name} |
80 |
return $row; |
| 81 |
); |
|
|
| 82 |
return $syspref; |
| 83 |
|
| 84 |
} |
81 |
} |
| 85 |
|
82 |
|
| 86 |
=head3 type |
83 |
=head3 type |