diff options
author | 2006-04-22 19:54:44 +0000 | |
---|---|---|
committer | 2006-04-22 19:54:44 +0000 | |
commit | d98e3d00d2daf9df7dab552f795ec01946343912 (patch) | |
tree | fa911f8cbab21cd52d9ba9e6ec58c293e0fe19c3 | |
parent | Backport of David's more efficient code for highlighting (diff) | |
download | phpbb-d98e3d00d2daf9df7dab552f795ec01946343912.tar.gz phpbb-d98e3d00d2daf9df7dab552f795ec01946343912.tar.bz2 phpbb-d98e3d00d2daf9df7dab552f795ec01946343912.zip |
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
-rw-r--r-- | phpBB/includes/functions_post.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/phpBB/includes/functions_post.php b/phpBB/includes/functions_post.php index 077da90cb6..ff7a21983a 100644 --- a/phpBB/includes/functions_post.php +++ b/phpBB/includes/functions_post.php @@ -413,12 +413,15 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i $topic_update_sql .= 'topic_vote = 0'; } - $sql = "UPDATE " . FORUMS_TABLE . " SET - $forum_update_sql - WHERE forum_id = $forum_id"; - if (!$db->sql_query($sql)) + if ($mode != 'poll_delete') { - 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 != '') |