mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
ESlint quote-props
This commit is contained in:
@@ -102,7 +102,7 @@
|
|||||||
"prefer-rest-params": "off",
|
"prefer-rest-params": "off",
|
||||||
"space-in-parens": "off",
|
"space-in-parens": "off",
|
||||||
"block-spacing": "off",
|
"block-spacing": "off",
|
||||||
"quote-props": "off",
|
// "quote-props": "off",
|
||||||
// "space-unary-ops": "off",
|
// "space-unary-ops": "off",
|
||||||
// "no-plusplus": "off",
|
// "no-plusplus": "off",
|
||||||
// "no-empty": "off",
|
// "no-empty": "off",
|
||||||
|
|||||||
@@ -179,10 +179,10 @@
|
|||||||
var env = utils.findBootstrapEnvironment();
|
var env = utils.findBootstrapEnvironment();
|
||||||
|
|
||||||
var slideout = new Slideout({
|
var slideout = new Slideout({
|
||||||
'panel': document.getElementById('panel'),
|
panel: document.getElementById('panel'),
|
||||||
'menu': document.getElementById('menu'),
|
menu: document.getElementById('menu'),
|
||||||
'padding': 256,
|
padding: 256,
|
||||||
'tolerance': 70,
|
tolerance: 70,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (env === 'md' || env === 'lg') {
|
if (env === 'md' || env === 'lg') {
|
||||||
@@ -205,20 +205,20 @@
|
|||||||
if (env === 'md' || env === 'lg') {
|
if (env === 'md' || env === 'lg') {
|
||||||
slideout.disableTouch();
|
slideout.disableTouch();
|
||||||
$('#header').css({
|
$('#header').css({
|
||||||
'position': 'relative',
|
position: 'relative',
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
slideout.enableTouch();
|
slideout.enableTouch();
|
||||||
$('#header').css({
|
$('#header').css({
|
||||||
'position': 'fixed',
|
position: 'fixed',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function onOpeningMenu() {
|
function onOpeningMenu() {
|
||||||
$('#header').css({
|
$('#header').css({
|
||||||
'top': $('#panel').position().top * -1 + 'px',
|
top: $('#panel').position().top * -1 + 'px',
|
||||||
'position': 'absolute',
|
position: 'absolute',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,8 +226,8 @@
|
|||||||
|
|
||||||
slideout.on('close', function () {
|
slideout.on('close', function () {
|
||||||
$('#header').css({
|
$('#header').css({
|
||||||
'top': '0px',
|
top: '0px',
|
||||||
'position': 'fixed',
|
position: 'fixed',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ define('admin/advanced/errors', ['Chart', 'translator'], function (Chart, transl
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'toobusy': {
|
toobusy: {
|
||||||
labels: dailyLabels,
|
labels: dailyLabels,
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s
|
|||||||
|
|
||||||
function updateTopicsGraph(topics) {
|
function updateTopicsGraph(topics) {
|
||||||
if (!Object.keys(topics).length) {
|
if (!Object.keys(topics).length) {
|
||||||
topics = {"0": {
|
topics = {0: {
|
||||||
title: "No users browsing",
|
title: "No users browsing",
|
||||||
value: 1,
|
value: 1,
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ define('forum/account/edit/password', ['forum/account/header', 'translator'], fu
|
|||||||
if ((passwordvalid && passwordsmatch) || app.user.isAdmin) {
|
if ((passwordvalid && passwordsmatch) || app.user.isAdmin) {
|
||||||
btn.addClass('disabled').find('i').removeClass('hide');
|
btn.addClass('disabled').find('i').removeClass('hide');
|
||||||
socket.emit('user.changePassword', {
|
socket.emit('user.changePassword', {
|
||||||
'currentPassword': currentPassword.val(),
|
currentPassword: currentPassword.val(),
|
||||||
'newPassword': password.val(),
|
newPassword: password.val(),
|
||||||
'uid': ajaxify.data.theirid,
|
uid: ajaxify.data.theirid,
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
btn.removeClass('disabled').find('i').addClass('hide');
|
btn.removeClass('disabled').find('i').addClass('hide');
|
||||||
currentPassword.val('');
|
currentPassword.val('');
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ define('forum/chats', [
|
|||||||
} else {
|
} else {
|
||||||
var recentEl = components.get('chat/recent');
|
var recentEl = components.get('chat/recent');
|
||||||
templates.parse('partials/chats/recent_room', {
|
templates.parse('partials/chats/recent_room', {
|
||||||
rooms: { "roomId": data.roomId, "lastUser": data.message.fromUser, "usernames": data.message.fromUser.username, "unread": true },
|
rooms: { roomId: data.roomId, lastUser: data.message.fromUser, usernames: data.message.fromUser.username, unread: true },
|
||||||
}, function (html) {
|
}, function (html) {
|
||||||
translator.translate(html, function (translated) {
|
translator.translate(html, function (translated) {
|
||||||
recentEl.prepend(translated);
|
recentEl.prepend(translated);
|
||||||
|
|||||||
@@ -279,8 +279,8 @@ define('forum/topic', [
|
|||||||
if (ajaxify.data.postcount > ajaxify.data.bookmarkThreshold && (!currentBookmark || parseInt(index, 10) > parseInt(currentBookmark, 10))) {
|
if (ajaxify.data.postcount > ajaxify.data.bookmarkThreshold && (!currentBookmark || parseInt(index, 10) > parseInt(currentBookmark, 10))) {
|
||||||
if (app.user.uid) {
|
if (app.user.uid) {
|
||||||
socket.emit('topics.bookmark', {
|
socket.emit('topics.bookmark', {
|
||||||
'tid': ajaxify.data.tid,
|
tid: ajaxify.data.tid,
|
||||||
'index': index,
|
index: index,
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ $('document').ready(function () {
|
|||||||
|
|
||||||
if ($('form .admin .error').length) {
|
if ($('form .admin .error').length) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
$('html, body').animate({'scrollTop': '0px'}, 400);
|
$('html, body').animate({scrollTop: '0px'}, 400);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ define('components', function () {
|
|||||||
return $('[component="topic/teaser"]');
|
return $('[component="topic/teaser"]');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'topic': function (name, value) {
|
topic: function (name, value) {
|
||||||
return $('[component="topic"][data-' + name + '="' + value + '"]');
|
return $('[component="topic"][data-' + name + '="' + value + '"]');
|
||||||
},
|
},
|
||||||
'post': function (name, value) {
|
post: function (name, value) {
|
||||||
return $('[component="post"][data-' + name + '="' + value + '"]');
|
return $('[component="post"][data-' + name + '="' + value + '"]');
|
||||||
},
|
},
|
||||||
'post/content': function (pid) {
|
'post/content': function (pid) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ define('search', ['navigator', 'translator'], function (nav, translator) {
|
|||||||
var postedBy = data.by || '';
|
var postedBy = data.by || '';
|
||||||
var query = {
|
var query = {
|
||||||
term: data.term,
|
term: data.term,
|
||||||
'in': searchIn,
|
in: searchIn,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (postedBy && (searchIn === 'posts' || searchIn === 'titles' || searchIn === 'titlesposts')) {
|
if (postedBy && (searchIn === 'posts' || searchIn === 'titles' || searchIn === 'titlesposts')) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ define('settings/array', function () {
|
|||||||
*/
|
*/
|
||||||
function createRemoveButton(elements) {
|
function createRemoveButton(elements) {
|
||||||
var rm = $(helper.createElement('button', {
|
var rm = $(helper.createElement('button', {
|
||||||
"class": 'btn btn-xs btn-primary remove',
|
class: 'btn btn-xs btn-primary remove',
|
||||||
title: 'Remove Item',
|
title: 'Remove Item',
|
||||||
}, '-'));
|
}, '-'));
|
||||||
rm.click(function (event) {
|
rm.click(function (event) {
|
||||||
@@ -75,7 +75,7 @@ define('settings/array', function () {
|
|||||||
var addSpace = $(document.createTextNode(' '));
|
var addSpace = $(document.createTextNode(' '));
|
||||||
var newValue = element.data('new') || '';
|
var newValue = element.data('new') || '';
|
||||||
var add = $(helper.createElement('button', {
|
var add = $(helper.createElement('button', {
|
||||||
"class": 'btn btn-sm btn-primary add',
|
class: 'btn btn-sm btn-primary add',
|
||||||
title: 'Expand Array',
|
title: 'Expand Array',
|
||||||
}, '+'));
|
}, '+'));
|
||||||
add.click(function (event) {
|
add.click(function (event) {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ require.config({
|
|||||||
waitSeconds: 7,
|
waitSeconds: 7,
|
||||||
urlArgs: config['cache-buster'],
|
urlArgs: config['cache-buster'],
|
||||||
paths: {
|
paths: {
|
||||||
'forum': '../client',
|
forum: '../client',
|
||||||
'admin': '../admin',
|
admin: '../admin',
|
||||||
'vendor': '../../vendor',
|
vendor: '../../vendor',
|
||||||
'plugins': '../../plugins',
|
plugins: '../../plugins',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -165,29 +165,29 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
extensionMimeTypeMap: {
|
extensionMimeTypeMap: {
|
||||||
"bmp": "image/bmp",
|
bmp: "image/bmp",
|
||||||
"cmx": "image/x-cmx",
|
cmx: "image/x-cmx",
|
||||||
"cod": "image/cis-cod",
|
cod: "image/cis-cod",
|
||||||
"gif": "image/gif",
|
gif: "image/gif",
|
||||||
"ico": "image/x-icon",
|
ico: "image/x-icon",
|
||||||
"ief": "image/ief",
|
ief: "image/ief",
|
||||||
"jfif": "image/pipeg",
|
jfif: "image/pipeg",
|
||||||
"jpe": "image/jpeg",
|
jpe: "image/jpeg",
|
||||||
"jpeg": "image/jpeg",
|
jpeg: "image/jpeg",
|
||||||
"jpg": "image/jpeg",
|
jpg: "image/jpeg",
|
||||||
"png": "image/png",
|
png: "image/png",
|
||||||
"pbm": "image/x-portable-bitmap",
|
pbm: "image/x-portable-bitmap",
|
||||||
"pgm": "image/x-portable-graymap",
|
pgm: "image/x-portable-graymap",
|
||||||
"pnm": "image/x-portable-anymap",
|
pnm: "image/x-portable-anymap",
|
||||||
"ppm": "image/x-portable-pixmap",
|
ppm: "image/x-portable-pixmap",
|
||||||
"ras": "image/x-cmu-raster",
|
ras: "image/x-cmu-raster",
|
||||||
"rgb": "image/x-rgb",
|
rgb: "image/x-rgb",
|
||||||
"svg": "image/svg+xml",
|
svg: "image/svg+xml",
|
||||||
"tif": "image/tiff",
|
tif: "image/tiff",
|
||||||
"tiff": "image/tiff",
|
tiff: "image/tiff",
|
||||||
"xbm": "image/x-xbitmap",
|
xbm: "image/x-xbitmap",
|
||||||
"xpm": "image/x-xpixmap",
|
xpm: "image/x-xpixmap",
|
||||||
"xwd": "image/x-xwindowdump",
|
xwd: "image/x-xwindowdump",
|
||||||
},
|
},
|
||||||
|
|
||||||
fileMimeType: function (path) {
|
fileMimeType: function (path) {
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ Analytics.getCategoryAnalytics = function (cid, callback) {
|
|||||||
Analytics.getErrorAnalytics = function (callback) {
|
Analytics.getErrorAnalytics = function (callback) {
|
||||||
async.parallel({
|
async.parallel({
|
||||||
'not-found': async.apply(Analytics.getDailyStatsForSet, 'analytics:errors:404', Date.now(), 7),
|
'not-found': async.apply(Analytics.getDailyStatsForSet, 'analytics:errors:404', Date.now(), 7),
|
||||||
'toobusy': async.apply(Analytics.getDailyStatsForSet, 'analytics:errors:503', Date.now(), 7),
|
toobusy: async.apply(Analytics.getDailyStatsForSet, 'analytics:errors:503', Date.now(), 7),
|
||||||
}, callback);
|
}, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ settingsController.get = function (req, res, callback) {
|
|||||||
userData.homePageRoutes = results.homePageRoutes;
|
userData.homePageRoutes = results.homePageRoutes;
|
||||||
|
|
||||||
var soundSettings = {
|
var soundSettings = {
|
||||||
'notificationSound': 'notification',
|
notificationSound: 'notification',
|
||||||
'incomingChatSound': 'chat-incoming',
|
incomingChatSound: 'chat-incoming',
|
||||||
'outgoingChatSound': 'chat-outgoing',
|
outgoingChatSound: 'chat-outgoing',
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.keys(soundSettings).forEach(function (setting) {
|
Object.keys(soundSettings).forEach(function (setting) {
|
||||||
@@ -83,23 +83,23 @@ settingsController.get = function (req, res, callback) {
|
|||||||
|
|
||||||
|
|
||||||
userData.bootswatchSkinOptions = [
|
userData.bootswatchSkinOptions = [
|
||||||
{ "name": "Default", "value": "default" },
|
{ name: "Default", value: "default" },
|
||||||
{ "name": "Cerulean", "value": "cerulean" },
|
{ name: "Cerulean", value: "cerulean" },
|
||||||
{ "name": "Cosmo", "value": "cosmo" },
|
{ name: "Cosmo", value: "cosmo" },
|
||||||
{ "name": "Cyborg", "value": "cyborg" },
|
{ name: "Cyborg", value: "cyborg" },
|
||||||
{ "name": "Darkly", "value": "darkly" },
|
{ name: "Darkly", value: "darkly" },
|
||||||
{ "name": "Flatly", "value": "flatly" },
|
{ name: "Flatly", value: "flatly" },
|
||||||
{ "name": "Journal", "value": "journal" },
|
{ name: "Journal", value: "journal" },
|
||||||
{ "name": "Lumen", "value": "lumen" },
|
{ name: "Lumen", value: "lumen" },
|
||||||
{ "name": "Paper", "value": "paper" },
|
{ name: "Paper", value: "paper" },
|
||||||
{ "name": "Readable", "value": "readable" },
|
{ name: "Readable", value: "readable" },
|
||||||
{ "name": "Sandstone", "value": "sandstone" },
|
{ name: "Sandstone", value: "sandstone" },
|
||||||
{ "name": "Simplex", "value": "simplex" },
|
{ name: "Simplex", value: "simplex" },
|
||||||
{ "name": "Slate", "value": "slate" },
|
{ name: "Slate", value: "slate" },
|
||||||
{ "name": "Spacelab", "value": "spacelab" },
|
{ name: "Spacelab", value: "spacelab" },
|
||||||
{ "name": "Superhero", "value": "superhero" },
|
{ name: "Superhero", value: "superhero" },
|
||||||
{ "name": "United", "value": "united" },
|
{ name: "United", value: "united" },
|
||||||
{ "name": "Yeti", "value": "yeti" },
|
{ name: "Yeti", value: "yeti" },
|
||||||
];
|
];
|
||||||
|
|
||||||
var isCustom = true;
|
var isCustom = true;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ Controllers.register = function (req, res, next) {
|
|||||||
var loginStrategies = require('../routes/authentication').getLoginStrategies();
|
var loginStrategies = require('../routes/authentication').getLoginStrategies();
|
||||||
var data = {
|
var data = {
|
||||||
'register_window:spansize': loginStrategies.length ? 'col-md-6' : 'col-md-12',
|
'register_window:spansize': loginStrategies.length ? 'col-md-6' : 'col-md-12',
|
||||||
'alternate_logins': !!loginStrategies.length,
|
alternate_logins: !!loginStrategies.length,
|
||||||
};
|
};
|
||||||
|
|
||||||
data.authentication = loginStrategies;
|
data.authentication = loginStrategies;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ var pagination = require('../pagination');
|
|||||||
|
|
||||||
var recentController = {};
|
var recentController = {};
|
||||||
|
|
||||||
var validFilter = {'': true, 'new': true, 'watched': true};
|
var validFilter = {'': true, new: true, watched: true};
|
||||||
|
|
||||||
recentController.get = function (req, res, next) {
|
recentController.get = function (req, res, next) {
|
||||||
var page = parseInt(req.query.page, 10) || 1;
|
var page = parseInt(req.query.page, 10) || 1;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ var helpers = require('./helpers');
|
|||||||
|
|
||||||
var unreadController = {};
|
var unreadController = {};
|
||||||
|
|
||||||
var validFilter = {'': true, 'new': true, 'watched': true};
|
var validFilter = {'': true, new: true, watched: true};
|
||||||
|
|
||||||
unreadController.get = function (req, res, next) {
|
unreadController.get = function (req, res, next) {
|
||||||
var page = parseInt(req.query.page, 10) || 1;
|
var page = parseInt(req.query.page, 10) || 1;
|
||||||
|
|||||||
@@ -17,17 +17,17 @@
|
|||||||
{
|
{
|
||||||
name: 'mongo:host',
|
name: 'mongo:host',
|
||||||
description: 'Host IP or address of your MongoDB instance',
|
description: 'Host IP or address of your MongoDB instance',
|
||||||
'default': nconf.get('mongo:host') || '127.0.0.1',
|
default: nconf.get('mongo:host') || '127.0.0.1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'mongo:port',
|
name: 'mongo:port',
|
||||||
description: 'Host port of your MongoDB instance',
|
description: 'Host port of your MongoDB instance',
|
||||||
'default': nconf.get('mongo:port') || 27017,
|
default: nconf.get('mongo:port') || 27017,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'mongo:username',
|
name: 'mongo:username',
|
||||||
description: 'MongoDB username',
|
description: 'MongoDB username',
|
||||||
'default': nconf.get('mongo:username') || '',
|
default: nconf.get('mongo:username') || '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'mongo:password',
|
name: 'mongo:password',
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
{
|
{
|
||||||
name: "mongo:database",
|
name: "mongo:database",
|
||||||
description: "MongoDB database name",
|
description: "MongoDB database name",
|
||||||
'default': nconf.get('mongo:database') || 'nodebb',
|
default: nconf.get('mongo:database') || 'nodebb',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -189,10 +189,10 @@
|
|||||||
}
|
}
|
||||||
async.parallel({
|
async.parallel({
|
||||||
serverStatus: function (next) {
|
serverStatus: function (next) {
|
||||||
db.command({ 'serverStatus': 1 }, next);
|
db.command({ serverStatus: 1 }, next);
|
||||||
},
|
},
|
||||||
stats: function (next) {
|
stats: function (next) {
|
||||||
db.command({ 'dbStats': 1 }, next);
|
db.command({ dbStats: 1 }, next);
|
||||||
},
|
},
|
||||||
listCollections: function (next) {
|
listCollections: function (next) {
|
||||||
db.listCollections().toArray(function (err, items) {
|
db.listCollections().toArray(function (err, items) {
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
{
|
{
|
||||||
name: 'redis:host',
|
name: 'redis:host',
|
||||||
description: 'Host IP or address of your Redis instance',
|
description: 'Host IP or address of your Redis instance',
|
||||||
'default': nconf.get('redis:host') || '127.0.0.1',
|
default: nconf.get('redis:host') || '127.0.0.1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'redis:port',
|
name: 'redis:port',
|
||||||
description: 'Host port of your Redis instance',
|
description: 'Host port of your Redis instance',
|
||||||
'default': nconf.get('redis:port') || 6379,
|
default: nconf.get('redis:port') || 6379,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'redis:password',
|
name: 'redis:password',
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
{
|
{
|
||||||
name: "redis:database",
|
name: "redis:database",
|
||||||
description: "Which database to use (0..n)",
|
description: "Which database to use (0..n)",
|
||||||
'default': nconf.get('redis:database') || 0,
|
default: nconf.get('redis:database') || 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ questions.main = [
|
|||||||
{
|
{
|
||||||
name: 'url',
|
name: 'url',
|
||||||
description: 'URL used to access this NodeBB',
|
description: 'URL used to access this NodeBB',
|
||||||
'default':
|
default:
|
||||||
nconf.get('url') ||
|
nconf.get('url') ||
|
||||||
(nconf.get('base_url') ? (nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '')) : null) || // backwards compatibility (remove for v0.7.0)
|
(nconf.get('base_url') ? (nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '')) : null) || // backwards compatibility (remove for v0.7.0)
|
||||||
'http://localhost:4567',
|
'http://localhost:4567',
|
||||||
@@ -25,12 +25,12 @@ questions.main = [
|
|||||||
{
|
{
|
||||||
name: 'secret',
|
name: 'secret',
|
||||||
description: 'Please enter a NodeBB secret',
|
description: 'Please enter a NodeBB secret',
|
||||||
'default': nconf.get('secret') || utils.generateUUID(),
|
default: nconf.get('secret') || utils.generateUUID(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'database',
|
name: 'database',
|
||||||
description: 'Which database to use',
|
description: 'Which database to use',
|
||||||
'default': nconf.get('database') || 'mongo',
|
default: nconf.get('database') || 'mongo',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ module.exports = function (middleware) {
|
|||||||
|
|
||||||
middleware.admin.renderHeader = function (req, res, data, next) {
|
middleware.admin.renderHeader = function (req, res, data, next) {
|
||||||
var custom_header = {
|
var custom_header = {
|
||||||
'plugins': [],
|
plugins: [],
|
||||||
'authentication': [],
|
authentication: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
user.getUserFields(req.uid, ['username', 'userslug', 'email', 'picture', 'email:confirmed'], function (err, userData) {
|
user.getUserFields(req.uid, ['username', 'userslug', 'email', 'picture', 'email:confirmed'], function (err, userData) {
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ module.exports = function (Posts) {
|
|||||||
function (pid, next) {
|
function (pid, next) {
|
||||||
|
|
||||||
postData = {
|
postData = {
|
||||||
'pid': pid,
|
pid: pid,
|
||||||
'uid': uid,
|
uid: uid,
|
||||||
'tid': tid,
|
tid: tid,
|
||||||
'content': content,
|
content: content,
|
||||||
'timestamp': timestamp,
|
timestamp: timestamp,
|
||||||
'deleted': 0,
|
deleted: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.toPid) {
|
if (data.toPid) {
|
||||||
|
|||||||
@@ -30,19 +30,19 @@ module.exports = function (Topics) {
|
|||||||
},
|
},
|
||||||
function (tid, next) {
|
function (tid, next) {
|
||||||
topicData = {
|
topicData = {
|
||||||
'tid': tid,
|
tid: tid,
|
||||||
'uid': data.uid,
|
uid: data.uid,
|
||||||
'cid': data.cid,
|
cid: data.cid,
|
||||||
'mainPid': 0,
|
mainPid: 0,
|
||||||
'title': data.title,
|
title: data.title,
|
||||||
'slug': tid + '/' + (utils.slugify(data.title) || 'topic'),
|
slug: tid + '/' + (utils.slugify(data.title) || 'topic'),
|
||||||
'timestamp': timestamp,
|
timestamp: timestamp,
|
||||||
'lastposttime': 0,
|
lastposttime: 0,
|
||||||
'postcount': 0,
|
postcount: 0,
|
||||||
'viewcount': 0,
|
viewcount: 0,
|
||||||
'locked': 0,
|
locked: 0,
|
||||||
'deleted': 0,
|
deleted: 0,
|
||||||
'pinned': 0,
|
pinned: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.thumb) {
|
if (data.thumb) {
|
||||||
|
|||||||
@@ -24,25 +24,25 @@ module.exports = function (User) {
|
|||||||
var timestamp = data.timestamp || Date.now();
|
var timestamp = data.timestamp || Date.now();
|
||||||
|
|
||||||
var userData = {
|
var userData = {
|
||||||
'username': data.username,
|
username: data.username,
|
||||||
'userslug': data.userslug,
|
userslug: data.userslug,
|
||||||
'email': data.email || '',
|
email: data.email || '',
|
||||||
'joindate': timestamp,
|
joindate: timestamp,
|
||||||
'lastonline': timestamp,
|
lastonline: timestamp,
|
||||||
'picture': '',
|
picture: '',
|
||||||
'fullname': data.fullname || '',
|
fullname: data.fullname || '',
|
||||||
'location': '',
|
location: '',
|
||||||
'birthday': '',
|
birthday: '',
|
||||||
'website': '',
|
website: '',
|
||||||
'signature': '',
|
signature: '',
|
||||||
'uploadedpicture': '',
|
uploadedpicture: '',
|
||||||
'profileviews': 0,
|
profileviews: 0,
|
||||||
'reputation': 0,
|
reputation: 0,
|
||||||
'postcount': 0,
|
postcount: 0,
|
||||||
'topiccount': 0,
|
topiccount: 0,
|
||||||
'lastposttime': 0,
|
lastposttime: 0,
|
||||||
'banned': 0,
|
banned: 0,
|
||||||
'status': 'online',
|
status: 'online',
|
||||||
};
|
};
|
||||||
|
|
||||||
async.parallel({
|
async.parallel({
|
||||||
|
|||||||
Reference in New Issue
Block a user