Remove Facebook fbclid

This commit is contained in:
fredtempez 2021-01-08 15:13:16 +01:00
parent f22eda7e6d
commit 78e6dd7adc
2 changed files with 17 additions and 1 deletions

View File

@ -472,4 +472,11 @@ $(document).ready(function(){
$(changeIcon).addClass('zwiico-menu');
};
});
/**
* Remove ID Facebook from URL
*/
if(/^\?fbclid=/.test(location.search))
location.replace(location.href.replace(/\?fbclid.+/, ""));
});

View File

@ -561,7 +561,16 @@ class common {
// Une partie de l'url
else {
$url = explode('/', $this->url);
return array_key_exists($key, $url) ? $url[$key] : null;
if (array_key_exists($key, $url) ) {
if (strpos($url[$key],'fbclid=') === false) {
$result = $url[$key];
} else {
$result = $key === 0 ? $this->getData(['config','homePageId']) : '';
}
} else {
$result = null;
}
return $result;
}
}