# HG changeset patch # User Dan # Date 1232933732 18000 # Node ID 28d9fbcd4f0d3e1acda807f41c7b215e6f7c653b # Parent 4596c40aaa940d0468951224995006ccf54de369 Login: reauth: window.location.hash is now updated to include the new SID so that page reloads will use it diff -r 4596c40aaa94 -r 28d9fbcd4f0d includes/clientside/static/enano-lib-basic.js --- a/includes/clientside/static/enano-lib-basic.js Sun Jan 25 20:35:06 2009 -0500 +++ b/includes/clientside/static/enano-lib-basic.js Sun Jan 25 20:35:32 2009 -0500 @@ -472,6 +472,19 @@ /*!END_INCLUDER*/ addOnloadHook(function() { + if ( $_REQUEST['auth'] ) + { + var key = $_REQUEST['auth']; + var loc = String(window.location); + loc = loc.replace(/#.+$/, '').replace(/&auth=[0-9a-f]+/, '').replace(/\?auth=[0-9a-f]+(&)?/, '$1'); + if ( key != 'false' ) + { + var sep = loc.indexOf('?') != -1 ? '&' : '?'; + loc = loc + sep + 'auth=' + key; + } + console.debug(loc); + window.location = loc; + } if ( $_REQUEST['do'] ) { var act = $_REQUEST['do']; diff -r 4596c40aaa94 -r 28d9fbcd4f0d includes/clientside/static/login.js --- a/includes/clientside/static/login.js Sun Jan 25 20:35:06 2009 -0500 +++ b/includes/clientside/static/login.js Sun Jan 25 20:35:32 2009 -0500 @@ -366,7 +366,7 @@ { json = toJSONString(json); json = ajaxEscape(json); - ajaxPost(makeUrlNS('Special', 'Login/action.json'), 'r=' + json, function() + ajaxPost(makeUrlNS('Special', 'Login/action.json'), 'r=' + json, function(ajax) { if ( ajax.readyState == 4 && ajax.status == 200 ) { @@ -1298,6 +1298,7 @@ { auth_level = level; } + window.location.hash = '#auth:' + key; } else { @@ -1314,5 +1315,6 @@ } } } + window.location.hash = '#auth:false'; } } diff -r 4596c40aaa94 -r 28d9fbcd4f0d themes/oxygen/elements.tpl --- a/themes/oxygen/elements.tpl Sun Jan 25 20:35:06 2009 -0500 +++ b/themes/oxygen/elements.tpl Sun Jan 25 20:35:32 2009 -0500 @@ -55,9 +55,9 @@
- | - | + | + | + |