allow timeout to be specified in days

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Joshua Ferraro 2007-11-25 19:41:15 -06:00
parent 62ce10a838
commit db3954aabd

View file

@ -380,8 +380,11 @@ sub checkauth {
my $dbh = C4::Context->dbh;
my $timeout = C4::Context->preference('timeout');
$timeout = 600 unless $timeout;
# days
if ($timeout =~ /(\d*)[dD]/) {
$timeout = $1 * 86400;
};
$timeout = 600 unless $timeout;
# If Version syspref is unavailable, it means Koha is beeing installed,
# and so we must redirect to OPAC maintenance page or to the WebInstaller