From 18898a19c483b141ae370d83a4b05a742a47e16c Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 14 Aug 2001 13:45:42 +0000 Subject: [PATCH] Notify on reply now supposedly fully functional git-svn-id: file:///svn/phpbb/trunk@866 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 61c28b6b02..4f3b34bd0a 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -166,7 +166,6 @@ if(!$is_auth['auth_view'] || !$is_auth['auth_read']) // a number of problems which will probably end up in this // solution being practically as fast and certainly simpler! // - if($userdata['user_id'] != ANONYMOUS) { $can_watch_topic = TRUE; @@ -181,9 +180,9 @@ if($userdata['user_id'] != ANONYMOUS) } else if( $db->sql_numrows($result) ) { - if( isset($HTTP_GET_VARS['watch']) ) + if( isset($HTTP_GET_VARS['unwatch']) ) { - if( !$HTTP_GET_VARS['watch'] ) + if( $HTTP_GET_VARS['unwatch'] == "topic" ) { $is_watching_topic = 0; @@ -221,7 +220,7 @@ if($userdata['user_id'] != ANONYMOUS) { if( isset($HTTP_GET_VARS['watch']) ) { - if( $HTTP_GET_VARS['watch'] ) + if( $HTTP_GET_VARS['watch'] == "topic" ) { $is_watching_topic = TRUE; @@ -242,8 +241,18 @@ if($userdata['user_id'] != ANONYMOUS) } else { - $can_watch_topic = 0; - $is_watching_topic = 0; + if( isset($HTTP_GET_VARS['unwatch']) ) + { + if( $HTTP_GET_VARS['unwatch'] == "topic" ) + { + header("Location: login.$phpEx?forward_page=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic"); + } + } + else + { + $can_watch_topic = 0; + $is_watching_topic = 0; + } } // @@ -699,13 +708,13 @@ if($can_watch_topic) { if($is_watching_topic) { - $s_watching_topic = "" . $lang['Stop_watching_topic'] . ""; - $s_watching_topic_img = "\"""; + $s_watching_topic = "" . $lang['Stop_watching_topic'] . ""; + $s_watching_topic_img = "\"""; } else { - $s_watching_topic = "" . $lang['Start_watching_topic'] . ""; - $s_watching_topic_img = "\"""; + $s_watching_topic = "" . $lang['Start_watching_topic'] . ""; + $s_watching_topic_img = "\"""; } } else