diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-09-10 12:50:36 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-09-10 12:53:26 +0200 |
commit | 77e7a27c113cbf119a25f53663f60f0c5962c411 (patch) | |
tree | cff98d122dd9c7660a685de66334272fcdc4e74e /phpBB/index.php | |
parent | 954af4f18009740bdf3f15b6a2518162e0638c05 (diff) | |
download | forums-77e7a27c113cbf119a25f53663f60f0c5962c411.tar forums-77e7a27c113cbf119a25f53663f60f0c5962c411.tar.gz forums-77e7a27c113cbf119a25f53663f60f0c5962c411.tar.bz2 forums-77e7a27c113cbf119a25f53663f60f0c5962c411.tar.xz forums-77e7a27c113cbf119a25f53663f60f0c5962c411.zip |
[ticket/15267] Hide birthday list if permission wasn't granted
PHPBB3-15267
Diffstat (limited to 'phpBB/index.php')
-rw-r--r-- | phpBB/index.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 83535b50af..4e37782206 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -123,8 +123,10 @@ $db->sql_freeresult($result); $legend = implode($user->lang['COMMA_SEPARATOR'], $legend); // Generate birthday list if required ... +$show_birthdays = ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')); + $birthdays = $birthday_list = array(); -if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) +if ($show_birthdays) { $time = $user->create_datetime(); $now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset()); @@ -215,7 +217,7 @@ $template->assign_vars(array( 'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), 'U_SEND_PASSWORD' => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '', - 'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false, + 'S_DISPLAY_BIRTHDAY_LIST' => $show_birthdays, 'S_INDEX' => true, 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '', |