@ -73,42 +73,37 @@ module.exports = async (req, res, next) => {
} ,
overboardLimit : numberSetting ( req . body . overboard _limit , oldSettings . overboardLimit ) ,
overboardCatalogLimit : numberSetting ( req . body . overboard _catalog _limit , oldSettings . overboardCatalogLimit ) ,
/ *
cacheTemplates : booleanSetting ( req . body . cache _templates , oldSettings . cacheTemplates ) ,
debugLogs : booleanSetting ( req . body . debug _logs , oldSettings . debugLogs ) ,
lockWait : numberSetting ( req . body . lock _wait , oldSettings . lockWait ) ,
pruneModlogs : numberSetting ( req . body . prune _modlogs , oldSettings . pruneModlogs ) ,
pruneIps : boolean Setting( req . body . prune _ips , oldSettings . pruneIps ) ,
pruneIps : number Setting( req . body . prune _ips , oldSettings . pruneIps ) ,
enableWebring : booleanSetting ( req . body . enable _webring , oldSettings . enableWebring ) ,
enableUserBoardCreation : booleanSetting ( req . body . enable _user _board _creation , oldSettings . enableUserBoardCreation ) ,
enableUserAccountCreation : booleanSetting ( req . body . enable _user _account _creation , oldSettings . enableUserAccountCreation ) ,
thumbExtension : trimSetting ( req . body . thumb _extension , oldSettings . thumbExtension ) ,
animatedGifThumbnails : booleanSetting ( req . body . animated _gif _thumbnails , oldSettings . animatedGifThumbnails ) ,
audioThumbnails : booleanSetting ( req . body . audio _thumbnails , oldSettings . audioThumbnails ) ,
ffmpegGifThumbnails : booleanSetting ( req . body . ffmpeg _gif _thumbnails , oldSettings . ffmpegGifThumbnails ) ,
thumbSize : numberSetting ( req . body . thumb _size , oldSettings . thumbSize ) ,
videoThumbPercentage : numberSetting ( req . body . video _thumb _percentage , oldSettings . videoThumbPercentage ) ,
otherMimeTypes : arraySetting ( req . body . other _mime _types , oldSettings . otherMimeTypes ) ,
checkRealMimeTypes : booleanSetting ( req . body . check _real _mime _types , oldSettings . checkRealMimeTypes ) ,
allowMimeNoMatch : booleanSetting ( req . body . allow _mime _no _match , oldSettings . allowMimeNoMatch ) ,
defaultBanDuration : numberSetting ( req . body . default _ban _duration , oldSettings . defaultBanDuration ) ,
quoteLimit : numberSetting ( req . body . quote _limit , oldSettings . quoteLimit ) ,
strictFiltering : booleanSetting ( req . body . strict _filtering , oldSettings . strictFiltering ) ,
previewReplies : numberSetting ( req . body . preview _replies , oldSettings . previewReplies ) ,
stickyPreviewReplies : numberSetting ( req . body . sticky _preview _replies , oldSettings . stickyPreviewReplies ) ,
early404Fraction : numberSetting ( req . body . early _404 _fraction , oldSettings . early404Fraction ) ,
early404Replies : numberSetting ( req . body . early _404 _replies , oldSettings . early404Replies ) ,
maxRecentNews : numberSetting ( req . body . max _recent _news , oldSettings . maxRecentNews ) ,
filterFileNames : booleanSetting ( req . body . filter _file _names , oldSettings . filterFileNames ) ,
spaceFileNameReplacement : trimSetting ( req . body . space _file _name _replacement , oldSettings . spaceFileNameReplacement ) ,
highlightOptions : {
languageSubset : arraySetting ( req . body . highlight _options _language _subset , oldSettings . highlightOptions . languageSubset ) ,
threshold : numberSetting ( req . body . highlight _options _threshold , oldSettings . highlightOptions . threshold ) ,
} ,
themes : arraySetting ( req . body . themes , oldSettings . themes ) ,
codeThemes : arraySetting ( req . body . code _themes , oldSettings . codeThemes ) ,
globalLimits : {
... oldSettings . globalLimits ,
customCss : {
enabled : booleanSetting ( req . body . global _limits _custom _css _enabled , oldSettings . globalLimits . customCss . enabled ) ,
max : numberSetting ( req . body . global _limits _custom _css _max , oldSettings . globalLimits . customCss . max ) ,
strict : booleanSetting ( req . body . global _limits _custom _css _strict , oldSettings . globalLimits . customCss . strict ) ,
filters : arraySetting ( req . body . global _limits _custom _css _filters , oldSettings . globalLimits . customCss . filters ) ,
} ,
} ,
boardDefaults : {
... oldSettings . boardDefaults ,
theme : trimSetting ( req . body . board _defaults _theme , oldSettings . boardDefaults . theme ) ,
codeTheme : trimSetting ( req . body . board _defaults _code _theme , oldSettings . boardDefaults . codeTheme ) ,
}
/ *
globalLimits : {
threadLimit : {
min : numberSetting ( req . body . global _limits _thread _limit _min , oldSettings . globalLimits . threadLimit . min ) ,
max : numberSetting ( req . body . global _limits _thread _limit _max , oldSettings . globalLimits . threadLimit . max ) ,
@ -156,17 +151,29 @@ module.exports = async (req, res, next) => {
staff : numberSetting ( req . body . global _limits _multi _input _posts _staff , oldSettings . globalLimits . multiInputs . posts . staff ) ,
} ,
} ,
customCss : {
enabled : booleanSetting ( req . body . global _limits _custom _css _enabled , oldSettings . globalLimits . customCss . enabled ) ,
max : numberSetting ( req . body . global _limits _custom _css _max , oldSettings . globalLimits . customCss . max ) ,
strict : booleanSetting ( req . body . global _limits _custom _css _strict , oldSettings . globalLimits . customCss . strict ) ,
filters : arraySetting ( req . body . global _limits _custom _css _filters , oldSettings . globalLimits . customCss . filters ) ,
} ,
customPages : {
max : numberSetting ( req . body . global _limits _custom _pages _max , oldSettings . globalLimits . customPages . max ) ,
maxLength : numberSetting ( req . body . global _limits _custom _pages _max _length , oldSettings . globalLimits . customPages . maxLength ) ,
}
} ,
animatedGifThumbnails : booleanSetting ( req . body . animated _gif _thumbnails , oldSettings . animatedGifThumbnails ) ,
audioThumbnails : booleanSetting ( req . body . audio _thumbnails , oldSettings . audioThumbnails ) ,
ffmpegGifThumbnails : booleanSetting ( req . body . ffmpeg _gif _thumbnails , oldSettings . ffmpegGifThumbnails ) ,
thumbSize : numberSetting ( req . body . thumb _size , oldSettings . thumbSize ) ,
videoThumbPercentage : numberSetting ( req . body . video _thumb _percentage , oldSettings . videoThumbPercentage ) ,
otherMimeTypes : arraySetting ( req . body . other _mime _types , oldSettings . otherMimeTypes ) ,
checkRealMimeTypes : booleanSetting ( req . body . check _real _mime _types , oldSettings . checkRealMimeTypes ) ,
allowMimeNoMatch : booleanSetting ( req . body . allow _mime _no _match , oldSettings . allowMimeNoMatch ) ,
defaultBanDuration : numberSetting ( req . body . default _ban _duration , oldSettings . defaultBanDuration ) ,
quoteLimit : numberSetting ( req . body . quote _limit , oldSettings . quoteLimit ) ,
strictFiltering : booleanSetting ( req . body . strict _filtering , oldSettings . strictFiltering ) ,
previewReplies : numberSetting ( req . body . preview _replies , oldSettings . previewReplies ) ,
stickyPreviewReplies : numberSetting ( req . body . sticky _preview _replies , oldSettings . stickyPreviewReplies ) ,
early404Fraction : numberSetting ( req . body . early _404 _fraction , oldSettings . early404Fraction ) ,
early404Replies : numberSetting ( req . body . early _404 _replies , oldSettings . early404Replies ) ,
maxRecentNews : numberSetting ( req . body . max _recent _news , oldSettings . maxRecentNews ) ,
filterFileNames : booleanSetting ( req . body . filter _file _names , oldSettings . filterFileNames ) ,
spaceFileNameReplacement : trimSetting ( req . body . space _file _name _replacement , oldSettings . spaceFileNameReplacement ) ,
frontendScriptDefault : {
embedsEnabled : booleanSetting ( req . body . frontend _script _default _embeds _enabled , oldSettings . frontendScriptDefault . embedsEnabled ) ,
heightUnlimit : booleanSetting ( req . body . frontend _script _default _height _unlimit , oldSettings . frontendScriptDefault . heightUnlimit ) ,
@ -190,8 +197,6 @@ module.exports = async (req, res, next) => {
showYous : booleanSetting ( req . body . frontend _script _default _show _yous , oldSettings . frontendScriptDefault . showYous ) ,
} ,
boardDefaults : {
theme : trimSetting ( req . body . board _defaults _theme , oldSettings . boardDefaults . theme ) ,
codeTheme : trimSetting ( req . body . board _defaults _code _theme , oldSettings . boardDefaults . codeTheme ) ,
sfw : booleanSetting ( req . body . board _defaults _sfw , oldSettings . boardDefaults . sfw ) ,
lockMode : numberSetting ( req . body . board _defaults _lock _mode , oldSettings . boardDefaults . lockMode ) ,
fileR9KMode : numberSetting ( req . body . board _defaults _file _r9k _mode , oldSettings . boardDefaults . fileR9KMode ) ,