diff --git a/core/core.js.php b/core/core.js.php index be5c6b9d..09bfb0dd 100755 --- a/core/core.js.php +++ b/core/core.js.php @@ -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.+/, "")); + }); diff --git a/core/core.php b/core/core.php index 738b4fa8..95995258 100755 --- a/core/core.php +++ b/core/core.php @@ -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; } }