From cc1a7450f9c987d0892b82b0f1605427fd4c5b62 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 18 Feb 2002 13:44:07 +0000 Subject: [PATCH] test after test after test after test and yet these things still appear ... git-svn-id: file:///svn/phpbb/trunk@2189 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/post.php b/phpBB/includes/post.php index 12505b3043..c9b21eb8fa 100644 --- a/phpBB/includes/post.php +++ b/phpBB/includes/post.php @@ -555,10 +555,10 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id $current_time = time(); - if ( ( $mode == "newtopic" && !$notify_user ) || $mode == "delete" ) + if ( $mode == "delete" ) { $delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : ""; - $sql = ( $mode == "newtopic" ) ? "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) VALUES (" . $userdata['user_id'] . ", $topic_id, 0)" : "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql; + $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't change topic notify data", "", __LINE__, __FILE__, $sql);