mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[bug] For bug 45406.
Fix bug for external database. Update baseurl with the last value.
This commit is contained in:
committed by
Sergey Konovalov
parent
d8fe8d15b1
commit
56ab5a4fb3
@ -105,6 +105,10 @@ exports.upsert = function(task, opt_updateUserIndex) {
|
||||
let p10 = addSqlParam(JSON.stringify(task.callback), values);
|
||||
sqlCommand += `, callback = CONCAT(callback , '${sqlBase.UserCallback.prototype.delimiter}{"userIndex":' , (user_index + 1) , ',"callback":', ${p10}, '}')`;
|
||||
}
|
||||
if (task.baseurl) {
|
||||
let p11 = addSqlParam(task.baseurl, values);
|
||||
sqlCommand += `, baseurl = ${p11}`;
|
||||
}
|
||||
if (opt_updateUserIndex) {
|
||||
sqlCommand += ', user_index = LAST_INSERT_ID(user_index + 1)';
|
||||
}
|
||||
|
||||
@ -125,6 +125,10 @@ function getUpsertString(task, values) {
|
||||
sqlCommand += `, callback = task_result.callback || '${sqlBase.UserCallback.prototype.delimiter}{"userIndex":' `;
|
||||
sqlCommand += ` || (task_result.user_index + 1)::text || ',"callback":' || ${p10}::text || '}'`;
|
||||
}
|
||||
if (task.baseurl) {
|
||||
let p11 = addSqlParam(task.baseurl, values);
|
||||
sqlCommand += `, baseurl = ${p11}`;
|
||||
}
|
||||
sqlCommand += ", user_index = task_result.user_index + 1 RETURNING user_index as userindex;";
|
||||
return sqlCommand;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user