|
|
@ -65,7 +65,6 @@ module.exports = function(User) {
|
|
|
|
settings.usePagination = parseInt(getSetting(settings, 'usePagination', 0), 10) === 1;
|
|
|
|
settings.usePagination = parseInt(getSetting(settings, 'usePagination', 0), 10) === 1;
|
|
|
|
settings.topicsPerPage = Math.min(settings.topicsPerPage ? parseInt(settings.topicsPerPage, 10) : defaultTopicsPerPage, defaultTopicsPerPage);
|
|
|
|
settings.topicsPerPage = Math.min(settings.topicsPerPage ? parseInt(settings.topicsPerPage, 10) : defaultTopicsPerPage, defaultTopicsPerPage);
|
|
|
|
settings.postsPerPage = Math.min(settings.postsPerPage ? parseInt(settings.postsPerPage, 10) : defaultPostsPerPage, defaultPostsPerPage);
|
|
|
|
settings.postsPerPage = Math.min(settings.postsPerPage ? parseInt(settings.postsPerPage, 10) : defaultPostsPerPage, defaultPostsPerPage);
|
|
|
|
settings.notificationSounds = parseInt(getSetting(settings, 'notificationSounds', 0), 10) === 1;
|
|
|
|
|
|
|
|
settings.userLang = settings.userLang || meta.config.defaultLang || 'en_GB';
|
|
|
|
settings.userLang = settings.userLang || meta.config.defaultLang || 'en_GB';
|
|
|
|
settings.topicPostSort = getSetting(settings, 'topicPostSort', 'oldest_to_newest');
|
|
|
|
settings.topicPostSort = getSetting(settings, 'topicPostSort', 'oldest_to_newest');
|
|
|
|
settings.categoryTopicSort = getSetting(settings, 'categoryTopicSort', 'newest_to_oldest');
|
|
|
|
settings.categoryTopicSort = getSetting(settings, 'categoryTopicSort', 'newest_to_oldest');
|
|
|
@ -113,7 +112,6 @@ module.exports = function(User) {
|
|
|
|
usePagination: data.usePagination,
|
|
|
|
usePagination: data.usePagination,
|
|
|
|
topicsPerPage: Math.min(data.topicsPerPage, parseInt(meta.config.topicsPerPage, 10) || 20),
|
|
|
|
topicsPerPage: Math.min(data.topicsPerPage, parseInt(meta.config.topicsPerPage, 10) || 20),
|
|
|
|
postsPerPage: Math.min(data.postsPerPage, parseInt(meta.config.postsPerPage, 10) || 20),
|
|
|
|
postsPerPage: Math.min(data.postsPerPage, parseInt(meta.config.postsPerPage, 10) || 20),
|
|
|
|
notificationSounds: data.notificationSounds,
|
|
|
|
|
|
|
|
userLang: data.userLang || meta.config.defaultLang,
|
|
|
|
userLang: data.userLang || meta.config.defaultLang,
|
|
|
|
followTopicsOnCreate: data.followTopicsOnCreate,
|
|
|
|
followTopicsOnCreate: data.followTopicsOnCreate,
|
|
|
|
followTopicsOnReply: data.followTopicsOnReply,
|
|
|
|
followTopicsOnReply: data.followTopicsOnReply,
|
|
|
@ -123,7 +121,10 @@ module.exports = function(User) {
|
|
|
|
topicSearchEnabled: data.topicSearchEnabled,
|
|
|
|
topicSearchEnabled: data.topicSearchEnabled,
|
|
|
|
delayImageLoading: data.delayImageLoading,
|
|
|
|
delayImageLoading: data.delayImageLoading,
|
|
|
|
homePageRoute : ((data.homePageRoute === 'custom' ? data.homePageCustom : data.homePageRoute) || '').replace(/^\//, ''),
|
|
|
|
homePageRoute : ((data.homePageRoute === 'custom' ? data.homePageCustom : data.homePageRoute) || '').replace(/^\//, ''),
|
|
|
|
scrollToMyPost: data.scrollToMyPost
|
|
|
|
scrollToMyPost: data.scrollToMyPost,
|
|
|
|
|
|
|
|
notificationSound: data.notificationSound,
|
|
|
|
|
|
|
|
incomingChatSound: data.incomingChatSound,
|
|
|
|
|
|
|
|
outgoingChatSound: data.outgoingChatSound
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (data.bootswatchSkin) {
|
|
|
|
if (data.bootswatchSkin) {
|
|
|
|