Voting on Polls and Muted Words
This commit is contained in:
15
action.php
15
action.php
@ -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){
|
||||
|
Reference in New Issue
Block a user