aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
authorMark <MarkieMark1@phpbb.com>2010-03-31 14:44:39 +0200
committerNils Adermann <naderman@naderman.de>2010-05-16 19:50:35 +0200
commitcc8d22bed6bdba0a8f5797eef3627a62c240a48f (patch)
treee3d917ee81ef153a4eab8305fca8d82b7c8547cc /phpBB/includes/functions_display.php
parente36da18b1c3a492df5789252600b1fc80805472a (diff)
downloadforums-cc8d22bed6bdba0a8f5797eef3627a62c240a48f.tar
forums-cc8d22bed6bdba0a8f5797eef3627a62c240a48f.tar.gz
forums-cc8d22bed6bdba0a8f5797eef3627a62c240a48f.tar.bz2
forums-cc8d22bed6bdba0a8f5797eef3627a62c240a48f.tar.xz
forums-cc8d22bed6bdba0a8f5797eef3627a62c240a48f.zip
[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
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index ea77551fc4..ec348138f5 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -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>');
}