* Added User.popLocation() and User.popLocation() methods for temporarily storing a user's location, ie. to get back where the user came from when it was necessary to login
* Removed Root.searchSites() method (will be back later) * Added checks for empty searches in Site.search_action()
This commit is contained in:
parent
3d0fae4302
commit
1c3c51a0e1
7 changed files with 46 additions and 72 deletions
|
@ -232,7 +232,7 @@ User.logout = function() {
|
|||
session.logout();
|
||||
res.setCookie(User.COOKIE, String.EMPTY);
|
||||
res.setCookie(User.HASHCOOKIE, String.EMPTY);
|
||||
delete session.data.referrer;
|
||||
User.popLocation();
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -258,3 +258,17 @@ User.getMembership = function() {
|
|||
}
|
||||
return membership || new Membership;
|
||||
};
|
||||
|
||||
User.pushLocation = function(url) {
|
||||
if (!session.data.location) {
|
||||
res.debug("Pushing location " + url);
|
||||
session.data.location = url;
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
User.popLocation = function() {
|
||||
var url = session.data.location;
|
||||
delete session.data.location;
|
||||
return url;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue