aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-11-18 20:31:40 +0100
committerNils Adermann <naderman@naderman.de>2011-11-18 20:31:40 +0100
commit3df4b83cd3306013d78b93024905a67ecc97df25 (patch)
tree736955d03d2bcf8ca93428a5a78c649f49fe3ae7 /phpBB/includes/functions_posting.php
parent0a4efcbe8c9e4fe13d4a726f30f38d01d1334e32 (diff)
parent4be9c70827c5d87bd654bae22095b8165a689ffa (diff)
downloadforums-3df4b83cd3306013d78b93024905a67ecc97df25.tar
forums-3df4b83cd3306013d78b93024905a67ecc97df25.tar.gz
forums-3df4b83cd3306013d78b93024905a67ecc97df25.tar.bz2
forums-3df4b83cd3306013d78b93024905a67ecc97df25.tar.xz
forums-3df4b83cd3306013d78b93024905a67ecc97df25.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9776] Delete poll if no poll options were submitted.
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 4ca76344de..8cd0e4add1 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1855,9 +1855,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'edit_topic':
case 'edit_first_post':
- if (isset($poll['poll_options']) && !empty($poll['poll_options']))
+ if (isset($poll['poll_options']))
{
- $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
+ $poll_start = ($poll['poll_start'] || empty($poll['poll_options'])) ? $poll['poll_start'] : $current_time;
$poll_length = $poll['poll_length'] * 86400;
if ($poll_length < 0)
{
@@ -2005,11 +2005,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
// Update Poll Tables
- if (isset($poll['poll_options']) && !empty($poll['poll_options']))
+ if (isset($poll['poll_options']))
{
$cur_poll_options = array();
- if ($poll['poll_start'] && $mode == 'edit')
+ if ($mode == 'edit')
{
$sql = 'SELECT *
FROM ' . POLL_OPTIONS_TABLE . '