//Edit the values $buttontype = isset($_POST['buttontype']) && $_POST['buttontype'] == "on" ? "checkbox" : "radio"; $poll->updatePoll(convertLineBreaks($_POST['pollname']), $_POST['pollID'], $buttontype); if (isset($_POST['equestion'])) { foreach ($_POST['equestion'] as $questionID => $questionText) { if (trim($questionText) != "") { $poll->updateQuestion($questionText, $questionID); } else { $poll->deleteQuestionByID($questionID); } } } if (isset($_POST['question'])) { foreach ($_POST['question'] as $question) { if (trim($question) != "") { $poll->addQuestion($question, $_POST['pollID']); } } } $notify->add($lang->get('mod_name'), $lang->get('edit_successfull')); $smarty->assign('only_info', 1); } else { $smarty->assign('info', $lang->get('edit_failed')); } } if ($add_failed) { $pollID = (int) $_POST['edit']; if ($poll->existsPoll($pollID)) { $smarty->assign('headline', $lang->get('poll_edit')); $thispoll = $poll->getPollByID($pollID, $login->currentUserID()); $smarty->assign('poll', $thispoll);