1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-08 15:35:11 +02:00

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
This commit is contained in:
Paul S. Owen 2002-02-18 13:44:07 +00:00
parent 3ed7ffede7
commit cc1a7450f9

View File

@ -555,10 +555,10 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
$current_time = time(); $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'] : ""; $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)) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, "Couldn't change topic notify data", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't change topic notify data", "", __LINE__, __FILE__, $sql);