Add temporary Wayback guard in _setLang

Add a short-term compatibility check in db/language::_setLang to support legacy Wayback calls: if version is the boolean false, the function returns null and aborts further processing. Comment notes this is temporary and will be removed.
This commit is contained in:
DosX 2026-04-07 14:02:57 +03:00
commit 11169a42e9

View file

@ -15,6 +15,11 @@ function _isLangDetected() {
}
function _setLang(languageName, version) {
// WAYBACK SUPPORT; WILL BE REMOVED.
if (typeof version === "boolean" && !version) {
return null;
}
// if "C/C++" already detected
if (_isLangPresent("C/C++") && (languageName == "C" || languageName == "C++")) {
_removeResult("language", "C/C++");