diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-14 13:45:42 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-14 13:45:42 +0000 |
commit | 18898a19c483b141ae370d83a4b05a742a47e16c (patch) | |
tree | 02cf3b15f9ff15dff15c7cf52cf8fc4f4f319a22 /phpBB/viewtopic.php | |
parent | 07028bc04ff37017163c3f4068bb277db4a1a4af (diff) | |
download | forums-18898a19c483b141ae370d83a4b05a742a47e16c.tar forums-18898a19c483b141ae370d83a4b05a742a47e16c.tar.gz forums-18898a19c483b141ae370d83a4b05a742a47e16c.tar.bz2 forums-18898a19c483b141ae370d83a4b05a742a47e16c.tar.xz forums-18898a19c483b141ae370d83a4b05a742a47e16c.zip |
Notify on reply now supposedly fully functional
git-svn-id: file:///svn/phpbb/trunk@866 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 29 |
1 files 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 = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=0\">" . $lang['Stop_watching_topic'] . "</a>"; - $s_watching_topic_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=0\"><img src=\"" . $images['Topic_un_watch'] . "\" alt=\"" . $lang['Stop_watching_topic'] . "\" border=\"0\"></a>"; + $s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic\">" . $lang['Stop_watching_topic'] . "</a>"; + $s_watching_topic_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic\"><img src=\"" . $images['Topic_un_watch'] . "\" alt=\"" . $lang['Stop_watching_topic'] . "\" border=\"0\"></a>"; } else { - $s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=1\">" . $lang['Start_watching_topic'] . "</a>"; - $s_watching_topic_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=1\"><img src=\"" . $images['Topic_watch'] . "\" alt=\"" . $lang['Start_watching_topic'] . "\" border=\"0\"></a>"; + $s_watching_topic = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic\">" . $lang['Start_watching_topic'] . "</a>"; + $s_watching_topic_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic\"><img src=\"" . $images['Topic_watch'] . "\" alt=\"" . $lang['Start_watching_topic'] . "\" border=\"0\"></a>"; } } else |