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

(-)a/misc/cronjobs/automatic_item_modification_by_age.pl (-2 / +4 lines)
Lines 23-29 pod2usage(1) if $help; Link Here
23
$verbose = 1 unless $confirm;
23
$verbose = 1 unless $confirm;
24
24
25
# Load configuration from the syspref
25
# Load configuration from the syspref
26
my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration');
26
C4::Context::clear_syspref_cache;
27
my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration') // q{};
28
pod2usage({ -message => 'Set up automatic item modifications by age rules in tools first!', -exitval => 1 }) if $syspref_content !~ /\S/xsm;
29
27
my $rules = eval { JSON::from_json( $syspref_content ) };
30
my $rules = eval { JSON::from_json( $syspref_content ) };
28
pod2usage({ -message => "Unable to load the configuration : $@", -exitval => 1 })
31
pod2usage({ -message => "Unable to load the configuration : $@", -exitval => 1 })
29
    if $@;
32
    if $@;
30
- 

Return to bug 20101