Fix for poll deletion mistakenly altering forum stats [#1602]

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5833 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2006-04-22 19:54:44 +00:00
parent aac27e9213
commit d98e3d00d2

View file

@ -413,12 +413,15 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
$topic_update_sql .= 'topic_vote = 0'; $topic_update_sql .= 'topic_vote = 0';
} }
$sql = "UPDATE " . FORUMS_TABLE . " SET if ($mode != 'poll_delete')
$forum_update_sql
WHERE forum_id = $forum_id";
if (!$db->sql_query($sql))
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); $sql = "UPDATE " . FORUMS_TABLE . " SET
$forum_update_sql
WHERE forum_id = $forum_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
} }
if ($topic_update_sql != '') if ($topic_update_sql != '')