|
@@ -55,6 +55,10 @@ if (isset($_POST['action']) && $_POST['action'] == "settings"){
|
|
|
$cookie[$index]['explicit'] = htmlentities($value);
|
|
|
break;
|
|
|
|
|
|
+ case "unrollcw":
|
|
|
+ $cookie[$index]['unrollcw'] = htmlentities($value);
|
|
|
+ break;
|
|
|
+
|
|
|
case "emoji":
|
|
|
$cookie[$index]['emoji'] = intval($value);
|
|
|
break;
|
|
@@ -76,10 +80,18 @@ if (isset($_POST['action']) && $_POST['action'] == "settings"){
|
|
|
break;
|
|
|
|
|
|
|
|
|
- case "reblog":
|
|
|
- $cookie[$index]['reblog'] = ($value == "on" ? "on" : "off");
|
|
|
+ case "theme":
|
|
|
+ $cookie[$index]['theme'] = sanitize($value);
|
|
|
break;
|
|
|
|
|
|
+ case "notif":
|
|
|
+ $cookie[$index]['notif'] = "";
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['fav']) ? "1" : "0");
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['rt']) ? "1" : "0");
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['mnt']) ? "1" : "0");
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['follow']) ? "1" : "0");
|
|
|
+ break;
|
|
|
+
|
|
|
case "videoloop":
|
|
|
$cookie[$index]['videoloop'] = ($value == "on" ? "on" : "off");
|
|
|
break;
|
|
@@ -136,6 +148,10 @@ if (isset($_POST['action']) && $_POST['action'] == "settings"){
|
|
|
|
|
|
case "bw":
|
|
|
$theme['bw'] = sanitize($value);
|
|
|
+ break;
|
|
|
+
|
|
|
+ case "dr":
|
|
|
+ $theme['dr'] = sanitize($value);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -272,10 +288,12 @@ foreach($_GET as $key => $value){
|
|
|
if(in_array($value,$user_settings['nsfw'])){
|
|
|
$key = array_search($value, $user_settings['nsfw']);
|
|
|
unset($user_settings['nsfw'][$key]);
|
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
+ $cookie[$index]['nsfw'] = $user_settings['nsfw'];
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
|
} else {
|
|
|
$user_settings['nsfw'][] = htmlentities($value);
|
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
+ $cookie[$index]['nsfw'] = $user_settings['nsfw'];
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
|
}
|
|
|
echo "1";
|
|
|
die();
|
|
@@ -288,10 +306,12 @@ foreach($_GET as $key => $value){
|
|
|
if(in_array($value,$user_settings['hide'])){
|
|
|
$key = array_search($value, $user_settings['hide']);
|
|
|
unset($user_settings['hide'][$key]);
|
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
+ $cookie[$index]['hide'] = $user_settings['hide'];
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
|
} else {
|
|
|
$user_settings['hide'][] = htmlentities($value);
|
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
+ $cookie[$index]['hide'] = $user_settings['hide'];
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
|
}
|
|
|
echo "1";
|
|
|
die();
|