1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-02 23:12:46 +02:00

Merge branch '3.2.x'

This commit is contained in:
Marc Alexander 2018-02-21 21:14:07 +01:00
commit 2b8c8973e9
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
5 changed files with 53 additions and 5 deletions

View File

@ -356,6 +356,7 @@ class acp_board
'load_user_activity_limit' => array('lang' => 'LOAD_USER_ACTIVITY_LIMIT', 'validate' => 'int:0:99999999', 'type' => 'number:0:99999999', 'explain' => true),
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_accurate_pm_button' => array('lang' => 'YES_ACCURATE_PM_BUTTON', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_live_searches' => array('lang' => 'ALLOW_LIVE_SEARCHES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'CUSTOM_PROFILE_FIELDS',

View File

@ -105,6 +105,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_force_sender', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_accurate_pm_button', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_mod_rewrite', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_board_notifications', '1');

View File

@ -406,6 +406,8 @@ $lang = array_merge($lang, array(
'RECOMPILE_STYLES_EXPLAIN' => 'Check for updated style components on filesystem and recompile.',
'YES_ANON_READ_MARKING' => 'Enable topic marking for guests',
'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled, posts are always marked read for guests.',
'YES_ACCURATE_PM_BUTTON' => 'Enable accurate PM indicator in topic pages',
'YES_ACCURATE_PM_BUTTON_EXPLAIN' => 'If this setting is enabled, only users who are permitted to read private messages will have a private message button.',
'YES_BIRTHDAYS' => 'Enable birthday listing',
'YES_BIRTHDAYS_EXPLAIN' => 'If disabled the birthday listing is no longer displayed. To let this setting take effect the birthday feature needs to be enabled too.',
'YES_JUMPBOX' => 'Enable display of jumpbox',

View File

@ -0,0 +1,36 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\db\migration\data\v32x;
class enable_accurate_pm_button extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v322',
);
}
public function effectively_installed()
{
return isset($this->config['enable_accurate_pm_button']);
}
public function update_data()
{
return array(
array('config.add', array('enable_accurate_pm_button', '1')),
);
}
}

View File

@ -1576,12 +1576,20 @@ if (count($attach_list))
}
}
// Get the list of users who can receive private messages
$can_receive_pm_list = $auth->acl_get_list(array_keys($user_cache), 'u_readpm');
$can_receive_pm_list = (empty($can_receive_pm_list) || !isset($can_receive_pm_list[0]['u_readpm'])) ? array() : $can_receive_pm_list[0]['u_readpm'];
if ($config['enable_accurate_pm_button'])
{
// Get the list of users who can receive private messages
$can_receive_pm_list = $auth->acl_get_list(array_keys($user_cache), 'u_readpm');
$can_receive_pm_list = (empty($can_receive_pm_list) || !isset($can_receive_pm_list[0]['u_readpm'])) ? array() : $can_receive_pm_list[0]['u_readpm'];
// Get the list of permanently banned users
$permanently_banned_users = phpbb_get_banned_user_ids(array_keys($user_cache), false);
// Get the list of permanently banned users
$permanently_banned_users = phpbb_get_banned_user_ids(array_keys($user_cache), false);
}
else
{
$can_receive_pm_list = array_keys($user_cache);
$permanently_banned_users = [];
}
$i_total = count($rowset) - 1;
$prev_post_id = '';