mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x' into 3.3.x
This commit is contained in:
commit
ce97122c6d
3 changed files with 14 additions and 8 deletions
|
@ -1685,8 +1685,8 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
||||||
'U_EMAIL' => $email,
|
'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) : '',
|
'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' => ($config['jab_enable'] && $auth->acl_get('u_sendim')) ? $data['user_jabber'] : '',
|
||||||
'USER_JABBER_IMG' => ($config['jab_enable'] && $data['user_jabber']) ? $user->img('icon_contact_jabber', $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_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
|
||||||
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
|
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
|
||||||
|
|
|
@ -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_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');
|
$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_text['k'] = $user->lang['JABBER'];
|
||||||
$sort_key_sql['k'] = 'u.user_jabber';
|
$sort_key_sql['k'] = 'u.user_jabber';
|
||||||
|
|
|
@ -39,22 +39,28 @@ class manager_test extends phpbb_database_test_case
|
||||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/manager.xml');
|
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/manager.xml');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
global $phpbb_root_path, $phpEx, $table_prefix;
|
global $phpbb_root_path, $phpEx, $table_prefix;
|
||||||
|
|
||||||
$this->db = $this->new_dbal();
|
$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->config_text = new \phpbb\config\db_text($this->db, $table_prefix . 'config_text');
|
||||||
$this->table_prefix = $table_prefix;
|
$this->table_prefix = $table_prefix;
|
||||||
|
|
||||||
$container = new phpbb_mock_container_builder();
|
$container = new phpbb_mock_container_builder();
|
||||||
$dispatcher = new phpbb_mock_event_dispatcher();
|
$dispatcher = new phpbb_mock_event_dispatcher();
|
||||||
|
|
||||||
$request = $this->getMock('\phpbb\request\request');
|
$request = $this->getMockBuilder('\phpbb\request\request')
|
||||||
$template = $this->getMock('\phpbb\template\template');
|
->disableOriginalConstructor()
|
||||||
|
->getMock();
|
||||||
|
$template = $this->getMockBuilder('\phpbb\template\template')
|
||||||
|
->disableOriginalConstructor()
|
||||||
|
->getMock();
|
||||||
|
|
||||||
$auth = new \phpbb\auth\auth();
|
$auth = new \phpbb\auth\auth();
|
||||||
$language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
$language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||||
|
|
Loading…
Add table
Reference in a new issue