[open-ils-commits] r9538 -
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 8 13:58:27 EDT 2008
Author: erickson
Date: 2008-05-08 13:58:24 -0400 (Thu, 08 May 2008)
New Revision: 9538
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/header.html
Log:
removed hard-coded expire time on ses cookie, setting ses cookie when reading it from the url
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/header.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/header.html 2008-05-08 17:50:37 UTC (rev 9537)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/header.html 2008-05-08 17:58:24 UTC (rev 9538)
@@ -11,9 +11,12 @@
<span id='oils-base-header-auto-login'>${_('Auto-login is enabled')}</span>|
<script src='/opac/common/js//Cookies.js'> </script>
<script>
+ dojo.require('dojo.cookie');
dojo.require('openils.User');
dojo.require('openils.Event');
- var authtoken = '${c.oils.core.authtoken.value}';
+ dojo.require('openils.CGI');
+
+ var authtoken = dojo.cookie('ses') || new openils.CGI().param('ses');
var username = '${pylons.config.get("oils_demo_user")}';
var password = '${pylons.config.get("oils_demo_password")}';
var user;
@@ -28,8 +31,7 @@
login:true
});
user.getBySession();
- dojo.require('dojo.cookie');
- dojo.cookie('ses', user.authtoken, {expires:1});
+ dojo.cookie('ses', user.authtoken);
}
if(authtoken) {
@@ -37,6 +39,8 @@
var res = user.getBySession();
if(openils.Event.parse(res))
dologin();
+ else /* in case we got the ses from the URL */
+ dojo.cookie('ses', user.authtoken);
} else {
dologin();
}
More information about the open-ils-commits
mailing list