rbrindley: branch 2.0 r4582 - /branches/2.0/config/js/session.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Mar 5 09:22:46 CST 2009
Author: rbrindley
Date: Thu Mar 5 09:22:43 2009
New Revision: 4582
URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4582
Log:
- merged cookie fixes from astman_revamp
Modified:
branches/2.0/config/js/session.js
Modified: branches/2.0/config/js/session.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/session.js?view=diff&rev=4582&r1=4581&r2=4582
==============================================================================
--- branches/2.0/config/js/session.js (original)
+++ branches/2.0/config/js/session.js Thu Mar 5 09:22:43 2009
@@ -52,10 +52,10 @@
* Get a Cookie. OM NOM NOM NOM
* @param user Username
*/
-cookies.get = function(user) {
+cookies.get = function(varname) {
var ck = top.document.cookie;
- if (ck.indexOf(user + '=') == -1) {
+ if (ck.indexOf(varname + '=') == -1) {
top.log.warn("Can't seem to find the user in a cookie, exiting.");
return '';
}
@@ -63,8 +63,8 @@
var cookies = ck.split(';');
for (var i=0; i < cookies.length; i++) {
var c = cookies[i].strip();
- if (c.beginsWith(x + '=')) {
- return c.split(x + '=')[1];
+ if (c.beginsWith(varname + '=')) {
+ return c.split(varname + '=')[1];
}
}
More information about the asterisk-gui-commits
mailing list