mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-23 12:50:56 +01:00
fixed settings
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
<div class="account-username-box clearfix" data-userslug="{userslug}" data-uid="{uid}">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="account">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
@@ -33,4 +37,7 @@
|
||||
<div class="form-actions">
|
||||
<a id="submitBtn" href="#" class="btn btn-primary">[[global:save_changes]]</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" template-variable="yourid" value="{yourid}" />
|
||||
<input type="hidden" template-variable="theirid" value="{theirid}" />
|
||||
@@ -342,7 +342,8 @@ var fs = require('fs'),
|
||||
error: 'User not found!'
|
||||
});
|
||||
}
|
||||
|
||||
userData.yourid = req.user.uid;
|
||||
userData.theirid = uid;
|
||||
userData.settings = settings;
|
||||
res.json(userData);
|
||||
});
|
||||
|
||||
@@ -675,10 +675,8 @@ var async = require('async'),
|
||||
|
||||
Topics.getTopicsByTids = function(tids, cid, current_user, callback) {
|
||||
|
||||
var retrieved_topics = [];
|
||||
|
||||
if (!Array.isArray(tids) || tids.length === 0) {
|
||||
return callback(null, retrieved_topics);
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
function getTopicInfo(topicData, callback) {
|
||||
@@ -748,6 +746,10 @@ var async = require('async'),
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (!isTopicVisible(topicData, topicInfo)) {
|
||||
return next();
|
||||
}
|
||||
|
||||
topicData['pin-icon'] = parseInt(topicData.pinned, 10) === 1 ? 'fa-thumb-tack' : 'none';
|
||||
topicData['lock-icon'] = parseInt(topicData.locked, 10) === 1 ? 'fa-lock' : 'none';
|
||||
topicData['deleted-class'] = parseInt(topicData.deleted, 10) === 1 ? 'deleted' : '';
|
||||
@@ -768,19 +770,22 @@ var async = require('async'),
|
||||
topicData.teaser_pid = topicInfo.teaserInfo.pid;
|
||||
topicData.teaser_timestamp = utils.toISOString(topicInfo.teaserInfo.timestamp);
|
||||
|
||||
if (isTopicVisible(topicData, topicInfo)) {
|
||||
retrieved_topics.push(topicData);
|
||||
}
|
||||
|
||||
next(null);
|
||||
next(null, topicData);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async.eachSeries(tids, loadTopic, function(err) {
|
||||
callback(err, retrieved_topics);
|
||||
});
|
||||
async.map(tids, loadTopic, function(err, topics) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
topics = topics.filter(function(topic) {
|
||||
return !!topic;
|
||||
});
|
||||
|
||||
callback(null, topics);
|
||||
});
|
||||
}
|
||||
|
||||
Topics.getTopicWithPosts = function(tid, current_user, start, end, quiet, callback) {
|
||||
|
||||
Reference in New Issue
Block a user