[Koha] possible error at staff interface

Indranil Das Gupta indradg at gmail.com
Fri Mar 13 13:25:29 NZDT 2015


Hi,

On Fri, Mar 13, 2015 at 5:23 AM, Riley Childs <rchilds at cucawarriors.com> wrote:
> I think this is a doc issue, not a UI/code issue, I recommend you open a ticket
> at http://bugs.koha-community.org.

@Riley: Nope! Not a bug, the time is actually in seconds! See
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6701

@Anthony : Koha 3.4 is an unsupported version. The manual for the
latest stable release is at
http://manual.koha-community.org/3.18/en/administration.html

In the latest manual, the timeout syspref is under 1.2.3.4 and NOT
under 1.2.3.5 as with 3.4 manual.

The relevant code segments are in C4::Auth are in _timeout_syspref()
and checkauth()

sub _timeout_syspref {
    my $timeout = C4::Context->preference('timeout') || 600;
    # value in days, convert in seconds
    if ($timeout =~ /(\d+)[dD]/) {
        $timeout = $1 * 86400;
    };
    return $timeout;
}

AND

if ( $lasttime < time() - $timeout ) {

time() is the perl function to return epoch time in seconds. Thus we
are handling seconds and NOT miliseconds.

hope this clarifies the issue.
-idg


-- 
Indranil Das Gupta

Phone : +91-98300-20971
Blog    : http://indradg.randomink.org/blog
IRC      : indradg on irc://irc.freenode.net
Twitter : indradg

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-
Please exchange editable Office documents only in ODF Format. No other
format is acceptable. Support Open Standards.

For a free editor supporting ODF, please visit LibreOffice -
http://www.documentfoundation.org


More information about the Koha mailing list