diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 19:52:10 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 19:52:10 +0000 |
commit | ccb6d625239b59b283b4d3fc00da704ab743d74c (patch) | |
tree | da9b11d8758b3007c025e4d5487410ae1ca69f68 /js/lib | |
parent | 1368785a6b6f9c946dcc5eca078540bacce71f60 (diff) | |
download | elgg-ccb6d625239b59b283b4d3fc00da704ab743d74c.tar.gz elgg-ccb6d625239b59b283b4d3fc00da704ab743d74c.tar.bz2 |
Refs #2543: Updated trunk mods and views to use the new functions from previous 2 commits.
git-svn-id: http://code.elgg.org/elgg/trunk@8079 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/languages.js | 2 | ||||
-rw-r--r-- | js/lib/session.js | 14 | ||||
-rw-r--r-- | js/lib/ui.widgets.js | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/js/lib/languages.js b/js/lib/languages.js index 727e939c0..e8c2ad0ca 100644 --- a/js/lib/languages.js +++ b/js/lib/languages.js @@ -41,7 +41,7 @@ elgg.reload_all_translations = function(language) { * @return {String} */ elgg.get_language = function() { - var user = elgg.get_loggedin_user(); + var user = elgg.elgg_get_logged_in_user_entity(); if (user && user.language) { return user.language; diff --git a/js/lib/session.js b/js/lib/session.js index 613910412..2d319b00f 100644 --- a/js/lib/session.js +++ b/js/lib/session.js @@ -83,30 +83,30 @@ elgg.session.cookie = function (name, value, options) { /** * @return {ElggUser} The logged in user */ -elgg.get_loggedin_user = function() { +elgg.elgg_get_logged_in_user_entity = function() { return elgg.session.user; }; /** * @return {number} The GUID of the logged in user */ -elgg.get_loggedin_userid = function() { - var user = elgg.get_loggedin_user(); +elgg.elgg_get_logged_in_user_guid = function() { + var user = elgg.elgg_get_logged_in_user_entity(); return user ? user.guid : 0; }; /** * @return {boolean} Whether there is a user logged in */ -elgg.isloggedin = function() { - return (elgg.get_loggedin_user() instanceof elgg.ElggUser); +elgg.elgg_is_logged_in = function() { + return (elgg.elgg_get_logged_in_user_entity() instanceof elgg.ElggUser); }; /** * @return {boolean} Whether there is an admin logged in */ -elgg.isadminloggedin = function() { - var user = elgg.get_loggedin_user(); +elgg.elgg_is_admin_logged_in = function() { + var user = elgg.elgg_get_logged_in_user_entity(); return (user instanceof elgg.ElggUser) && user.isAdmin(); }; diff --git a/js/lib/ui.widgets.js b/js/lib/ui.widgets.js index 922029c34..660548a15 100644 --- a/js/lib/ui.widgets.js +++ b/js/lib/ui.widgets.js @@ -56,7 +56,7 @@ elgg.ui.widgets.add = function(event) { elgg.action('widgets/add', { data: { handler: type, - user_guid: elgg.get_loggedin_userid(), + user_guid: elgg.elgg_get_logged_in_user_guid(), context: $("input[name='widget_context']").val() }, success: function(json) { |