diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-21 19:20:26 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-21 19:20:26 +0000 |
commit | e4be0ca79951d9ee13d85504d1c9d16391389f63 (patch) | |
tree | 78ec3604a3142ca58aa9f0d0406035565cd6f28f /phpBB/includes | |
parent | 1438067953f4a6b7fd99f40391febe150cd39534 (diff) | |
download | forums-e4be0ca79951d9ee13d85504d1c9d16391389f63.tar forums-e4be0ca79951d9ee13d85504d1c9d16391389f63.tar.gz forums-e4be0ca79951d9ee13d85504d1c9d16391389f63.tar.bz2 forums-e4be0ca79951d9ee13d85504d1c9d16391389f63.tar.xz forums-e4be0ca79951d9ee13d85504d1c9d16391389f63.zip |
- 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
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 3 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 25 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 8 |
3 files changed, 11 insertions, 25 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f3cb791438..03d9f5cc26 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1455,11 +1455,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; $msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); $display_header = (!isset($display_header)) ? false : (bool) $display_header; - $show_prev_info = (!isset($show_prev_info)) ? true : (bool) $show_prev_info; if (defined('IN_ADMIN') && !empty($user->data['session_admin'])) { - adm_page_message($msg_title, $msg_text, $display_header, $show_prev_info); + adm_page_message($msg_title, $msg_text, $display_header); adm_page_footer(); } else diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 0904238d23..5486d7cb99 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -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'), diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 1e7964765e..c3506ee863 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -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 { |