Merge pull request #16124 from hregis/fix_avoid_missing_url_and_token

Fix avoid missing url and token
This commit is contained in:
Laurent Destailleur 2021-02-26 15:21:56 +01:00 committed by GitHub
commit 5095e7f927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -530,6 +530,7 @@ function hideMessage(fieldId,message) {
* @param string token Token
*/
function setConstant(url, code, input, entity, strict, forcereload, userid, token) {
var saved_url = url; /* avoid undefined url */
$.post( url, {
action: "set",
name: code,
@ -574,7 +575,7 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke
$.each(data, function(key, value) {
$("#set_" + key).hide();
$("#del_" + key).show();
$.post( url, {
$.post( saved_url, {
action: "set",
name: key,
value: value,
@ -604,6 +605,7 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke
* @param string token Token
*/
function delConstant(url, code, input, entity, strict, forcereload, userid, token) {
var saved_url = url; /* avoid undefined url */
$.post( url, {
action: "del",
name: code,
@ -645,7 +647,7 @@ function delConstant(url, code, input, entity, strict, forcereload, userid, toke
$.each(data, function(key, value) {
$("#del_" + value).hide();
$("#set_" + value).show();
$.post( url, {
$.post( saved_url, {
action: "del",
name: value,
entity: entity,