From e45fb0025ec8c27147caee7e3c14902f2e3f02c5 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sat, 8 Sep 2012 12:05:55 -0500 Subject: [ticket/11103] Output the notifications to the template For now, just dumping the notifications in the header. PHPBB3-11103 --- phpBB/includes/functions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 834f57a38b..7632ea1fcb 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4778,7 +4778,7 @@ function phpbb_http_login($param) function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum') { global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path; - global $phpbb_dispatcher; + global $phpbb_dispatcher, $phpbb_container; if (defined('HEADER_INC')) { @@ -5092,6 +5092,13 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')), )); + // Output the notifications + $phpbb_notifications = $phpbb_container->get('notifications'); + foreach ($phpbb_notifications->load_notifications() as $notification) + { + $notification->display(); + } + // application/xhtml+xml not used because of IE header('Content-type: text/html; charset=UTF-8'); -- cgit v1.2.1 From 5502f3c4aa30ce72131f2a55bcfa3db7a4059427 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sun, 9 Sep 2012 17:20:39 -0500 Subject: [ticket/11103] Restyle the notification list Very rough (lots of inline CSS, very ugly) PHPBB3-11103 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 7632ea1fcb..e5c7839894 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5096,7 +5096,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 $phpbb_notifications = $phpbb_container->get('notifications'); foreach ($phpbb_notifications->load_notifications() as $notification) { - $notification->display(); + $template->assign_block_vars('notifications', $notification->prepare_for_display()); } // application/xhtml+xml not used because of IE -- cgit v1.2.1 From fb0ed78c8fffe95d40e47c8dd27d44973eba88ae Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 14 Sep 2012 15:59:13 -0500 Subject: [ticket/11103] Store the item's parent id for marking things read Mark topics/posts read from the markread() function. Identify unread items by a grey background in the header (for now) PHPBB3-11103 --- phpBB/includes/functions.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e5c7839894..3d3dd1f5bc 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1285,15 +1285,20 @@ function phpbb_timezone_select($user, $default = '', $truncate = false) function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0) { global $db, $user, $config; - global $request; + global $request, $phpbb_container; if ($mode == 'all') { if ($forum_id === false || !sizeof($forum_id)) { + // Mark all forums read (index page) + + // Mark all topic notifications read for this user + $notifications = $phpbb_container->get('notifications'); + $notifications->mark_notifications_read('topic', false, $user->data['user_id'], $post_time); + if ($config['load_db_lastread'] && $user->data['is_registered']) { - // Mark all forums read (index page) $db->sql_query('DELETE FROM ' . TOPICS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']}"); $db->sql_query('DELETE FROM ' . FORUMS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']}"); $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_lastmark = ' . time() . " WHERE user_id = {$user->data['user_id']}"); @@ -1330,6 +1335,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $forum_id = array($forum_id); } + // Mark topic notifications read for this user in this forum + $notifications = $phpbb_container->get('notifications'); + $notifications->mark_notifications_read_by_parent('topic', $forum_id, $user->data['user_id'], $post_time); + // Add 0 to forums array to mark global announcements correctly // $forum_id[] = 0; @@ -1424,6 +1433,11 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ return; } + // Mark post notifications read for this user in this topic + $notifications = $phpbb_container->get('notifications'); + $notifications->mark_notifications_read_by_parent('post', $topic_id, $user->data['user_id'], $post_time); + $notifications->mark_notifications_read_by_parent('quote', $topic_id, $user->data['user_id'], $post_time); + if ($config['load_db_lastread'] && $user->data['is_registered']) { $sql = 'UPDATE ' . TOPICS_TRACK_TABLE . ' -- cgit v1.2.1 From f083c6d7765b63ad0179bc82a3d9f0abbf08637c Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 14 Sep 2012 16:15:15 -0500 Subject: [ticket/11103] Mark all post/quote notifications read when marking topics Mark forum read marks all topics read, so do so properly for notifications PHPBB3-11103 --- phpBB/includes/functions.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 3d3dd1f5bc..b996fef292 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1339,6 +1339,21 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $notifications = $phpbb_container->get('notifications'); $notifications->mark_notifications_read_by_parent('topic', $forum_id, $user->data['user_id'], $post_time); + // Mark all post/quote notifications read for this user in this forum + $topic_ids = array(); + $sql = 'SELECT topic_id + FROM ' . TOPICS_TABLE . ' + WHERE ' . $db->sql_in_set('forum_id', $forum_id); + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + $topic_ids[] = $row['topic_id']; + } + $db->sql_freeresult($result); + + $notifications->mark_notifications_read_by_parent('post', $topic_ids, $user->data['user_id'], $post_time); + $notifications->mark_notifications_read_by_parent('quote', $topic_ids, $user->data['user_id'], $post_time); + // Add 0 to forums array to mark global announcements correctly // $forum_id[] = 0; -- cgit v1.2.1 From ed1ec8e720a7ec3c1270cd631cc37e531f315f26 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 14 Sep 2012 16:54:20 -0500 Subject: [ticket/11103] Add/Update/Mark Read functions accept an array for the type This saves a lot of code in some areas (where the same data is sent, just for different types) Notifications for bookmarks PHPBB3-11103 --- phpBB/includes/functions.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b996fef292..aec7759f19 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1351,8 +1351,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } $db->sql_freeresult($result); - $notifications->mark_notifications_read_by_parent('post', $topic_ids, $user->data['user_id'], $post_time); - $notifications->mark_notifications_read_by_parent('quote', $topic_ids, $user->data['user_id'], $post_time); + $notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_ids, $user->data['user_id'], $post_time); // Add 0 to forums array to mark global announcements correctly // $forum_id[] = 0; @@ -1450,8 +1449,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark post notifications read for this user in this topic $notifications = $phpbb_container->get('notifications'); - $notifications->mark_notifications_read_by_parent('post', $topic_id, $user->data['user_id'], $post_time); - $notifications->mark_notifications_read_by_parent('quote', $topic_id, $user->data['user_id'], $post_time); + $notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_id, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) { -- cgit v1.2.1 From 8e977544fb6763412e45f84791de8c3eccf321c9 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 14 Sep 2012 17:01:08 -0500 Subject: [ticket/11103] Normalization of $phpbb_notifications variable name Use $phpbb_notifications instead of $notifications everywhere for consistency and conflict prevention. PHPBB3-11103 --- phpBB/includes/functions.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index aec7759f19..b7243227bd 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1294,8 +1294,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark all forums read (index page) // Mark all topic notifications read for this user - $notifications = $phpbb_container->get('notifications'); - $notifications->mark_notifications_read('topic', false, $user->data['user_id'], $post_time); + $phpbb_notifications = $phpbb_container->get('notifications'); + $phpbb_notifications->mark_notifications_read('topic', false, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) { @@ -1336,8 +1336,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } // Mark topic notifications read for this user in this forum - $notifications = $phpbb_container->get('notifications'); - $notifications->mark_notifications_read_by_parent('topic', $forum_id, $user->data['user_id'], $post_time); + $phpbb_notifications = $phpbb_container->get('notifications'); + $phpbb_notifications->mark_notifications_read_by_parent('topic', $forum_id, $user->data['user_id'], $post_time); // Mark all post/quote notifications read for this user in this forum $topic_ids = array(); @@ -1351,7 +1351,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } $db->sql_freeresult($result); - $notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_ids, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_ids, $user->data['user_id'], $post_time); // Add 0 to forums array to mark global announcements correctly // $forum_id[] = 0; @@ -1448,8 +1448,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } // Mark post notifications read for this user in this topic - $notifications = $phpbb_container->get('notifications'); - $notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_id, $user->data['user_id'], $post_time); + $phpbb_notifications = $phpbb_container->get('notifications'); + $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_id, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) { -- cgit v1.2.1 From 7589a3093d95048f5a8cfdc6259501f43fd3fe10 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 14 Sep 2012 18:30:12 -0500 Subject: [ticket/11103] Display all unread notifications by default Add unread count to the page title PHPBB3-11103 --- phpBB/includes/functions.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b7243227bd..e26db56442 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4994,6 +4994,14 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 $timezone_name = $user->lang['timezones'][$timezone_name]; } + // Output the notifications + $phpbb_notifications = $phpbb_container->get('notifications'); + $notifications = $phpbb_notifications->load_notifications(); + foreach ($notifications['notifications'] as $notification) + { + $template->assign_block_vars('notifications', $notification->prepare_for_display()); + } + // The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array( 'SITENAME' => $config['sitename'], @@ -5008,6 +5016,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'RECORD_USERS' => $l_online_record, 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, + 'NUM_UNREAD_NOTIFICATIONS' => $notifications['unread_count'], 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'], @@ -5119,13 +5128,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')), )); - // Output the notifications - $phpbb_notifications = $phpbb_container->get('notifications'); - foreach ($phpbb_notifications->load_notifications() as $notification) - { - $template->assign_block_vars('notifications', $notification->prepare_for_display()); - } - // application/xhtml+xml not used because of IE header('Content-type: text/html; charset=UTF-8'); -- cgit v1.2.1 From 05b573ebf76c737f89deaefd22ce963aa910e5d1 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sat, 15 Sep 2012 13:51:02 -0500 Subject: [ticket/11103] Topic and post dis/approval notifications Remove the formatted title function, plaintext is not needed since email templates are used Fix a number of bugs. PHPBB3-11103 --- phpBB/includes/functions.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index cb8dddd5f8..e9d673455c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1295,7 +1295,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark all topic notifications read for this user $phpbb_notifications = $phpbb_container->get('notifications'); - $phpbb_notifications->mark_notifications_read('topic', false, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read(array('topic', 'quote', 'bookmark', 'post', 'approve_topic', 'approve_post'), false, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) { @@ -1337,7 +1337,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark topic notifications read for this user in this forum $phpbb_notifications = $phpbb_container->get('notifications'); - $phpbb_notifications->mark_notifications_read_by_parent('topic', $forum_id, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array('topic', 'approve_topic'), $forum_id, $user->data['user_id'], $post_time); // Mark all post/quote notifications read for this user in this forum $topic_ids = array(); @@ -1351,7 +1351,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } $db->sql_freeresult($result); - $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_ids, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post', 'approve_post'), $topic_ids, $user->data['user_id'], $post_time); // Add 0 to forums array to mark global announcements correctly // $forum_id[] = 0; @@ -1449,7 +1449,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark post notifications read for this user in this topic $phpbb_notifications = $phpbb_container->get('notifications'); - $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post'), $topic_id, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read(array('topic', 'approve_topic'), $topic_id, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post', 'approve_post'), $topic_id, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) { -- cgit v1.2.1 From 98731b127748af4673fdee92db2e139e84fd4d4b Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Thu, 20 Sep 2012 10:36:11 -0500 Subject: [ticket/11103] Prettify the output for prosilver. Create a way to mark items read from the output list. PHPBB3-11103 --- phpBB/includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e9d673455c..92cea20d10 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4997,7 +4997,10 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 // Output the notifications $phpbb_notifications = $phpbb_container->get('notifications'); - $notifications = $phpbb_notifications->load_notifications(); + $notifications = $phpbb_notifications->load_notifications(array( + 'all_unread' => true, + 'limit' => 5, + )); foreach ($notifications['notifications'] as $notification) { $template->assign_block_vars('notifications', $notification->prepare_for_display()); -- cgit v1.2.1 From 48ccc9eb93c8413f05f6a50d40e597f560c671d8 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 27 Sep 2012 18:25:37 -0500 Subject: [ticket/11103] UCP Notification Options can now be set PHPBB3-11103 --- phpBB/includes/functions.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 92cea20d10..92d72b6636 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5021,6 +5021,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'NUM_UNREAD_NOTIFICATIONS' => $notifications['unread_count'], + 'NOTIFICATIONS_CNT' => $user->lang('NOTIFICATIONS_CNT', $notifications['unread_count']), 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'], -- cgit v1.2.1 From 07fb66ac1090dfe92431ed749b520115595f7927 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 4 Oct 2012 14:31:00 -0500 Subject: [ticket/11103] Do not abbreviate template output PHPBB3-11103 --- phpBB/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 162b0046b5..d005ccaaab 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5020,8 +5020,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'RECORD_USERS' => $l_online_record, 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, - 'NUM_UNREAD_NOTIFICATIONS' => $notifications['unread_count'], - 'NOTIFICATIONS_CNT' => $user->lang('NOTIFICATIONS_CNT', $notifications['unread_count']), + 'UNREAD_NOTIFICATIONS_COUNT' => $notifications['unread_count'], + 'NOTIFICATIONS_COUNT' => $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']), 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'], -- cgit v1.2.1 From b9bc65eed88bbd2dff12102909903cbf4dc9b368 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 4 Oct 2012 14:47:13 -0500 Subject: [ticket/11103] Make $phpbb_notifications a global and use it everywhere Do not use phpbb_container everywhere (makes testing difficult) PHPBB3-11103 --- phpBB/includes/functions.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d005ccaaab..9513c6919f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1285,7 +1285,7 @@ function phpbb_timezone_select($user, $default = '', $truncate = false) function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0) { global $db, $user, $config; - global $request, $phpbb_container; + global $request, $phpbb_notifications; if ($mode == 'all') { @@ -1294,7 +1294,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark all forums read (index page) // Mark all topic notifications read for this user - $phpbb_notifications = $phpbb_container->get('notifications'); $phpbb_notifications->mark_notifications_read(array('topic', 'quote', 'bookmark', 'post', 'approve_topic', 'approve_post'), false, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) @@ -1336,7 +1335,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } // Mark topic notifications read for this user in this forum - $phpbb_notifications = $phpbb_container->get('notifications'); $phpbb_notifications->mark_notifications_read_by_parent(array('topic', 'approve_topic'), $forum_id, $user->data['user_id'], $post_time); // Mark all post/quote notifications read for this user in this forum @@ -1448,7 +1446,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } // Mark post notifications read for this user in this topic - $phpbb_notifications = $phpbb_container->get('notifications'); $phpbb_notifications->mark_notifications_read(array('topic', 'approve_topic'), $topic_id, $user->data['user_id'], $post_time); $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post', 'approve_post'), $topic_id, $user->data['user_id'], $post_time); @@ -4806,7 +4803,7 @@ function phpbb_http_login($param) function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum') { global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path; - global $phpbb_dispatcher, $phpbb_container; + global $phpbb_dispatcher, $phpbb_notifications; if (defined('HEADER_INC')) { @@ -4996,7 +4993,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 } // Output the notifications - $phpbb_notifications = $phpbb_container->get('notifications'); $notifications = $phpbb_notifications->load_notifications(array( 'all_unread' => true, 'limit' => 5, -- cgit v1.2.1 From 0bab8ff777bcb82361b75441c085ee2e510db5cc Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 5 Oct 2012 13:43:03 -0500 Subject: [ticket/11103] ACP option to enable/disable notifications output in header PHPBB3-11103 --- phpBB/includes/functions.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 9513c6919f..795bfb77bf 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4993,13 +4993,17 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 } // Output the notifications - $notifications = $phpbb_notifications->load_notifications(array( - 'all_unread' => true, - 'limit' => 5, - )); - foreach ($notifications['notifications'] as $notification) + if ($config['load_notifications']) { - $template->assign_block_vars('notifications', $notification->prepare_for_display()); + $notifications = $phpbb_notifications->load_notifications(array( + 'all_unread' => true, + 'limit' => 5, + )); + + foreach ($notifications['notifications'] as $notification) + { + $template->assign_block_vars('notifications', $notification->prepare_for_display()); + } } // The following assigns all _common_ variables that may be used at any point in a template. @@ -5016,8 +5020,9 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'RECORD_USERS' => $l_online_record, 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, - 'UNREAD_NOTIFICATIONS_COUNT' => $notifications['unread_count'], - 'NOTIFICATIONS_COUNT' => $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']), + 'UNREAD_NOTIFICATIONS_COUNT' => ($config['load_notifications']) ? $notifications['unread_count'] : '', + 'NOTIFICATIONS_COUNT' => ($config['load_notifications']) ? $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']) : '', + 'S_NOTIFICATIONS_DISPLAY' => $config['load_notifications'], 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'], -- cgit v1.2.1 From 61a1467c90e865f43c359bb8678d27b5e571f21f Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Tue, 16 Oct 2012 16:47:18 -0500 Subject: [ticket/11103] U_VIEW_ALL_NOTIFICATIONS Link PHPBB3-11103 --- phpBB/includes/functions.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 2645e55446..790724d3c5 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5020,8 +5020,10 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'RECORD_USERS' => $l_online_record, 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, + 'UNREAD_NOTIFICATIONS_COUNT' => ($config['load_notifications']) ? $notifications['unread_count'] : '', 'NOTIFICATIONS_COUNT' => ($config['load_notifications']) ? $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']) : '', + 'U_VIEW_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications'), 'S_NOTIFICATIONS_DISPLAY' => $config['load_notifications'], 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], -- cgit v1.2.1 From ae670cc87df197e44b768667b853e1dae3009b4d Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 18 Oct 2012 18:32:13 -0500 Subject: [ticket/11103] Remove unnecessary comments Comments that are not needed because the actions are completely self-explanatory PHPBB3-11103 --- phpBB/includes/functions.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 0af8e824c8..2827dae1a8 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1386,7 +1386,6 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $forum_id = array($forum_id); } - // Mark topic notifications read for this user in this forum $phpbb_notifications->mark_notifications_read_by_parent(array('topic', 'approve_topic'), $forum_id, $user->data['user_id'], $post_time); // Mark all post/quote notifications read for this user in this forum -- cgit v1.2.1 From 94d682f77431add84867bb0b196ad0719b293606 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sat, 20 Oct 2012 20:54:18 -0500 Subject: [ticket/11103] Use the full class name as the item_type/method This is going to require you recreate the db tables. PHPBB3-11103 --- phpBB/includes/functions.php | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 2827dae1a8..3488a3003b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1330,7 +1330,14 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark all forums read (index page) // Mark all topic notifications read for this user - $phpbb_notifications->mark_notifications_read(array('topic', 'quote', 'bookmark', 'post', 'approve_topic', 'approve_post'), false, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read(array( + 'phpbb_notification_type_topic', + 'phpbb_notification_type_quote', + 'phpbb_notification_type_bookmark', + 'phpbb_notification_type_post', + 'phpbb_notification_type_approve_topic', + 'phpbb_notification_type_approve_post', + ), false, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) { @@ -1386,7 +1393,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $forum_id = array($forum_id); } - $phpbb_notifications->mark_notifications_read_by_parent(array('topic', 'approve_topic'), $forum_id, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array( + 'phpbb_notification_type_topic', + 'phpbb_notification_type_approve_topic', + ), $forum_id, $user->data['user_id'], $post_time); // Mark all post/quote notifications read for this user in this forum $topic_ids = array(); @@ -1400,7 +1410,12 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } $db->sql_freeresult($result); - $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post', 'approve_post'), $topic_ids, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array( + 'phpbb_notification_type_quote', + 'phpbb_notification_type_bookmark', + 'phpbb_notification_type_post', + 'phpbb_notification_type_approve_post', + ), $topic_ids, $user->data['user_id'], $post_time); // Add 0 to forums array to mark global announcements correctly // $forum_id[] = 0; @@ -1500,8 +1515,16 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } // Mark post notifications read for this user in this topic - $phpbb_notifications->mark_notifications_read(array('topic', 'approve_topic'), $topic_id, $user->data['user_id'], $post_time); - $phpbb_notifications->mark_notifications_read_by_parent(array('quote', 'bookmark', 'post', 'approve_post'), $topic_id, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read(array( + 'phpbb_notification_type_topic', + 'phpbb_notification_type_approve_topic', + ), $topic_id, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array( + 'phpbb_notification_type_quote', + 'phpbb_notification_type_bookmark', + 'phpbb_notification_type_post', + 'phpbb_notification_type_approve_post', + ), $topic_id, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) { -- cgit v1.2.1 From 2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Tue, 20 Nov 2012 18:14:48 -0600 Subject: [ticket/11103] Create user loader class, update for DIC Create a very basic user loader class to handle querying/storing user data in a centralized location. Use DIC collection service for notification types/methods. Cleanup unused dependencies. Fix some other issues. PHPBB3-11103 --- phpBB/includes/functions.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4e26d2c642..283ed4a657 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1331,12 +1331,12 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark all topic notifications read for this user $phpbb_notifications->mark_notifications_read(array( - 'phpbb_notification_type_topic', - 'phpbb_notification_type_quote', - 'phpbb_notification_type_bookmark', - 'phpbb_notification_type_post', - 'phpbb_notification_type_approve_topic', - 'phpbb_notification_type_approve_post', + 'topic', + 'quote', + 'bookmark', + 'post', + 'approve_topic', + 'approve_post', ), false, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) @@ -1394,8 +1394,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ } $phpbb_notifications->mark_notifications_read_by_parent(array( - 'phpbb_notification_type_topic', - 'phpbb_notification_type_approve_topic', + 'topic', + 'approve_topic', ), $forum_id, $user->data['user_id'], $post_time); // Mark all post/quote notifications read for this user in this forum @@ -1411,10 +1411,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $db->sql_freeresult($result); $phpbb_notifications->mark_notifications_read_by_parent(array( - 'phpbb_notification_type_quote', - 'phpbb_notification_type_bookmark', - 'phpbb_notification_type_post', - 'phpbb_notification_type_approve_post', + 'quote', + 'bookmark', + 'post', + 'approve_post', ), $topic_ids, $user->data['user_id'], $post_time); // Add 0 to forums array to mark global announcements correctly @@ -1516,14 +1516,14 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ // Mark post notifications read for this user in this topic $phpbb_notifications->mark_notifications_read(array( - 'phpbb_notification_type_topic', - 'phpbb_notification_type_approve_topic', + 'topic', + 'approve_topic', ), $topic_id, $user->data['user_id'], $post_time); $phpbb_notifications->mark_notifications_read_by_parent(array( - 'phpbb_notification_type_quote', - 'phpbb_notification_type_bookmark', - 'phpbb_notification_type_post', - 'phpbb_notification_type_approve_post', + 'quote', + 'bookmark', + 'post', + 'approve_post', ), $topic_id, $user->data['user_id'], $post_time); if ($config['load_db_lastread'] && $user->data['is_registered']) -- cgit v1.2.1 From 6dee2539419ba2c050830b7677294603a63b559a Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sun, 9 Dec 2012 17:01:08 -0600 Subject: [ticket/11259] Make phpbb_admin_path available everywhere PHPBB3-11259 --- phpBB/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e492f97022..5fa5c5f505 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5339,7 +5339,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 function page_footer($run_cron = true, $display_template = true, $exit_handler = true) { global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx; - global $request, $phpbb_dispatcher; + global $request, $phpbb_dispatcher, $phpbb_admin_path; // A listener can set this variable to `true` when it overrides this function $page_footer_override = false; @@ -5395,7 +5395,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'CREDIT_LINE' => $user->lang('POWERED_BY', 'phpBB® Forum Software © phpBB Group'), - 'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '') + 'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id) : '') ); // Call cron-type script -- cgit v1.2.1 From 249f3c8885d461ae3981dfd7b62093c2175175e3 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 13 Dec 2012 19:19:40 -0600 Subject: [ticket/11103] Instantiate $phpbb_notifications as needed https://github.com/phpbb/phpbb3/pull/992#discussion_r2413976 PHPBB3-11103 --- phpBB/includes/functions.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 6f619ef51d..9b284c5ca9 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1328,7 +1328,7 @@ function phpbb_timezone_select($user, $default = '', $truncate = false) function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0) { global $db, $user, $config; - global $request, $phpbb_notifications; + global $request, $phpbb_container; $post_time = ($post_time === 0 || $post_time > time()) ? time() : (int) $post_time; @@ -1338,6 +1338,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ { // Mark all forums read (index page) + $phpbb_notifications = $phpbb_container->get('notification_manager'); + // Mark all topic notifications read for this user $phpbb_notifications->mark_notifications_read(array( 'topic', @@ -1402,6 +1404,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ $forum_id = array($forum_id); } + $phpbb_notifications = $phpbb_container->get('notification_manager'); + $phpbb_notifications->mark_notifications_read_by_parent(array( 'topic', 'approve_topic', @@ -1523,11 +1527,14 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $ return; } + $phpbb_notifications = $phpbb_container->get('notification_manager'); + // Mark post notifications read for this user in this topic $phpbb_notifications->mark_notifications_read(array( 'topic', 'approve_topic', ), $topic_id, $user->data['user_id'], $post_time); + $phpbb_notifications->mark_notifications_read_by_parent(array( 'quote', 'bookmark', @@ -5042,7 +5049,7 @@ function phpbb_build_hidden_fields_for_query_params($request, $exclude = null) function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum') { global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path; - global $phpbb_dispatcher, $request, $phpbb_notifications; + global $phpbb_dispatcher, $request, $phpbb_container; if (defined('HEADER_INC')) { @@ -5230,10 +5237,13 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 { $timezone_name = $user->lang['timezones'][$timezone_name]; } - + // Output the notifications - if ($config['load_notifications']) + $notifications = false; + if ($config['load_notifications'] && $user->data['user_id'] != ANONYMOUS && $user->data['user_type'] != USER_IGNORE) { + $phpbb_notifications = $phpbb_container->get('notification_manager'); + $notifications = $phpbb_notifications->load_notifications(array( 'all_unread' => true, 'limit' => 5, @@ -5264,8 +5274,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'HIDDEN_FIELDS_FOR_JUMPBOX' => $hidden_fields_for_jumpbox, - 'UNREAD_NOTIFICATIONS_COUNT' => ($config['load_notifications']) ? $notifications['unread_count'] : '', - 'NOTIFICATIONS_COUNT' => ($config['load_notifications']) ? $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']) : '', + 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', + 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']) : '', 'U_VIEW_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications'), 'S_NOTIFICATIONS_DISPLAY' => $config['load_notifications'], -- cgit v1.2.1 From 7ad577a86afa379d67812ed184b7a59a32c64e9e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 15 Feb 2013 16:02:33 -0600 Subject: [ticket/11103] Add Notification Settings link in flyout menu PHPBB3-11103 --- phpBB/includes/functions.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 0c514e7205..8ba7b2c24b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5277,6 +5277,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']) : '', 'U_VIEW_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications'), + 'U_NOTIFICATION_SETTINGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications&mode=notification_options'), 'S_NOTIFICATIONS_DISPLAY' => $config['load_notifications'], 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], -- cgit v1.2.1 From e8b3e8498d9842296a905fdaad8c0c32e31bceb4 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 24 Feb 2013 12:54:05 +0100 Subject: [ticket/7262] Backport set_config() and set_config_count() docs from develop. PHPBB3-7262 --- phpBB/includes/functions.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 571c863839..04b69f8c69 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -137,7 +137,14 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false) } /** -* Set config value. Creates missing config entry. +* Sets a configuration option's value. +* +* @param string $config_name The configuration option's name +* @param string $config_value New configuration value +* @param bool $is_dynamic Whether this variable should be cached or if it +* changes too frequently to be efficiently cached. +* +* @return null */ function set_config($config_name, $config_value, $is_dynamic = false) { @@ -166,7 +173,14 @@ function set_config($config_name, $config_value, $is_dynamic = false) } /** -* Set dynamic config value with arithmetic operation. +* Increments an integer config value directly in the database. +* +* @param string $config_name The configuration option's name +* @param int $increment Amount to increment by +* @param bool $is_dynamic Whether this variable should be cached or if it +* changes too frequently to be efficiently cached. +* +* @return null */ function set_config_count($config_name, $increment, $is_dynamic = false) { -- cgit v1.2.1 From a9037a68c177d396b2ed4b9bfcaad64536a01aaa Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 24 Feb 2013 13:03:48 +0100 Subject: [ticket/7262] Add $is_dynamic example to set_config() and set_config_count(). The logic is the other way around here in comparison to develop's phpbb_config_db class, so add examples to make things more clear. PHPBB3-7262 --- phpBB/includes/functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 04b69f8c69..2ca7d7f898 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -141,8 +141,9 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false) * * @param string $config_name The configuration option's name * @param string $config_value New configuration value -* @param bool $is_dynamic Whether this variable should be cached or if it -* changes too frequently to be efficiently cached. +* @param bool $is_dynamic Whether this variable should be cached (false) or +* if it changes too frequently (true) to be +* efficiently cached. * * @return null */ @@ -177,8 +178,9 @@ function set_config($config_name, $config_value, $is_dynamic = false) * * @param string $config_name The configuration option's name * @param int $increment Amount to increment by -* @param bool $is_dynamic Whether this variable should be cached or if it -* changes too frequently to be efficiently cached. +* @param bool $is_dynamic Whether this variable should be cached (false) or +* if it changes too frequently (true) to be +* efficiently cached. * * @return null */ -- cgit v1.2.1 From 6bf64d5620b1b9f165a65b50042c391a29ef151c Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 24 Feb 2013 13:37:52 +0100 Subject: [ticket/7262] Add note about set_config() not updating is_dynamic. PHPBB3-7262 --- phpBB/includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 2ca7d7f898..ccd2d3147c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -139,6 +139,9 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false) /** * Sets a configuration option's value. * +* Please note that this function does not update the is_dynamic value for +* an already existing config option. +* * @param string $config_name The configuration option's name * @param string $config_value New configuration value * @param bool $is_dynamic Whether this variable should be cached (false) or -- cgit v1.2.1