1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-14 04:34:07 +02:00

[ticket/17493] Remove settings, values, and lang vars for jabber

PHPBB-17493
This commit is contained in:
Marc Alexander
2025-04-13 20:48:15 +02:00
parent e32ebda982
commit a7c7c38bfb
21 changed files with 11 additions and 101 deletions

View File

@@ -201,18 +201,13 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
}
}
$u_pm = $u_jabber = '';
$u_pm = '';
if ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')))
{
$u_pm = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id);
}
if ($config['jab_enable'] && $user_info['user_jabber'] && $auth->acl_get('u_sendim'))
{
$u_jabber = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id);
}
$can_edit_pm = ($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit');
$msg_data = array(
@@ -248,7 +243,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'MESSAGE_ID' => $message_row['msg_id'],
'U_PM' => $u_pm,
'U_JABBER' => $u_jabber,
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
'U_EMAIL' => $user_info['email'],
@@ -358,11 +352,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'NAME' => $user->lang['SEND_EMAIL'],
'U_CONTACT' => $user_info['email'],
),
array(
'ID' => 'jabber',
'NAME' => $user->lang['JABBER'],
'U_CONTACT' => $u_jabber,
),
);
foreach ($contact_fields as $field)

View File

@@ -54,12 +54,6 @@ class ucp_prefs
'allowpm' => $request->variable('allowpm', (bool) $user->data['user_allow_pm']),
);
if ($data['notifymethod'] == messenger_interface::NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
{
// Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct.
$data['notifymethod'] = messenger_interface::NOTIFY_BOTH;
}
/**
* Add UCP edit global settings data before they are assigned to the template or submitted
*
@@ -218,7 +212,6 @@ class ucp_prefs
'options' => $timezone_select,
],
'S_CAN_HIDE_ONLINE' => (bool) $auth->acl_get('u_hideonline'),
'S_SELECT_NOTIFY' => (bool) ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')),
]);
break;

View File

@@ -284,9 +284,7 @@ class ucp_profile
$cp_data = $cp_error = array();
$data = array(
'jabber' => $request->variable('jabber', $user->data['user_jabber'], true),
);
$data = [];
if ($config['allow_birthdays'])
{
@@ -318,11 +316,7 @@ class ucp_profile
if ($submit)
{
$validate_array = array(
'jabber' => array(
array('string', true, 5, 255),
array('jabber')),
);
$validate_array = [];
if ($config['allow_birthdays'])
{
@@ -363,18 +357,8 @@ class ucp_profile
if (!count($error))
{
$data['notify'] = $user->data['user_notify_type'];
if ($data['notify'] == messenger_interface::NOTIFY_IM && (!$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml')))
{
// User has not filled in a jabber address (Or one of the modules is disabled or jabber is disabled)
// Disable notify by Jabber now for this user.
$data['notify'] = messenger_interface::NOTIFY_EMAIL;
}
$sql_ary = array(
'user_jabber' => $data['jabber'],
'user_notify_type' => $data['notify'],
'user_notify_type' => messenger_interface::NOTIFY_EMAIL,
);
if ($config['allow_birthdays'])
@@ -446,8 +430,6 @@ class ucp_profile
$template->assign_vars(array(
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
'S_JABBER_ENABLED' => $config['jab_enable'],
'JABBER' => $data['jabber'],
));
// Get additional profile fields and assign them to the template block var 'profile_fields'

View File

@@ -128,7 +128,7 @@ class ucp_resend
// Grab an array of user_id's with a_user permissions ... these users can activate a user
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
$sql = 'SELECT user_id, username, user_email, user_lang, user_notify_type
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $admin_ary[0]['a_user']);
$result = $db->sql_query($sql);