fix: #7893, check private upload setting

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 77cb4b55cb
commit 0843497dd4

@ -32,6 +32,7 @@
"registrationApprovalType": "normal", "registrationApprovalType": "normal",
"allowAccountDelete": 1, "allowAccountDelete": 1,
"allowFileUploads": 0, "allowFileUploads": 0,
"privateUploads": 0,
"allowedFileExtensions": "png,jpg,bmp", "allowedFileExtensions": "png,jpg,bmp",
"allowUserHomePage": 1, "allowUserHomePage": 1,
"allowMultipleBadges": 0, "allowMultipleBadges": 0,

@ -301,7 +301,7 @@ define('forum/topic/posts', [
} }
function handlePrivateUploads(posts) { function handlePrivateUploads(posts) {
if (app.user.uid) { if (app.user.uid || !ajaxify.data.privateUploads) {
return; return;
} }

@ -85,6 +85,7 @@ topicsController.get = async function getTopic(req, res, callback) {
topicData.postDeleteDuration = meta.config.postDeleteDuration; topicData.postDeleteDuration = meta.config.postDeleteDuration;
topicData.scrollToMyPost = settings.scrollToMyPost; topicData.scrollToMyPost = settings.scrollToMyPost;
topicData.allowMultipleBadges = meta.config.allowMultipleBadges === 1; topicData.allowMultipleBadges = meta.config.allowMultipleBadges === 1;
topicData.privateUploads = meta.config.privateUploads === 1;
topicData.rssFeedUrl = nconf.get('relative_path') + '/topic/' + topicData.tid + '.rss'; topicData.rssFeedUrl = nconf.get('relative_path') + '/topic/' + topicData.tid + '.rss';
if (req.loggedIn) { if (req.loggedIn) {
topicData.rssFeedUrl += '?uid=' + req.uid + '&token=' + rssToken; topicData.rssFeedUrl += '?uid=' + req.uid + '&token=' + rssToken;

Loading…
Cancel
Save