diff --git a/public/js/wn/upload.js b/public/js/wn/upload.js index 0a909ab895..b131b2c72d 100644 --- a/public/js/wn/upload.js +++ b/public/js/wn/upload.js @@ -9,7 +9,9 @@ wn.upload = { '+wn._('Upload a file')+':
\

\ OR:

\ -

e.g. http://example.com/somefile.png


\ +

' + + (opts.sample_url || 'e.g. http://example.com/somefile.png') + + '


\ \ ', { id: id, diff --git a/webnotes/sessions.py b/webnotes/sessions.py index e36f4b426e..1fe3bfc0ac 100644 --- a/webnotes/sessions.py +++ b/webnotes/sessions.py @@ -30,6 +30,7 @@ permission, homepage, control panel variables, system defaults etc import webnotes import conf import json +from webnotes.utils import cint @webnotes.whitelist() def clear(user=None): @@ -193,7 +194,7 @@ class Session: def get_expiry_in_seconds(self, expiry): if not expiry: return 3600 parts = expiry.split(":") - return (int(parts[0]) * 3600) + (int(parts[1]) * 60) + int(parts[2]) + return (cint(parts[0]) * 3600) + (cint(parts[1]) * 60) + cint(parts[2]) def delete_session(self): webnotes.cache().delete_value("session:" + self.sid)