mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 08:20:36 +01:00
Merge branch 'master' of https://github.com/psychobunny/NodeBB
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<div class="post-block">
|
<div class="post-block">
|
||||||
<div id="content_{posts.pid}" class="post-content">{posts.content}</div>
|
<div id="content_{posts.pid}" class="post-content">{posts.content}</div>
|
||||||
<div class="profile-block">
|
<div class="profile-block">
|
||||||
<img class="hidden-desktop" src="{posts.gravatar}10" align="left" /> posted by <strong>{posts.username}</strong> {posts.relativeTime} ago
|
<img class="hidden-desktop" src="{posts.gravatar}10" align="left" /> posted by <strong><a href="/users/{posts.uid}">{posts.username}</a></strong> {posts.relativeTime} ago
|
||||||
<span class="post-buttons">
|
<span class="post-buttons">
|
||||||
<div id="ids_{posts.pid}_{posts.uid}" class="edit {posts.display_moderator_tools} hidden-phone"><i class="icon-pencil"></i></div>
|
<div id="ids_{posts.pid}_{posts.uid}" class="edit {posts.display_moderator_tools} hidden-phone"><i class="icon-pencil"></i></div>
|
||||||
<div id="ids_{posts.pid}_{posts.uid}" class="delete {posts.display_moderator_tools} hidden-phone"><i class="icon-trash"></i></div>
|
<div id="ids_{posts.pid}_{posts.uid}" class="delete {posts.display_moderator_tools} hidden-phone"><i class="icon-trash"></i></div>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
usercount = usernames.length;
|
usercount = usernames.length;
|
||||||
|
|
||||||
for (var i = 0, ii=usercount; i<ii; i++) {
|
for (var i = 0, ii=usercount; i<ii; i++) {
|
||||||
usernames[i] = '<strong>' + usernames[i] + '</strong>';
|
usernames[i] = '<strong>' + '<a href="/users/'+users.uids[i]+'">' + usernames[i] + '</a></strong>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// headexplosion.gif for fun, to see if I could do this in one line of code. feel free to refactor haha
|
// headexplosion.gif for fun, to see if I could do this in one line of code. feel free to refactor haha
|
||||||
|
|||||||
@@ -332,12 +332,20 @@ passport.deserializeUser(function(uid, done) {
|
|||||||
if (req.user === undefined)
|
if (req.user === undefined)
|
||||||
return res.redirect('/403');
|
return res.redirect('/403');
|
||||||
|
|
||||||
user.getUserData(req.user.uid, function(data) {
|
var requestedUserId = req.user.uid;
|
||||||
|
|
||||||
data.joindate = utils.relativeTime(data.joindate);
|
if(req.params.id != req.user.uid)
|
||||||
|
requestedUserId = req.params.id;
|
||||||
|
|
||||||
var userData = {user:data};
|
user.getUserData(requestedUserId, function(data) {
|
||||||
callback(userData);
|
if(data)
|
||||||
|
{
|
||||||
|
data.joindate = utils.relativeTime(data.joindate);
|
||||||
|
|
||||||
|
callback({user:data});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
callback({user:{}});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user