mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
removed the fields again, gitsucks
This commit is contained in:
12
src/posts.js
12
src/posts.js
@@ -55,14 +55,6 @@ var RDB = require('./redis'),
|
|||||||
'editor': '',
|
'editor': '',
|
||||||
'edited': 0,
|
'edited': 0,
|
||||||
'deleted': 0
|
'deleted': 0
|
||||||
//TODO : write upgrade script to remove these fields from the database -barisu
|
|
||||||
//'fav_button_class': '',
|
|
||||||
//'fav_star_class': 'fa-star-o',
|
|
||||||
//'show_banned': 'hide',
|
|
||||||
//'relativeTime': new Date(timestamp).toISOString(),
|
|
||||||
//'post_rep': '0',
|
|
||||||
//'edited-class': 'none',
|
|
||||||
//'relativeEditTime': ''
|
|
||||||
};
|
};
|
||||||
|
|
||||||
RDB.hmset('post:' + pid, postData);
|
RDB.hmset('post:' + pid, postData);
|
||||||
@@ -70,8 +62,6 @@ var RDB = require('./redis'),
|
|||||||
postData.favourited = false;
|
postData.favourited = false;
|
||||||
postData.display_moderator_tools = true;
|
postData.display_moderator_tools = true;
|
||||||
postData.relativeTime = new Date(timestamp).toISOString();
|
postData.relativeTime = new Date(timestamp).toISOString();
|
||||||
//TODO : remove this once template bug is fixed -barisu (https://github.com/designcreateplay/NodeBB/issues/574)
|
|
||||||
postData.fav_star_class = 'fa-star-o';
|
|
||||||
|
|
||||||
topics.addPostToTopic(tid, pid);
|
topics.addPostToTopic(tid, pid);
|
||||||
topics.increasePostCount(tid);
|
topics.increasePostCount(tid);
|
||||||
@@ -95,7 +85,7 @@ var RDB = require('./redis'),
|
|||||||
}
|
}
|
||||||
|
|
||||||
RDB.scard('cid:' + cid + ':active_users', function(err, amount) {
|
RDB.scard('cid:' + cid + ':active_users', function(err, amount) {
|
||||||
if (amount > 16) {
|
if (amount > 15) {
|
||||||
RDB.spop('cid:' + cid + ':active_users');
|
RDB.spop('cid:' + cid + ':active_users');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,8 +197,6 @@ var RDB = require('./redis'),
|
|||||||
|
|
||||||
for (var i = 0; i < postData.length; ++i) {
|
for (var i = 0; i < postData.length; ++i) {
|
||||||
postData[i].favourited = fav_data[postData[i].pid] === 1;
|
postData[i].favourited = fav_data[postData[i].pid] === 1;
|
||||||
postData[i].fav_button_class = fav_data[postData[i].pid] ? 'btn-warning' : '';
|
|
||||||
postData[i].fav_star_class = fav_data[postData[i].pid] ? 'fa-star' : 'fa-star-o';
|
|
||||||
postData[i].display_moderator_tools = ((current_user != 0) && (postData[i].uid == current_user || privileges.editable));
|
postData[i].display_moderator_tools = ((current_user != 0) && (postData[i].uid == current_user || privileges.editable));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user