v1.18.x
Barış Soner Uşaklı 6 years ago
parent f53984aeae
commit f5fe91286e

@ -2,7 +2,6 @@
var async = require('async');
var validator = require('validator');
var winston = require('winston');
var db = require('../database');
@ -53,11 +52,6 @@ module.exports = function (Categories) {
});
};
Categories.getMultipleCategoryFields = function (cids, fields, callback) {
winston.warn('[deprecated] Categories.getMultipleCategoryFields is deprecated please use Categories.getCategoriesFields');
Categories.getCategoriesFields(cids, fields, callback);
};
Categories.getAllCategoryFields = function (fields, callback) {
async.waterfall([
async.apply(db.getSortedSetRange, 'categories:cid', 0, -1),

@ -208,12 +208,6 @@ helpers.getUserDataByUserSlug = function (userslug, callerUID, callback) {
], callback);
};
helpers.getBaseUser = function (userslug, callerUID, callback) {
winston.warn('helpers.getBaseUser deprecated please use helpers.getUserDataByUserSlug');
helpers.getUserDataByUserSlug(userslug, callerUID, callback);
};
function filterLinks(links, states) {
return links.filter(function (link, index) {
// "public" is the old property, if visibility is defined, discard `public`

@ -2,7 +2,6 @@
var async = require('async');
var validator = require('validator');
var winston = require('winston');
var db = require('../database');
var plugins = require('../plugins');
@ -80,11 +79,6 @@ module.exports = function (Groups) {
}), fields, callback);
};
Groups.getMultipleGroupFields = function (groups, fields, callback) {
winston.warn('[deprecated] Groups.getMultipleGroupFields is deprecated please use Groups.getGroupsFields');
Groups.getGroupsFields(groups, fields, callback);
};
Groups.setGroupField = function (groupName, field, value, callback) {
async.waterfall([
function (next) {

@ -15,11 +15,6 @@ var utils = require('../utils');
var SocketHelpers = module.exports;
SocketHelpers.notifyOnlineUsers = function (uid, result) {
winston.warn('[deprecated] SocketHelpers.notifyOnlineUsers, consider using socketHelpers.notifyNew(uid, \'newPost\', result);');
SocketHelpers.notifyNew(uid, 'newPost', result);
};
SocketHelpers.notifyNew = function (uid, type, result) {
async.waterfall([
function (next) {

@ -3,7 +3,6 @@
'use strict';
var async = require('async');
var winston = require('winston');
var db = require('../database');
var plugins = require('../plugins');
@ -101,11 +100,6 @@ module.exports = function (Topics) {
});
};
Topics.updateTimestamp = function (tid, lastposttime, callback) {
winston.warn('[deprecated] Topics.updateTimestamp is deprecated please use Topics.updateLastPostTime');
Topics.updateLastPostTime(tid, lastposttime, callback);
};
Topics.updateRecent = function (tid, timestamp, callback) {
callback = callback || function () {};

@ -3,7 +3,6 @@
var async = require('async');
var _ = require('lodash');
var winston = require('winston');
var db = require('../database');
var meta = require('../meta');
@ -16,11 +15,6 @@ module.exports = function (Topics) {
var stripTeaserTags = utils.stripTags.concat(['img']);
Topics.getTeasers = function (topics, uid, callback) {
if (typeof uid === 'function') {
winston.warn('[Topics.getTeasers] this usage is deprecated please provide uid');
callback = uid;
uid = 0;
}
if (!Array.isArray(topics) || !topics.length) {
return callback(null, []);
}
@ -171,11 +165,6 @@ module.exports = function (Topics) {
}
Topics.getTeasersByTids = function (tids, uid, callback) {
if (typeof uid === 'function') {
winston.warn('[Topics.getTeasersByTids] this usage is deprecated please provide uid');
callback = uid;
uid = 0;
}
if (!Array.isArray(tids) || !tids.length) {
return callback(null, []);
}
@ -190,11 +179,6 @@ module.exports = function (Topics) {
};
Topics.getTeaser = function (tid, uid, callback) {
if (typeof uid === 'function') {
winston.warn('[Topics.getTeaser] this usage is deprecated please provide uid');
callback = uid;
uid = 0;
}
Topics.getTeasersByTids([tid], uid, function (err, teasers) {
callback(err, Array.isArray(teasers) && teasers.length ? teasers[0] : null);
});

@ -99,11 +99,6 @@ module.exports = function (User) {
});
};
User.getMultipleUserFields = function (uids, fields, callback) {
winston.warn('[deprecated] User.getMultipleUserFields is deprecated please use User.getUsersFields');
User.getUsersFields(uids, fields, callback);
};
User.getUserData = function (uid, callback) {
User.getUsersData([uid], function (err, users) {
callback(err, users ? users[0] : null);

Loading…
Cancel
Save