mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
- removed unnecessary pm options
- added one option to clearly define email visibility git-svn-id: file:///svn/phpbb/trunk@5071 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -73,16 +73,14 @@ function compose_pm($id, $mode, $action)
|
||||
switch ($action)
|
||||
{
|
||||
case 'post':
|
||||
case 'reply':
|
||||
case 'quote':
|
||||
case 'forward':
|
||||
if (!$auth->acl_get('u_sendpm'))
|
||||
{
|
||||
trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'reply':
|
||||
case 'quote':
|
||||
case 'forward':
|
||||
if (!$msg_id)
|
||||
{
|
||||
trigger_error('NO_MESSAGE');
|
||||
@@ -147,16 +145,6 @@ function compose_pm($id, $mode, $action)
|
||||
trigger_error('NO_ACTION_MODE');
|
||||
}
|
||||
|
||||
if ($action == 'reply' && !$auth->acl_get('u_sendpm'))
|
||||
{
|
||||
trigger_error('NO_AUTH_REPLY_MESSAGE');
|
||||
}
|
||||
|
||||
if ($action == 'quote' && (!$config['auth_quote_pm'] || !$auth->acl_get('u_sendpm')))
|
||||
{
|
||||
trigger_error('NO_AUTH_QUOTE_MESSAGE');
|
||||
}
|
||||
|
||||
if ($action == 'forward' && (!$config['forward_pm'] || !$auth->acl_get('u_pm_forward')))
|
||||
{
|
||||
trigger_error('NO_AUTH_FORWARD_MESSAGE');
|
||||
@@ -301,7 +289,7 @@ function compose_pm($id, $mode, $action)
|
||||
|
||||
if (!in_array($action, array('quote', 'edit', 'delete', 'forward')))
|
||||
{
|
||||
$enable_sig = ($config['allow_sig_pm'] && $auth->acl_get('u_pm_sig') && $user->optionget('attachsig'));
|
||||
$enable_sig = ($config['allow_sig'] && $auth->acl_get('u_sig') && $user->optionget('attachsig'));
|
||||
$enable_smilies = ($config['allow_smilies'] && $auth->acl_get('u_pm_smilies') && $user->optionget('smile'));
|
||||
$enable_bbcode = ($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode') && $user->optionget('bbcode'));
|
||||
$enable_urls = true;
|
||||
@@ -336,7 +324,6 @@ function compose_pm($id, $mode, $action)
|
||||
$smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies'));
|
||||
$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img'));
|
||||
$flash_status = ($config['auth_flash_pm'] && $auth->acl_get('u_pm_flash'));
|
||||
$quote_status = ($config['auth_quote_pm']);
|
||||
|
||||
// Save Draft
|
||||
if ($save && $auth->acl_get('u_savedrafts'))
|
||||
@@ -441,7 +428,7 @@ function compose_pm($id, $mode, $action)
|
||||
|
||||
if ($update_message)
|
||||
{
|
||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, $quote_status);
|
||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -751,7 +738,7 @@ function compose_pm($id, $mode, $action)
|
||||
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
||||
'S_SMILIES_ALLOWED' => $smilies_status,
|
||||
'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
|
||||
'S_SIG_ALLOWED' => ($config['allow_sig_pm'] && $auth->acl_get('u_pm_sig')),
|
||||
'S_SIG_ALLOWED' => ($config['allow_sig'] && $auth->acl_get('u_sig')),
|
||||
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
|
||||
'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
|
||||
'S_SAVE_ALLOWED' => $auth->acl_get('u_savedrafts'),
|
||||
|
@@ -131,7 +131,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
|
||||
$user_info['sig'] = '';
|
||||
|
||||
$signature = ($message_row['enable_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_pm_sig') && $user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
|
||||
$signature = ($message_row['enable_sig'] && $config['allow_sig'] && $auth->acl_get('u_sig') && $user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
|
||||
|
||||
// End signature parsing, only if needed
|
||||
if ($signature)
|
||||
@@ -186,7 +186,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_AUTHOR_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $author_id,
|
||||
'U_EMAIL' => $user_info['email'],
|
||||
'U_QUOTE' => ($config['auth_quote_pm'] && $auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_EDIT' => (($message_row['message_time'] > time() - $config['pm_edit_time'] || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous",
|
||||
@@ -338,7 +338,7 @@ function message_history($msg_id, $user_id, $message_row, $folder)
|
||||
'U_MSG_ID' => $row['msg_id'],
|
||||
'U_VIEW_MESSAGE'=> "$url&f=$folder_id&p=" . $row['msg_id'],
|
||||
'U_AUTHOR_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=$author_id",
|
||||
'U_QUOTE' => ($config['auth_quote_pm'] && $auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '')
|
||||
);
|
||||
unset($rowset[$id]);
|
||||
@@ -434,7 +434,7 @@ function get_user_informations($user_id, $user_row)
|
||||
|
||||
if (!empty($user_row['user_allow_viewemail']) || $auth->acl_get('a_email'))
|
||||
{
|
||||
$user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=email&u=" . $user_id : 'mailto:' . $user_row['user_email'];
|
||||
$user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=email&u=$user_id" : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $user_row['user_email']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user