diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-15 22:09:20 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-15 22:09:20 +0000 |
commit | fb315827e77e3d9465e959fee0b4be3beeb8f4b1 (patch) | |
tree | 9d1737fc2ad27158ff3b3b7efba797d0b83dd596 /phpBB/posting.php | |
parent | 3bb1d7070e507be97c531d3626b8f4e8ff101e1b (diff) | |
download | forums-fb315827e77e3d9465e959fee0b4be3beeb8f4b1.tar forums-fb315827e77e3d9465e959fee0b4be3beeb8f4b1.tar.gz forums-fb315827e77e3d9465e959fee0b4be3beeb8f4b1.tar.bz2 forums-fb315827e77e3d9465e959fee0b4be3beeb8f4b1.tar.xz forums-fb315827e77e3d9465e959fee0b4be3beeb8f4b1.zip |
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
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 4a9281a6c1..a3459efa5a 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1637,6 +1637,16 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error ) 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 { |