aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-14 23:16:51 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-14 23:16:51 +0000
commit0aef164c847101e0fb9b63b4931a7c188e7b4f0e (patch)
treeefd10ea83a662a841b6045c2ebded636a74735f6
parent55f6c0370fd3b79671b93993c0a4c10d02c4ed9c (diff)
downloadelgg-0aef164c847101e0fb9b63b4931a7c188e7b4f0e.tar.gz
elgg-0aef164c847101e0fb9b63b4931a7c188e7b4f0e.tar.bz2
No need for double-namespacing of javascript functions
git-svn-id: http://code.elgg.org/elgg/trunk@8235 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--js/lib/languages.js2
-rw-r--r--js/lib/session.js10
-rw-r--r--js/lib/ui.widgets.js2
3 files changed, 7 insertions, 7 deletions
diff --git a/js/lib/languages.js b/js/lib/languages.js
index e8c2ad0ca..e464fc0ff 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.elgg_get_logged_in_user_entity();
+ var user = 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 2d319b00f..48821a260 100644
--- a/js/lib/session.js
+++ b/js/lib/session.js
@@ -83,15 +83,15 @@ elgg.session.cookie = function (name, value, options) {
/**
* @return {ElggUser} The logged in user
*/
-elgg.elgg_get_logged_in_user_entity = function() {
+elgg.get_logged_in_user_entity = function() {
return elgg.session.user;
};
/**
* @return {number} The GUID of the logged in user
*/
-elgg.elgg_get_logged_in_user_guid = function() {
- var user = elgg.elgg_get_logged_in_user_entity();
+elgg.get_logged_in_user_guid = function() {
+ var user = elgg.get_logged_in_user_entity();
return user ? user.guid : 0;
};
@@ -99,14 +99,14 @@ elgg.elgg_get_logged_in_user_guid = function() {
* @return {boolean} Whether there is a user logged in
*/
elgg.elgg_is_logged_in = function() {
- return (elgg.elgg_get_logged_in_user_entity() instanceof elgg.ElggUser);
+ return (elgg.get_logged_in_user_entity() instanceof elgg.ElggUser);
};
/**
* @return {boolean} Whether there is an admin logged in
*/
elgg.elgg_is_admin_logged_in = function() {
- var user = elgg.elgg_get_logged_in_user_entity();
+ var user = 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 660548a15..b6e81617a 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.elgg_get_logged_in_user_guid(),
+ user_guid: elgg.get_logged_in_user_guid(),
context: $("input[name='widget_context']").val()
},
success: function(json) {