Voting on Polls and Muted Words

This commit is contained in:
Daisuke
2020-04-22 20:25:00 -05:00
parent 64f540dce5
commit f1a4636a5a
16 changed files with 195 additions and 60 deletions

View File

@ -59,6 +59,14 @@ if (isset($_GET['action']) && $_GET['action'] == "settings"){
}
break;
case "mtwords":
$user_settings['mtwords'] = array();
$mtwords = explode("\n",$value);
foreach ($mtwords as $word){
$user_settings['mtwords'][] = $word;
}
break;
case "fg":
$theme['fg'] = sanitize($value);
break;
@ -100,6 +108,13 @@ $ajax = (isset($_GET['a']) ? true : false);
foreach($_GET as $key => $value){
switch($key){
case "vote":
$elem = array();
$elem['poll'] = json_decode(vote($value,$_GET['choices']),true);
//var_dump($_GET['choices']);
echo renderPoll($elem);
break;
case "fav":
$result = favourite($value,($mode === 'on' ? true : false));
if ($ajax){