|
Lines 526-534
sub preference {
Link Here
|
| 526 |
: undef; |
526 |
: undef; |
| 527 |
return $cached_var if defined $cached_var; |
527 |
return $cached_var if defined $cached_var; |
| 528 |
|
528 |
|
| 529 |
my $syspref; |
529 |
# DBIx variant temporarily disabled due to performance issues |
| 530 |
eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; |
530 |
# my $syspref; |
| 531 |
my $value = $syspref ? $syspref->value() : undef; |
531 |
# eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; |
|
|
532 |
# my $value = $syspref ? $syspref->value() : undef; |
| 533 |
my $dbh = C4::Context->dbh; |
| 534 |
my $query = 'SELECT value FROM systempreferences WHERE variable = ? LIMIT 1'; |
| 535 |
my $value = $dbh->selectrow_array($query, {}, $var); |
| 532 |
|
536 |
|
| 533 |
if ( $use_syspref_cache ) { |
537 |
if ( $use_syspref_cache ) { |
| 534 |
$syspref_cache->set_in_cache("syspref_$var", $value); |
538 |
$syspref_cache->set_in_cache("syspref_$var", $value); |
| 535 |
- |
|
|