mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
fixed bug #1370, #1447 (moderator status update, extensively tested, should work :D), #1309, poll delete checkbox
fixed (now it is only displayed if there is a poll to delete) git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3580 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -251,7 +251,8 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
||||
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
|
||||
{
|
||||
$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
|
||||
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";
|
||||
|
||||
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
|
||||
if (!$db->sql_query($sql))
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
|
||||
|
Reference in New Issue
Block a user