From f0827d7b517988c2dbcc608124455fea2ba5c55f Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 25 Feb 2011 15:29:18 +0100 Subject: [PATCH] Bug #499: Fix: Do not fetch username from user datatable if it is null. (cherry picked from commit 438f3a978c1cb90c07127bb63436d1c5dc4c3672) --- src/sunstone/public/js/one-ui_views.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/sunstone/public/js/one-ui_views.js b/src/sunstone/public/js/one-ui_views.js index b9908da062..fb67fc85b3 100644 --- a/src/sunstone/public/js/one-ui_views.js +++ b/src/sunstone/public/js/one-ui_views.js @@ -2180,14 +2180,17 @@ function setupTips(){ //Crawls the user dataTable for that. If such user is not found, //we return the uid. function getUserName(uid){ - nodes = dataTable_users.fnGetData(); user = "uid "+uid; - $.each(nodes,function(){ - if (uid == this[1]) { - user = this[2]; - return false; - } - }); + if (dataTable_users != null){ + nodes = dataTable_users.fnGetData(); + $.each(nodes,function(){ + if (uid == this[1]) { + user = this[2]; + return false; + } + }); + }; + return user; }