mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[refactoring] Remove unused parameter and deprecated params
This commit is contained in:
@ -304,11 +304,6 @@ async function readLicenseTenant(ctx, licenseFile, baseVerifiedLicense) {
|
||||
if (true === oLicense['developer']) {
|
||||
res.mode |= c_LM.Developer;
|
||||
}
|
||||
// ToDo delete mode
|
||||
if (oLicense.hasOwnProperty('mode')) {
|
||||
res.mode |= ('developer' === oLicense['mode'] ? c_LM.Developer : ('trial' === oLicense['mode'] ? c_LM.Trial : c_LM.None));
|
||||
}
|
||||
|
||||
if (oLicense.hasOwnProperty('light')) {
|
||||
res.light = (true === oLicense['light'] || 'true' === oLicense['light'] || 'True' === oLicense['light']); // Someone who likes to put json string instead of bool
|
||||
}
|
||||
@ -324,9 +319,6 @@ async function readLicenseTenant(ctx, licenseFile, baseVerifiedLicense) {
|
||||
if (oLicense.hasOwnProperty('advanced_api')) {
|
||||
res.advancedApi = !!oLicense['advanced_api'];
|
||||
}
|
||||
if (oLicense.hasOwnProperty('process')) {
|
||||
res.connections = Math.max(res.count, oLicense['process'] >> 0) * 75;
|
||||
}
|
||||
if (oLicense.hasOwnProperty('connections')) {
|
||||
res.connections = oLicense['connections'] >> 0;
|
||||
}
|
||||
@ -349,7 +341,7 @@ async function readLicenseTenant(ctx, licenseFile, baseVerifiedLicense) {
|
||||
const checkDate = ((res.mode & c_LM.Trial) || timeLimited) ? new Date() : licenseInfo.buildDate;
|
||||
//Calendar check of start_date allows to issue a license for old versions
|
||||
const checkStartDate = new Date();
|
||||
if (startDate <= checkStartDate && checkDate <= endDate && (!oLicense.hasOwnProperty('version') || 2 <= oLicense['version'])) {
|
||||
if (startDate <= checkStartDate && checkDate <= endDate) {
|
||||
res.type = c_LR.Success;
|
||||
} else if (startDate > checkStartDate) {
|
||||
res.type = c_LR.NotBefore;
|
||||
|
||||
Reference in New Issue
Block a user