1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-21 08:00:46 +01:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander 2020-05-17 22:13:37 +02:00
commit f95e2c053a
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
3 changed files with 14 additions and 8 deletions

View File

@ -1685,8 +1685,8 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
'U_EMAIL' => $email,
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '',
'USER_JABBER' => ($config['jab_enable']) ? $data['user_jabber'] : '',
'USER_JABBER_IMG' => ($config['jab_enable'] && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'USER_JABBER' => ($config['jab_enable'] && $auth->acl_get('u_sendim')) ? $data['user_jabber'] : '',
'USER_JABBER_IMG' => ($config['jab_enable'] && $auth->acl_get('u_sendim') && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),

View File

@ -1018,7 +1018,7 @@ switch ($mode)
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT']);
$sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts');
if ($config['jab_enable'])
if ($config['jab_enable'] && $auth->acl_get('u_sendim'))
{
$sort_key_text['k'] = $user->lang['JABBER'];
$sort_key_sql['k'] = 'u.user_jabber';

View File

@ -39,22 +39,28 @@ class manager_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/manager.xml');
}
public function setUp()
public function setUp(): void
{
parent::setUp();
global $phpbb_root_path, $phpEx, $table_prefix;
$this->db = $this->new_dbal();
$this->db_tools = $this->getMock('\phpbb\db\tools\tools', [], [$this->db]);
$this->db_tools = $this->getMockBuilder('\phpbb\db\tools\tools')
->setConstructorArgs([$this->db])
->getMock();
$this->config_text = new \phpbb\config\db_text($this->db, $table_prefix . 'config_text');
$this->table_prefix = $table_prefix;
$container = new phpbb_mock_container_builder();
$dispatcher = new phpbb_mock_event_dispatcher();
$request = $this->getMock('\phpbb\request\request');
$template = $this->getMock('\phpbb\template\template');
$request = $this->getMockBuilder('\phpbb\request\request')
->disableOriginalConstructor()
->getMock();
$template = $this->getMockBuilder('\phpbb\template\template')
->disableOriginalConstructor()
->getMock();
$auth = new \phpbb\auth\auth();
$language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
@ -161,7 +167,7 @@ class manager_test extends phpbb_database_test_case
WHERE ' . $this->db->sql_in_set('field_id', $field_ids);
$this->assertSqlResultEquals([], $sql, 'All profile fields lang should be removed');
$sql = 'SELECT field_id, field_order
$sql = 'SELECT field_id, field_order
FROM ' . $this->table_prefix . 'profile_fields
ORDER BY field_id ASC';
$this->assertSqlResultEquals([