1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

[ticket/10237] Display login-box for guests, when (un)subscribing

Also initialise $is_watching for PHP Notice: Undefined variable is_watching

PHPBB3-10237
This commit is contained in:
Joas Schilling
2011-07-20 00:55:49 +02:00
parent d60ffdd55c
commit 1a19388aa3
3 changed files with 19 additions and 9 deletions

View File

@@ -205,7 +205,7 @@ $s_watching_forum = array(
'is_watching' => false,
);
if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && $auth->acl_get('f_subscribe', $forum_id))
if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && ($auth->acl_get('f_subscribe', $forum_id) || $user->data['user_id'] == ANONYMOUS))
{
$notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL;
watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0, $notify_status, $start, $forum_data['forum_name']);