Lines 764-775
sub _session_log {
Link Here
|
764 |
} |
764 |
} |
765 |
|
765 |
|
766 |
sub _timeout_syspref { |
766 |
sub _timeout_syspref { |
767 |
my $timeout = C4::Context->preference('timeout') || 600; |
767 |
my $default_timeout = 600; |
|
|
768 |
my $timeout = C4::Context->preference('timeout') || $default_timeout; |
768 |
|
769 |
|
769 |
# value in days, convert in seconds |
770 |
# value in days, convert in seconds |
770 |
if ( $timeout =~ /(\d+)[dD]/ ) { |
771 |
if ( $timeout =~ /^(\d+)[dD]$/ ) { |
771 |
$timeout = $1 * 86400; |
772 |
$timeout = $1 * 86400; |
772 |
} |
773 |
} |
|
|
774 |
# value in hours, convert in seconds |
775 |
elsif ( $timeout =~ /^(\d+)[hH]$/ ) { |
776 |
$timeout = $1 * 3600; |
777 |
} |
778 |
elsif ( $timeout !~ m/^\d+$/ ) { |
779 |
warn "The value of the system preference 'timeout' is not correct, defaulting to $default_timeout"; |
780 |
$timeout = $default_timeout; |
781 |
} |
782 |
|
773 |
return $timeout; |
783 |
return $timeout; |
774 |
} |
784 |
} |
775 |
|
785 |
|
776 |
- |
|
|