Skip to content
Snippets Groups Projects
Verified Commit cd3b58b0 authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #7119 merge cookie from js and php

parent 538603e9
No related branches found
No related tags found
No related merge requests found
...@@ -259,7 +259,7 @@ else{ ...@@ -259,7 +259,7 @@ else{
type:'POST', type:'POST',
dataType:'json', dataType:'json',
data: { data: {
cookies : document.cookie
}, },
success: function(answer) success: function(answer)
{ {
......
...@@ -28,7 +28,16 @@ if(!empty($_COOKIE)) { ...@@ -28,7 +28,16 @@ if(!empty($_COOKIE)) {
} }
$_SESSION['clientSideCookies'] = $cookie; $_SESSION['clientSideCookies'] = $cookie;
echo '{"status" : 0}'; echo '{"status" : 0}';
} else { }
if (!empty($_REQUEST['cookies'])) {
if(!empty($_SESSION['clientSideCookies'])){
$_SESSION['clientSideCookies'] .= '; ';
}
$_SESSION['clientSideCookies'] .= $_REQUEST['cookies'];
}
if(empty($_SESSION['clientSideCookies'])){
$_SESSION['clientSideCookies'] = false; $_SESSION['clientSideCookies'] = false;
echo '{"status" : 1}'; echo '{"status" : 1}';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment