mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02:00
Fixed problem where deleting a post with a poll could error deletion of remaining posts
git-svn-id: file:///svn/phpbb/trunk@1328 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1637,6 +1637,16 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
|
|||||||
message_die(GENERAL_ERROR, "Couldn't update topics vote information", "", __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, "Couldn't update topics vote information", "", __LINE__, __FILE__, $sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if( !$is_last_post_topic )
|
||||||
|
{
|
||||||
|
$sql = "UPDATE " . TOPICS_TABLE . "
|
||||||
|
SET topic_vote = 0
|
||||||
|
WHERE topic_id = $topic_id";
|
||||||
|
if( !$result = $db->sql_query($sql) )
|
||||||
|
{
|
||||||
|
message_die(GENERAL_ERROR, "Couldn't update topic poll field", "", __LINE__, __FILE__, $sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user