Set up dict dir via config

This commit is contained in:
Alexey Golubev
2020-02-07 17:16:48 +03:00
parent 81ccbd1bd9
commit 311c7cc4bc
5 changed files with 21 additions and 1 deletions

View File

@ -56,5 +56,10 @@
"docbuilderAllFontsPath": "../../App_Data/docbuilder/AllFonts.js",
"errorfiles": "error"
}
},
"SpellChecker": {
"server": {
"dictDir": "../dictionaries"
}
}
}

View File

@ -56,5 +56,10 @@
"docbuilderAllFontsPath": "../../App_Data/docbuilder/AllFonts.js",
"errorfiles": "error"
}
},
"SpellChecker": {
"server": {
"dictDir": "../dictionaries"
}
}
}

View File

@ -60,5 +60,10 @@
},
"FileStorage": {
"directory": "/var/lib/onlyoffice/documentserver/App_Data"
},
"SpellChecker": {
"server": {
"dictDir": "/var/www/onlyoffice/documentserver/server/SpellChecker/dictionaries"
}
}
}

View File

@ -57,5 +57,10 @@
"docbuilderPath": "../../FileConverter/bin/docbuilder.exe",
"docbuilderAllFontsPath": "../../App_Data/docbuilder/AllFonts.js"
}
},
"SpellChecker": {
"server": {
"dictDir": "../dictionaries"
}
}
}

View File

@ -43,7 +43,7 @@ const languages = require('./languages');
const allLanguages = languages.allLanguages;
const path = require('path');
const arrExistDictionaries = {};
const pathDictionaries = path.join(__dirname, '../dictionaries');
const pathDictionaries = require('config').get('SpellChecker.server.dictDir');
const arrDictionaries = {};
function spell(type, word, id) {