JS: Deprecate Icinga.Loader.addUrlFlag() in favor of Icinga.Utils.addUrlFlag()

This commit is contained in:
Eric Lippmann 2020-01-14 14:53:25 +01:00
parent 4d02d8f6d6
commit 7f8ee4f94d
1 changed files with 11 additions and 5 deletions

View File

@ -415,13 +415,19 @@
return true; return true;
}, },
/**
* Add the specified flag to the given URL
*
* @param {string} url
* @param {string} flag
*
* @returns {string}
*
* @deprecated since version 2.8.0. Use {@link Icinga.Utils.addUrlFlag()} instead
*/
addUrlFlag: function(url, flag) addUrlFlag: function(url, flag)
{ {
if (url.match(/\?/)) { return this.icinga.utils.addUrlFlag(url, flag);
return url + '&' + flag;
} else {
return url + '?' + flag;
}
}, },
/** /**