diff options
author | Mark <MarkieMark1@phpbb.com> | 2010-03-31 14:44:39 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-05-16 19:50:35 +0200 |
commit | cc8d22bed6bdba0a8f5797eef3627a62c240a48f (patch) | |
tree | e3d917ee81ef153a4eab8305fca8d82b7c8547cc /phpBB/includes/functions_posting.php | |
parent | e36da18b1c3a492df5789252600b1fc80805472a (diff) | |
download | forums-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_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 4cb3941ce0..7242e7987b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1201,8 +1201,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . " AND w.user_id NOT IN ($sql_ignore_users) - AND w.notify_status = 0 - AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ') + AND w.notify_status = " . NOTIFY_YES . ' + AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') AND u.user_id = w.user_id'; $result = $db->sql_query($sql); @@ -1234,8 +1234,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u WHERE fw.forum_id = $forum_id AND fw.user_id NOT IN ($sql_ignore_users) - AND fw.notify_status = 0 - AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ') + AND fw.notify_status = " . NOTIFY_YES . ' + AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') AND u.user_id = fw.user_id'; $result = $db->sql_query($sql); @@ -1344,8 +1344,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id if (!empty($update_notification['topic'])) { - $sql = 'UPDATE ' . TOPICS_WATCH_TABLE . " - SET notify_status = 1 + $sql = 'UPDATE ' . TOPICS_WATCH_TABLE . ' + SET notify_status = ' . NOTIFY_NO . " WHERE topic_id = $topic_id AND " . $db->sql_in_set('user_id', $update_notification['topic']); $db->sql_query($sql); @@ -1353,8 +1353,8 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id if (!empty($update_notification['forum'])) { - $sql = 'UPDATE ' . FORUMS_WATCH_TABLE . " - SET notify_status = 1 + $sql = 'UPDATE ' . FORUMS_WATCH_TABLE . ' + SET notify_status = ' . NOTIFY_NO . " WHERE forum_id = $forum_id AND " . $db->sql_in_set('user_id', $update_notification['forum']); $db->sql_query($sql); |