Lines 407-421
sub preference {
Link Here
|
407 |
my $self = shift; |
407 |
my $self = shift; |
408 |
my $var = shift; # The system preference to return |
408 |
my $var = shift; # The system preference to return |
409 |
|
409 |
|
410 |
$var = lc $var; |
|
|
411 |
|
412 |
return $ENV{"OVERRIDE_SYSPREF_$var"} |
410 |
return $ENV{"OVERRIDE_SYSPREF_$var"} |
413 |
if defined $ENV{"OVERRIDE_SYSPREF_$var"}; |
411 |
if defined $ENV{"OVERRIDE_SYSPREF_$var"}; |
414 |
|
412 |
|
415 |
my $cached_var = $use_syspref_cache |
413 |
$var = lc $var; |
416 |
? $syspref_cache->get_from_cache("syspref_$var") |
414 |
|
417 |
: undef; |
415 |
if ($use_syspref_cache) { |
418 |
return $cached_var if defined $cached_var; |
416 |
$syspref_cache = Koha::Cache->get_instance() unless $syspref_cache; |
|
|
417 |
my $cached_var = $syspref_cache->get_from_cache("syspref_$var"); |
418 |
return $cached_var if defined $cached_var; |
419 |
} |
419 |
|
420 |
|
420 |
my $syspref; |
421 |
my $syspref; |
421 |
eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; |
422 |
eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; |
422 |
- |
|
|