Lines 520-538
sub preference {
Link Here
|
520 |
|
520 |
|
521 |
$var = lc $var; |
521 |
$var = lc $var; |
522 |
|
522 |
|
|
|
523 |
return $ENV{"OVERRIDE_SYSPREF_$var"} |
524 |
if defined $ENV{"OVERRIDE_SYSPREF_$var"}; |
525 |
|
523 |
my $cached_var = $use_syspref_cache |
526 |
my $cached_var = $use_syspref_cache |
524 |
? $syspref_cache->get_from_cache("syspref_$var") |
527 |
? $syspref_cache->get_from_cache("syspref_$var") |
525 |
: undef; |
528 |
: undef; |
526 |
return $cached_var if defined $cached_var; |
529 |
return $cached_var if defined $cached_var; |
527 |
|
530 |
|
528 |
my $value; |
531 |
my $syspref; |
529 |
if ( defined $ENV{"OVERRIDE_SYSPREF_$var"} ) { |
532 |
eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; |
530 |
$value = $ENV{"OVERRIDE_SYSPREF_$var"}; |
533 |
my $value = $syspref ? $syspref->value() : undef; |
531 |
} else { |
|
|
532 |
my $syspref; |
533 |
eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; |
534 |
$value = $syspref ? $syspref->value() : undef; |
535 |
} |
536 |
|
534 |
|
537 |
if ( $use_syspref_cache ) { |
535 |
if ( $use_syspref_cache ) { |
538 |
$syspref_cache->set_in_cache("syspref_$var", $value); |
536 |
$syspref_cache->set_in_cache("syspref_$var", $value); |
539 |
- |
|
|