mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 18:54:08 +02:00
Merge remote-tracking branch 'github-nickvergessen/ticket/12235' into develop
* github-nickvergessen/ticket/12235: [ticket/12235] Convert WLM to custom profile field [ticket/12187] Do not make clickable when using as contact field [ticket/12187] Split generate_profile_fields_template() into 2 methods [ticket/12187] Remove user_website field [ticket/12187] Remove user_website functionality [ticket/12187] Convert website field data to custom profile field [ticket/12187] Add URL type for profile fields [ticket/12234] Replace ICQ with custom profile field [ticket/12233] Update schema file [ticket/12233] Add images back to subsilver2 [ticket/12233] Allow profile fields to be contact fields Conflicts: phpBB/adm/style/acp_prune_users.html
This commit is contained in:
@@ -63,7 +63,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
{
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
$profile_fields = $cp->generate_profile_fields_template('grab', $author_id);
|
||||
$profile_fields = $cp->grab_profile_fields_data($author_id);
|
||||
}
|
||||
|
||||
// Assign TO/BCC Addresses to template
|
||||
@@ -173,7 +173,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
|
||||
if (isset($profile_fields[$author_id]))
|
||||
{
|
||||
$cp_row = $cp->generate_profile_fields_template('show', false, $profile_fields[$author_id]);
|
||||
$cp_row = $cp->generate_profile_fields_template_data($profile_fields[$author_id]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,11 +209,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
'MESSAGE_ID' => $message_row['msg_id'],
|
||||
|
||||
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id) : '',
|
||||
'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '',
|
||||
'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/' . urlencode($user_info['user_icq']) . '/' : '',
|
||||
'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=aim&u=' . $author_id) : '',
|
||||
'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&.src=pg' : '',
|
||||
'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=msnm&u=' . $author_id) : '',
|
||||
'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id) : '',
|
||||
|
||||
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
|
@@ -264,12 +264,9 @@ class ucp_profile
|
||||
$cp_data = $cp_error = array();
|
||||
|
||||
$data = array(
|
||||
'icq' => request_var('icq', $user->data['user_icq']),
|
||||
'aim' => request_var('aim', $user->data['user_aim']),
|
||||
'msn' => request_var('msn', $user->data['user_msnm']),
|
||||
'yim' => request_var('yim', $user->data['user_yim']),
|
||||
'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)),
|
||||
'website' => request_var('website', $user->data['user_website']),
|
||||
);
|
||||
|
||||
if ($config['allow_birthdays'])
|
||||
@@ -292,18 +289,11 @@ class ucp_profile
|
||||
if ($submit)
|
||||
{
|
||||
$validate_array = array(
|
||||
'icq' => array(
|
||||
array('string', true, 3, 15),
|
||||
array('match', true, '#^[0-9]+$#i')),
|
||||
'aim' => array('string', true, 3, 255),
|
||||
'msn' => array('string', true, 5, 255),
|
||||
'jabber' => array(
|
||||
array('string', true, 5, 255),
|
||||
array('jabber')),
|
||||
'yim' => array('string', true, 5, 255),
|
||||
'website' => array(
|
||||
array('string', true, 12, 255),
|
||||
array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
|
||||
);
|
||||
|
||||
if ($config['allow_birthdays'])
|
||||
@@ -343,12 +333,9 @@ class ucp_profile
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'user_icq' => $data['icq'],
|
||||
'user_aim' => $data['aim'],
|
||||
'user_msnm' => $data['msn'],
|
||||
'user_yim' => $data['yim'],
|
||||
'user_jabber' => $data['jabber'],
|
||||
'user_website' => $data['website'],
|
||||
'user_notify_type' => $data['notify'],
|
||||
);
|
||||
|
||||
@@ -411,12 +398,9 @@ class ucp_profile
|
||||
$template->assign_vars(array(
|
||||
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
'ICQ' => $data['icq'],
|
||||
'YIM' => $data['yim'],
|
||||
'AIM' => $data['aim'],
|
||||
'MSN' => $data['msn'],
|
||||
'JABBER' => $data['jabber'],
|
||||
'WEBSITE' => $data['website'],
|
||||
));
|
||||
|
||||
// Get additional profile fields and assign them to the template block var 'profile_fields'
|
||||
|
Reference in New Issue
Block a user