Add missing number conversion (fixed #108)
authorSteven Barth <steven@midlink.org>
Sun, 17 Aug 2008 14:37:53 +0000 (14:37 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 17 Aug 2008 14:37:53 +0000 (14:37 +0000)
modules/admin-core/luasrc/tools/webadmin.lua

index 1fda11e..7f123ec 100644 (file)
@@ -34,6 +34,8 @@ function date_format(secs)
        local mins = 0
        local hour = 0
        local days = 0
+       
+       secs = math.floor(tonumber(secs))
        if secs > 60 then
                mins = math.floor(secs / 60)
                secs = secs % 60