aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 23886e390c..69ab459224 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1930,6 +1930,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
$sql_insert_ary = array();
+ $sql_delete_array = array();
+
+ print_r($cur_poll_options);
for ($i = 0, $size = sizeof($poll['poll_options']); $i < $size; $i++)
{
if (strlen(trim($poll['poll_options'][$i])))
@@ -1952,6 +1955,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$db->sql_query($sql);
}
}
+ else if (!empty($cur_poll_options[$i]))
+ {
+ $sql_delete_array[] = $cur_poll_options[$i]['poll_option_id'];
+ }
}
$db->sql_multi_insert(POLL_OPTIONS_TABLE, $sql_insert_ary);