diff --git a/e107_plugins/poll/admin_config.php b/e107_plugins/poll/admin_config.php index aff71ba8a..dc680de70 100644 --- a/e107_plugins/poll/admin_config.php +++ b/e107_plugins/poll/admin_config.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/poll/admin_config.php,v $ -| $Revision: 1.3 $ -| $Date: 2007-10-28 21:09:52 $ +| $Revision: 1.4 $ +| $Date: 2007-11-01 22:46:19 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -107,13 +107,16 @@ if (POLLACTION == "edit" && !$_POST['preview'] && !$_POST['submit']) $_POST['multipleChoice'] = $poll_allow_multiple; $_POST['showResults'] = $poll_result_type; - $_POST['pollUserclass'] = $poll_vote_userclass; + // Can't have everyone voting if tracking method is user ID + $_POST['pollUserclass'] = (($poll_vote_userclass == e_UC_PUBLIC) && $poll_storage_method == 2) ? e_UC_MEMBER : $poll_vote_userclass; $_POST['storageMethod'] = $poll_storage_method; } } if (isset($_POST['preview'])) { + // Can't have everyone voting if tracking method is user ID + if (($_POST['pollUserclass'] == e_UC_PUBLIC) && ($_POST['storageMethod'] == 2)) $_POST['pollUserclass'] = e_UC_MEMBER; $poll->render_poll($_POST, "preview"); } @@ -144,8 +147,10 @@ if ($poll_total = $sql->db_Select("polls", "*", "poll_type=1")) { "; } $text .= ""; -} else { - $text .= "