ESlint padded-blocks

v1.18.x
Peter Jaszkowiak 8 years ago
parent feb8405f95
commit 3b0dd2d1ef

@ -97,7 +97,7 @@
"no-var": "off",
"no-shadow": "off",
"prefer-template": "off",
"padded-blocks": "off",
// "padded-blocks": "off",
// "eol-last": "off",
// "lines-around-directive": "off",
// "strict": "off",

@ -48,7 +48,6 @@ Loader.displayStartupMessages = function (callback) {
};
Loader.addWorkerEvents = function (worker) {
worker.on('exit', function (code, signal) {
if (code !== 0) {
if (Loader.timesStarted < numProcs * 3) {

@ -11,7 +11,6 @@ var Minifier = {
/* Javascript */
Minifier.js.minify = function (scripts, minify, callback) {
scripts = scripts.filter(function (file) {
return file && file.endsWith('.js');
});

@ -5,7 +5,6 @@ define('admin/advanced/events', function () {
var Events = {};
Events.init = function () {
$('[data-action="clear"]').on('click', function () {
socket.emit('admin.deleteAllEvents', function (err) {
if (err) {
@ -14,7 +13,6 @@ define('admin/advanced/events', function () {
$('.events-list').empty();
});
});
};
return Events;

@ -72,7 +72,6 @@ define('admin/appearance/themes', ['translator'], function (translator) {
if (!themes.length) {
instListEl.append($('<li/ >').addClass('no-themes').translateHtml('[[admin/appearance/themes:no-themes]]'));
} else {
templates.parse('admin/partials/theme_list', {
themes: themes,

@ -132,7 +132,6 @@ define('admin/extend/widgets', ['jqueryui'], function (jqueryui) {
timeout: 2500,
});
}
});
});
}

@ -2,7 +2,6 @@
define('admin/general/homepage', ['admin/settings'], function (Settings) {
function toggleCustomRoute() {
if ($('[data-field="homePageRoute"]').val()) {
$('#homePageCustom').hide();

@ -7,7 +7,6 @@ define('admin/manage/flags', [
'components',
'translator',
], function (autocomplete, Chart, components, translator) {
var Flags = {};
Flags.init = function () {

@ -32,7 +32,6 @@ define('admin/manage/group', [
});
groupDetailsSearch.on('keyup', function () {
if (searchDelay) {
clearTimeout(searchDelay);
}
@ -140,7 +139,6 @@ define('admin/manage/group', [
}
userRow.slideUp().remove();
});
});
break;
default:
@ -186,7 +184,6 @@ define('admin/manage/group', [
});
return false;
});
};
return Groups;

@ -2,7 +2,6 @@
define('admin/manage/ip-blacklist', ['translator'], function (translator) {
var Blacklist = {};
Blacklist.init = function () {

@ -5,7 +5,6 @@ define('admin/manage/registration', function () {
var Registration = {};
Registration.init = function () {
$('.users-list').on('click', '[data-action]', function (ev) {
var parent = $(this).parents('[data-username]');
var action = $(this).attr('data-action');

@ -360,7 +360,6 @@ define('admin/manage/users', ['translator'], function (translator) {
handleUserCreate();
handleInvite();
};
function handleInvite() {

@ -81,7 +81,6 @@ $(document).ready(function () {
$('#footer, #content').removeClass('hide').addClass('ajaxifying');
ajaxify.loadData(url, function (err, data) {
if (!err || (err && err.data && (parseInt(err.data.status, 10) !== 302 && parseInt(err.data.status, 10) !== 308))) {
ajaxify.updateHistory(url, quiet);
}
@ -158,7 +157,6 @@ $(document).ready(function () {
app.alertError('[[global:please_log_in]]');
app.previousUrl = url;
window.location.href = config.relative_path + '/login';
} else if (status === 302 || status === 308) {
if (data.responseJSON && data.responseJSON.external) {
window.location.href = data.responseJSON.external;
@ -422,5 +420,4 @@ $(document).ready(function () {
templates.cache[$(this).attr('data-template')] = $('<div/>').html($(this).html()).text();
$(this).parent().remove();
});
});

@ -657,6 +657,5 @@ app.cacheBuster = null;
});
});
});
};
}());

@ -5,7 +5,6 @@ define('forum/account/edit', ['forum/account/header', 'translator', 'components'
var AccountEdit = {};
AccountEdit.init = function () {
header.init();
$('#submitBtn').on('click', updateProfile);
@ -70,7 +69,6 @@ define('forum/account/edit', ['forum/account/header', 'translator', 'components'
}
function handleImageChange() {
$('#changePictureBtn').on('click', function () {
socket.emit('user.getProfilePictures', {uid: ajaxify.data.uid}, function (err, pictures) {
if (err) {

@ -70,7 +70,6 @@ define('forum/account/profile', [
}
app.parseAndTranslate('account/profile', 'posts', {posts: posts}, function (html) {
$('[component="posts"]').append(html);
html.find('.timeago').timeago();

@ -118,7 +118,6 @@ define('forum/category', [
$(window).on('action:ajaxify.contentLoaded', function (ev, data) {
if (ajaxify.data.template.category && ajaxify.data.cid) {
var bookmarkIndex = localStorage.getItem('category:' + ajaxify.data.cid + ':bookmark');
var clickedIndex = localStorage.getItem('category:' + ajaxify.data.cid + ':bookmark:clicked');

@ -8,7 +8,6 @@ define('forum/category/tools', [
'components',
'translator',
], function (move, topicSelect, components, translator) {
var CategoryTools = {};
CategoryTools.init = function (cid) {
@ -161,7 +160,6 @@ define('forum/category/tools', [
}
function updateDropdownOptions() {
var tids = topicSelect.getSelectedTids();
var isAnyDeleted = isAny(isTopicDeleted, tids);
var areAllDeleted = areAll(isTopicDeleted, tids);

@ -60,7 +60,6 @@ define('forum/chats', [
Chats.addSendHandlers(ajaxify.data.roomId, $('.chat-input'), $('.expanded-chat button[data-action="send"]'));
$('[data-action="pop-out"]').on('click', function () {
var text = components.get('chat/input').val();
var roomId = ajaxify.data.roomId;

@ -2,7 +2,6 @@
define('forum/chats/messages', ['components', 'sounds', 'translator'], function (components, sounds, translator) {
var messages = {};
messages.sendMessage = function (roomId, inputEl) {
@ -57,7 +56,6 @@ define('forum/chats/messages', ['components', 'sounds', 'translator'], function
};
messages.appendChatMessage = function (chatContentEl, data) {
var lastSpeaker = parseInt(chatContentEl.find('.chat-message').last().attr('data-uid'), 10);
if (!Array.isArray(data)) {
data.newSet = lastSpeaker !== data.fromuid;

@ -2,7 +2,6 @@
define('forum/chats/recent', function () {
var recent = {};
recent.init = function () {

@ -2,7 +2,6 @@
define('forum/chats/search', ['components'], function (components) {
var search = {};
search.init = function () {

@ -2,7 +2,6 @@
define('forum/footer', ['notifications', 'chat', 'components', 'translator'], function (Notifications, Chat, components, translator) {
Notifications.prepareDOM();
Chat.prepareDOM();
translator.prepareDOM();

@ -10,7 +10,6 @@ define('forum/groups/details', [
'translator',
'vendor/colorpicker/colorpicker',
], function (memberList, iconSelect, components, coverPhoto, pictureCropper, translator) {
var Details = {};
var groupName;

@ -2,7 +2,6 @@
define('forum/groups/memberlist', ['components', 'forum/infinitescroll'], function (components, infinitescroll) {
var MemberList = {};
var searchInterval;
var groupName;

@ -2,7 +2,6 @@
define('forum/infinitescroll', function () {
var scroll = {};
var callback;
var previousScrollTop = 0;

@ -146,7 +146,6 @@ define('forum/recent', ['forum/infinitescroll', 'components'], function (infinit
};
Recent.onTopicsLoaded = function (templateName, topics, showSelect, callback) {
topics = topics.filter(function (topic) {
return !components.get('category/topic', 'tid', topic.tid).length;
});

@ -243,13 +243,11 @@ define('forum/topic', [
var newUrl = 'topic/' + ajaxify.data.slug + (index > 1 ? ('/' + index) : '');
if (newUrl !== currentUrl) {
if (Topic.replaceURLTimeout) {
clearTimeout(Topic.replaceURLTimeout);
}
Topic.replaceURLTimeout = setTimeout(function () {
if (index >= elementCount && app.user.uid) {
socket.emit('topics.markAsRead', [ajaxify.data.tid]);
}
@ -296,7 +294,6 @@ define('forum/topic', [
if (!currentBookmark || parseInt(index, 10) >= parseInt(currentBookmark, 10)) {
app.removeAlert('bookmark');
}
}

@ -2,7 +2,6 @@
define('forum/topic/delete-posts', ['components', 'postSelect'], function (components, postSelect) {
var DeletePosts = {};
var modal;
var deleteBtn;

@ -9,7 +9,6 @@ define('forum/topic/events', [
'components',
'translator',
], function (postTools, threadTools, posts, components, translator) {
var Events = {};
var events = {

@ -2,7 +2,6 @@
define('forum/topic/flag', [], function () {
var Flag = {};
var flagModal;
var flagCommit;

@ -2,7 +2,6 @@
define('forum/topic/fork', ['components', 'postSelect'], function (components, postSelect) {
var Fork = {};
var forkModal;
var forkCommit;

@ -2,7 +2,6 @@
define('forum/topic/move-post', [], function () {
var MovePost = {};
@ -33,7 +32,6 @@ define('forum/topic/move-post', [], function () {
topicId.val('');
});
});
});
};

@ -2,7 +2,6 @@
define('forum/topic/move', function () {
var Move = {};
var modal;
var selectedEl;
@ -22,7 +21,6 @@ define('forum/topic/move', function () {
}
parseModal(categories, function () {
modal.on('hidden.bs.modal', function () {
modal.remove();
});

@ -9,7 +9,6 @@ define('forum/topic/postTools', [
'forum/topic/votes',
'forum/topic/move-post',
], function (share, navigator, components, translator, votes, movePost) {
var PostTools = {};
var staleReplyAnyway = false;
@ -231,7 +230,6 @@ define('forum/topic/postTools', [
var selectedNode = getSelectedNode();
showStaleWarning(function () {
function quote(text) {
$(window).trigger('action:composer.addQuote', {
tid: tid,

@ -8,7 +8,6 @@ define('forum/topic/posts', [
'navigator',
'components',
], function (pagination, infinitescroll, postTools, navigator, components) {
var Posts = {
_imageLoaderTimeout: undefined,
};
@ -178,7 +177,6 @@ define('forum/topic/posts', [
$(window).trigger('action:posts.loading', {posts: data.posts, after: after, before: before});
app.parseAndTranslate('topic', 'posts', data, function (html) {
html = html.filter(function () {
var pid = $(this).attr('data-pid');
return pid && $('[component="post"][data-pid="' + pid + '"]').length === 0;
@ -396,5 +394,4 @@ define('forum/topic/posts', [
}
return Posts;
});

@ -2,7 +2,6 @@
define('forum/topic/replies', ['navigator', 'components', 'forum/topic/posts'], function (navigator, components, posts) {
var Replies = {};
Replies.init = function (tid) {

@ -8,11 +8,9 @@ define('forum/topic/threadTools', [
'components',
'translator',
], function (fork, move, deletePosts, components, translator) {
var ThreadTools = {};
ThreadTools.init = function (tid) {
renderMenu();
var topicContainer = $('.topic');

@ -2,7 +2,6 @@
define('forum/topic/votes', ['components', 'translator'], function (components, translator) {
var Votes = {};
Votes.addVoteHandler = function () {
@ -105,7 +104,6 @@ define('forum/topic/votes', ['components', 'translator'], function (components,
dialog.on('click', function () {
dialog.modal('hide');
});
});
});
});

@ -11,7 +11,6 @@ define('chat', [
'translator',
'scrollStop',
], function (components, taskbar, S, sounds, Chats, ChatsMessages, translator, scrollStop) {
var module = {};
var newMessage = false;
@ -157,7 +156,6 @@ define('chat', [
module.createModal = function (data, callback) {
app.parseAndTranslate('chat', data, function (chatModal) {
var uuid = utils.generateUUID();
var dragged = false;

@ -4,7 +4,6 @@
define('coverPhoto', [
'vendor/jquery/draggable-background/backgroundDraggable',
], function () {
var coverPhoto = {
coverEl: null,
saveFn: null,

@ -280,7 +280,6 @@
if (typeof define === 'function' && define.amd) {
define('helpers', exports);
}
}(
typeof exports === 'object' ? exports :
typeof define === 'function' && define.amd ? {} :

@ -3,7 +3,6 @@
define('navigator', ['forum/pagination', 'components'], function (pagination, components) {
var navigator = {};
var index = 1;
var count = 0;

@ -2,7 +2,6 @@
define('search', ['navigator', 'translator'], function (nav, translator) {
var Search = {
current: {},
};

@ -2,7 +2,6 @@
define('settings', function () {
var DEFAULT_PLUGINS = [
'settings/checkbox',
'settings/number',
@ -541,5 +540,4 @@ define('settings', function () {
});
return Settings;
});

@ -1,7 +1,6 @@
'use strict';
define('settings/array', function () {
var Settings = null;
var SettingsArray;
var helper = null;
@ -145,5 +144,4 @@ define('settings/array', function () {
};
return SettingsArray;
});

@ -1,7 +1,6 @@
'use strict';
define('settings/checkbox', function () {
var Settings = null;
var SettingsCheckbox;
@ -35,5 +34,4 @@ define('settings/checkbox', function () {
};
return SettingsCheckbox;
});

@ -1,7 +1,6 @@
'use strict';
define('settings/key', function () {
var Settings = null;
var SettingsKey;
var helper = null;
@ -219,5 +218,4 @@ define('settings/key', function () {
};
return SettingsKey;
});

@ -1,7 +1,6 @@
'use strict';
define('settings/number', function () {
return {
types: ['number'],
get: function (element, trim, empty) {
@ -12,5 +11,4 @@ define('settings/number', function () {
return value ? +value : 0;
},
};
});

@ -1,7 +1,6 @@
'use strict';
define('settings/object', function () {
var Settings = null;
var SettingsObject;
var helper = null;
@ -117,5 +116,4 @@ define('settings/object', function () {
};
return SettingsObject;
});

@ -1,7 +1,6 @@
'use strict';
define('settings/select', function () {
var Settings = null;
var SettingsSelect;
@ -47,5 +46,4 @@ define('settings/select', function () {
};
return SettingsSelect;
});

@ -1,7 +1,6 @@
'use strict';
define('settings/textarea', function () {
var Settings = null;
var SettingsArea;
@ -33,5 +32,4 @@ define('settings/textarea', function () {
};
return SettingsArea;
});

@ -2,11 +2,9 @@
define('share', function () {
var module = {};
module.addShareHandlers = function (name) {
var baseUrl = window.location.protocol + '//' + window.location.host;
function openShare(url, urlToPost, width, height) {
@ -15,7 +13,6 @@ define('share', function () {
}
$('#content').off('shown.bs.dropdown', '.share-dropdown').on('shown.bs.dropdown', '.share-dropdown', function () {
var postLink = $(this).find('.post-link');
postLink.val(baseUrl + getPostUrl($(this)));

@ -51,7 +51,6 @@ define('topicSelect', ['components'], function (components) {
};
function selectRange(clickedTid) {
if (!lastSelected) {
lastSelected = $('[component="category/topic"]').first().find('[component="topic/select"]');
}

@ -2,7 +2,6 @@
define('uploader', ['translator'], function (translator) {
var module = {};
module.open = function (route, params, fileSize, callback) {

@ -4,7 +4,6 @@
var overrides = overrides || {};
if ('undefined' !== typeof window) {
(function ($, undefined) {
require(['translator'], function (translator) {
$.fn.getCursorPosition = function () {
@ -135,5 +134,4 @@ if ('undefined' !== typeof window) {
timeagoFn.apply(this, arguments);
};
};
}

@ -124,5 +124,4 @@ app.isConnected = false;
function onEventBanned() {
window.location.href = config.relative_path + '/';
}
}());

@ -17,7 +17,6 @@
var diff = process.hrtime(start);
return (diff[0] * 1e3) + (diff[1] / 1e6);
};
} else {
XRegExp = window.XRegExp;
}
@ -479,7 +478,6 @@
if ('undefined' !== typeof window) {
window.utils = module.exports;
}
}('undefined' === typeof module ? {
module: {
exports: {},

@ -10,7 +10,6 @@ var plugins = require('./plugins');
var privileges = require('./privileges');
(function (Categories) {
require('./categories/data')(Categories);
require('./categories/create')(Categories);
require('./categories/delete')(Categories);
@ -363,6 +362,4 @@ var privileges = require('./privileges');
},
], callback);
};
}(exports));

@ -5,7 +5,6 @@ var posts = require('../posts');
var db = require('../database');
module.exports = function (Categories) {
Categories.getActiveUsers = function (cid, callback) {
async.waterfall([
function (next) {

@ -9,7 +9,6 @@ var privileges = require('../privileges');
var utils = require('../../public/src/utils');
module.exports = function (Categories) {
Categories.create = function (data, callback) {
var category;
var parentCid = data.parentCid ? data.parentCid : 0;
@ -168,5 +167,4 @@ module.exports = function (Categories) {
},
], callback);
}
};

@ -7,7 +7,6 @@ var winston = require('winston');
var db = require('../database');
module.exports = function (Categories) {
Categories.getCategoryData = function (cid, callback) {
db.getObject('category:' + cid, function (err, category) {
if (err) {
@ -111,5 +110,4 @@ module.exports = function (Categories) {
Categories.incrementCategoryFieldBy = function (cid, field, value, callback) {
db.incrObjectFieldBy('category:' + cid, field, value, callback);
};
};

@ -9,7 +9,6 @@ var groups = require('../groups');
var privileges = require('../privileges');
module.exports = function (Categories) {
Categories.purge = function (cid, uid, callback) {
async.waterfall([
function (next) {

@ -14,7 +14,6 @@ var batch = require('../batch');
module.exports = function (Categories) {
Categories.getRecentReplies = function (cid, uid, count, callback) {
if (!parseInt(count, 10)) {
return callback(null, []);

@ -7,7 +7,6 @@ var topics = require('../topics');
var plugins = require('../plugins');
module.exports = function (Categories) {
Categories.getCategoryTopics = function (data, callback) {
async.waterfall([
function (next) {
@ -142,5 +141,4 @@ module.exports = function (Categories) {
},
], callback);
};
};

@ -5,7 +5,6 @@ var async = require('async');
var db = require('../database');
module.exports = function (Categories) {
Categories.markAsRead = function (cids, uid, callback) {
callback = callback || function () {};
if (!Array.isArray(cids) || !cids.length) {
@ -53,5 +52,4 @@ module.exports = function (Categories) {
Categories.hasReadCategory = function (cid, uid, callback) {
db.isSetMember('cid:' + cid + ':read_by_uid', uid, callback);
};
};

@ -10,9 +10,7 @@ var translator = require('../../public/src/modules/translator');
var plugins = require('../plugins');
module.exports = function (Categories) {
Categories.update = function (modified, callback) {
var cids = Object.keys(modified);
async.each(cids, function (cid, next) {
@ -166,5 +164,4 @@ module.exports = function (Categories) {
},
], callback);
};
};

@ -10,7 +10,6 @@ var eventsController = {};
eventsController.get = function (req, res, next) {
var page = parseInt(req.query.page, 10) || 1;
var itemsPerPage = 20;
var start = (page - 1) * itemsPerPage;

@ -124,7 +124,6 @@ categoryController.get = function (req, res, callback) {
], next);
},
function (categoryData, next) {
categories.modifyTopicsByPrivilege(categoryData.topics, userPrivileges);
if (categoryData.link) {

@ -147,7 +147,6 @@ Controllers.login = function (req, res, next) {
} else {
res.render('login', data);
}
};
Controllers.register = function (req, res, next) {
@ -413,8 +412,6 @@ Controllers.handleURIErrors = function (err, req, res, next) {
});
}
}
} else {
next(err);
}

@ -18,7 +18,6 @@ var terms = {
};
popularController.get = function (req, res, next) {
var term = terms[req.params.term];
if (!term && req.params.term) {

@ -128,7 +128,6 @@ topicsController.get = function (req, res, callback) {
plugins.fireHook('filter:controllers.topic.get', {topicData: topicData, uid: req.uid}, next);
},
function (data, next) {
var breadcrumbs = [
{
text: data.topicData.category.name,

@ -115,7 +115,6 @@ function resizeImage(fileObj, callback) {
}, next);
},
function (next) {
// Return the resized version to the composer/postData
var dirname = path.dirname(fileObj.url);
var extname = path.extname(fileObj.url);

@ -2,7 +2,6 @@
'use strict';
(function (module) {
var winston = require('winston');
var async = require('async');
var nconf = require('nconf');
@ -246,5 +245,4 @@
module.close = function () {
db.close();
};
}(exports));

@ -503,5 +503,4 @@ module.exports = function (db, module) {
callback
);
};
};

@ -1,7 +1,6 @@
'use strict';
module.exports = function (db, module) {
var helpers = module.helpers.mongo;
module.sortedSetAdd = function (key, score, value, callback) {
@ -61,5 +60,4 @@ module.exports = function (db, module) {
callback(err);
});
};
};

@ -1,7 +1,6 @@
'use strict';
module.exports = function (db, module) {
module.sortedSetIntersectCard = function (keys, callback) {
if (!Array.isArray(keys) || !keys.length) {
return callback(null, 0);
@ -103,5 +102,4 @@ module.exports = function (db, module) {
callback(null, data);
});
}
};

@ -1,7 +1,6 @@
'use strict';
module.exports = function (db, module) {
var helpers = module.helpers.mongo;
module.sortedSetRemove = function (key, value, callback) {
@ -53,5 +52,4 @@ module.exports = function (db, module) {
callback(err);
});
};
};

@ -1,7 +1,6 @@
'use strict';
module.exports = function (db, module) {
module.sortedSetUnionCard = function (keys, callback) {
if (!Array.isArray(keys) || !keys.length) {
return callback(null, 0);
@ -81,5 +80,4 @@ module.exports = function (db, module) {
callback(null, data);
});
}
};

@ -1,7 +1,6 @@
'use strict';
(function (module) {
var winston = require('winston');
var nconf = require('nconf');
var semver = require('semver');

@ -1,7 +1,6 @@
'use strict';
module.exports = function (redisClient, module) {
var helpers = module.helpers.redis;
module.setObject = function (key, data, callback) {

@ -1,7 +1,6 @@
'use strict';
module.exports = function (redisClient, module) {
module.flushdb = function (callback) {
redisClient.send_command('flushdb', [], function (err) {
if (typeof callback === 'function') {

@ -1,7 +1,6 @@
'use strict';
module.exports = function (redisClient, module) {
var utils = require('../../../public/src/utils');
var helpers = module.helpers.redis;

@ -1,7 +1,6 @@
'use strict';
module.exports = function (redisClient, module) {
module.sortedSetAdd = function (key, score, value, callback) {
callback = callback || function () {};
if (Array.isArray(score) && Array.isArray(value)) {
@ -44,6 +43,4 @@ module.exports = function (redisClient, module) {
callback(err);
});
};
};

@ -2,7 +2,6 @@
'use strict';
module.exports = function (redisClient, module) {
module.sortedSetIntersectCard = function (keys, callback) {
if (!Array.isArray(keys) || !keys.length) {
return callback(null, 0);

@ -2,7 +2,6 @@
'use strict';
module.exports = function (redisClient, module) {
var helpers = module.helpers.redis;
module.sortedSetRemove = function (key, value, callback) {

@ -2,7 +2,6 @@
'use strict';
module.exports = function (redisClient, module) {
module.sortedSetUnionCard = function (keys, callback) {
var tempSetName = 'temp_' + Date.now();
@ -30,7 +29,6 @@ module.exports = function (redisClient, module) {
};
module.sortedSetUnion = function (params, callback) {
var tempSetName = 'temp_' + Date.now();
var rangeParams = [tempSetName, params.start, params.stop];

@ -163,6 +163,5 @@ var fallbackTransport;
return parsed.hostname;
}
}(module.exports));

@ -132,6 +132,4 @@ var utils = require('../public/src/utils');
events.deleteEvents(eids, next);
}, {alwaysStartAt: 0}, callback);
};
}(module.exports));

@ -11,7 +11,6 @@ var privileges = require('./privileges');
var utils = require('../public/src/utils');
(function (Groups) {
require('./groups/create')(Groups);
require('./groups/delete')(Groups);
require('./groups/update')(Groups);
@ -454,5 +453,4 @@ var utils = require('../public/src/utils');
},
], callback);
};
}(module.exports));

@ -13,7 +13,6 @@ var db = require('../database');
var uploadsController = require('../controllers/uploads');
module.exports = function (Groups) {
Groups.updateCoverPosition = function (groupName, position, callback) {
if (!groupName) {
return callback(new Error('[[error:invalid-data]]'));
@ -22,7 +21,6 @@ module.exports = function (Groups) {
};
Groups.updateCover = function (uid, data, callback) {
// Position only? That's fine
if (!data.imageData && !data.file && data.position) {
return Groups.updateCoverPosition(data.groupName, data.position, callback);
@ -118,5 +116,4 @@ module.exports = function (Groups) {
Groups.removeCover = function (data, callback) {
db.deleteObjectFields('group:' + data.groupName, ['cover:url', 'cover:thumb:url', 'cover:position'], callback);
};
};

@ -7,7 +7,6 @@ var utils = require('../../public/src/utils');
var db = require('../database');
module.exports = function (Groups) {
Groups.create = function (data, callback) {
var system = isSystemGroup(data);
var groupData;
@ -74,7 +73,6 @@ module.exports = function (Groups) {
next(null, groupData);
},
], callback);
};
function isSystemGroup(data) {

@ -6,7 +6,6 @@ var utils = require('../../public/src/utils');
var db = require('./../database');
module.exports = function (Groups) {
Groups.destroy = function (groupName, callback) {
Groups.getGroupsData([groupName], function (err, groupsData) {
if (err) {

@ -19,7 +19,6 @@ var cache = LRU({
});
module.exports = function (Groups) {
Groups.cache = cache;
Groups.join = function (groupName, uid, callback) {

@ -5,7 +5,6 @@ var db = require('../database');
var plugins = require('../plugins');
module.exports = function (Groups) {
Groups.ownership = {};
Groups.ownership.isOwner = function (uid, groupName, callback) {

@ -7,7 +7,6 @@ var db = require('./../database');
module.exports = function (Groups) {
Groups.search = function (query, options, callback) {
if (!query) {
return callback(null, []);
@ -64,7 +63,6 @@ module.exports = function (Groups) {
};
Groups.searchMembers = function (data, callback) {
function findUids(query, searchBy, callback) {
query = query.toLowerCase();
@ -112,7 +110,6 @@ module.exports = function (Groups) {
Groups.ownership.isOwners(uids, data.groupName, next);
},
function (isOwners, next) {
results.users.forEach(function (user, index) {
if (user) {
user.isOwner = isOwners[index];

@ -9,7 +9,6 @@ var db = require('../database');
module.exports = function (Groups) {
Groups.update = function (groupName, values, callback) {
callback = callback || function () {};

@ -430,7 +430,6 @@ function createWelcomePost(next) {
}
function enableDefaultPlugins(next) {
process.stdout.write('Enabling default plugins\n');
var defaultEnabled = [
@ -493,7 +492,6 @@ function setCopyrightWidget(next) {
}
install.setup = function (callback) {
async.series([
checkSetupFlag,
checkCIFlag,

@ -31,8 +31,6 @@ var opts = {
/* -- Logger -- */
(function (Logger) {
Logger.init = function (app) {
opts.express.app = app;
/* Open log file stream & initialize express logging if meta.config.logger* variables are set */
@ -86,7 +84,6 @@ var opts = {
}
} else {
stream = fs.createWriteStream(value, {flags: 'a'});
}
if (stream) {
@ -222,5 +219,4 @@ var opts = {
socket.$emit = override($emit, 'on', 'Logger.io_one: $emit.apply: Failed');
}
};
}(exports));

@ -8,7 +8,6 @@ var db = require('../database');
module.exports = function (Messaging) {
Messaging.sendMessage = function (uid, roomId, content, timestamp, callback) {
async.waterfall([
function (next) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save