Merge remote-tracking branch 'origin/master' into develop

v1.18.x
Julian Lam 7 years ago
commit b14e531cee

@ -54,11 +54,11 @@
"modal-body": "%1 %2 için bayraklama nedenini belirtin. Alternatif olarak hızlı rapor butonlarından birinini kullanabilirsin.",
"modal-reason-spam": "Gereksiz",
"modal-reason-offensive": "Saldırgan",
"modal-reason-other": "Other (specify below)",
"modal-reason-other": "Diğer (aşağıda belirtin)",
"modal-reason-custom": "Bir içeriği bildirme nedeni...",
"modal-submit": "Raporu Gönder",
"modal-submit-success": "İçerik, denetlemek için bayraklandı.",
"modal-submit-confirm": "Confirm Submission",
"modal-submit-confirm-text": "You have a custom reason specified already. Are you sure you wish to submit via quick-report?",
"modal-submit-confirm-text-help": "Submitting a quick report will overwrite any custom reasons defined."
"modal-submit-confirm": "Gönderimi Onayla",
"modal-submit-confirm-text": "Zaten belirtilen özel bir sebebin var. Hızlı raporla göndermek istediğinizden emin misin?",
"modal-submit-confirm-text-help": "Hızlı bir rapor göndermek tanımlanan özel nedenlerin üzerine yazacaktır."
}

@ -68,7 +68,7 @@ define('forum/topic/posts', [
var posts = data.posts;
ajaxify.data.pagination.pageCount = Math.max(1, Math.ceil((posts[0].topic.postcount - 1) / config.postsPerPage));
ajaxify.data.pagination.pageCount = Math.max(1, Math.ceil(posts[0].topic.postcount / config.postsPerPage));
var direction = config.topicPostSort === 'oldest_to_newest' || config.topicPostSort === 'most_votes' ? 1 : -1;
var isPostVisible = (ajaxify.data.pagination.currentPage === ajaxify.data.pagination.pageCount && direction === 1) ||

@ -387,7 +387,7 @@ topicsController.pagination = function (req, res, callback) {
}
var postCount = parseInt(results.topic.postcount, 10);
var pageCount = Math.max(1, Math.ceil((postCount - 1) / results.settings.postsPerPage));
var pageCount = Math.max(1, Math.ceil(postCount / results.settings.postsPerPage));
var paginationData = pagination.create(currentPage, pageCount);
paginationData.rel.forEach(function (rel) {

@ -52,7 +52,7 @@ Topics.getPageCount = function (tid, uid, callback) {
user.getSettings(uid, next);
},
function (settings, next) {
next(null, Math.ceil((parseInt(postCount, 10) - 1) / settings.postsPerPage));
next(null, Math.ceil(parseInt(postCount, 10) / settings.postsPerPage));
},
], callback);
};

@ -90,8 +90,9 @@ Digest.getSubscribers = function (interval, callback) {
};
Digest.send = function (data, callback) {
var emailsSent = 0;
if (!data || !data.subscribers || !data.subscribers.length) {
return callback();
return callback(null, emailsSent);
}
var now = new Date();
@ -131,7 +132,7 @@ Digest.send = function (data, callback) {
return topicObj;
});
emailsSent += 1;
emailer.send('digest', userObj.uid, {
subject: '[' + meta.config.title + '] [[email:digest.subject, ' + (now.getFullYear() + '/' + (now.getMonth() + 1) + '/' + now.getDate()) + ']]',
username: userObj.username,
@ -151,6 +152,6 @@ Digest.send = function (data, callback) {
}, next);
},
], function (err) {
callback(err, data.subscribers.length);
callback(err, emailsSent);
});
};

Loading…
Cancel
Save