mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/notify_status] Define'd constants for notify_status
define'd constants NOTIFY_YES, NOTIFY_NO to replace magic numbers in forums_watch table and topics_watch table PHPBB3-9179
This commit is contained in:
@@ -1112,10 +1112,10 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
{
|
||||
$is_watching = true;
|
||||
|
||||
if ($notify_status)
|
||||
if ($notify_status != NOTIFY_YES)
|
||||
{
|
||||
$sql = 'UPDATE ' . $table_sql . "
|
||||
SET notify_status = 0
|
||||
SET notify_status = " . NOTIFY_YES . "
|
||||
WHERE $where_sql = $match_id
|
||||
AND user_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
@@ -1134,7 +1134,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
$is_watching = true;
|
||||
|
||||
$sql = 'INSERT INTO ' . $table_sql . " (user_id, $where_sql, notify_status)
|
||||
VALUES ($user_id, $match_id, 0)";
|
||||
VALUES ($user_id, $match_id, " . NOTIFY_YES . ')';
|
||||
$db->sql_query($sql);
|
||||
$message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
}
|
||||
|
Reference in New Issue
Block a user