diff options
-rw-r--r-- | phpBB/adm/admin_attachments.php | 4 | ||||
-rw-r--r-- | phpBB/adm/admin_board.php | 7 | ||||
-rw-r--r-- | phpBB/adm/admin_database.php | 4 | ||||
-rw-r--r-- | phpBB/adm/pagestart.php | 14 | ||||
-rw-r--r-- | phpBB/develop/add_permissions.php | 17 | ||||
-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 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 4 | ||||
-rw-r--r-- | phpBB/language/en/admin.php | 8 | ||||
-rw-r--r-- | phpBB/language/en/ucp.php | 2 | ||||
-rw-r--r-- | phpBB/memberlist.php | 9 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 2 |
13 files changed, 49 insertions, 58 deletions
diff --git a/phpBB/adm/admin_attachments.php b/phpBB/adm/admin_attachments.php index 2797fc29d3..cb4b2e3464 100644 --- a/phpBB/adm/admin_attachments.php +++ b/phpBB/adm/admin_attachments.php @@ -1315,7 +1315,7 @@ function category_select($select_name, $group_id = FALSE) $group_select .= '</select>'; - return($group_select); + return $group_select; } // Extension group select @@ -1396,7 +1396,7 @@ function download_select($select_name, $group_id = false) $group_select .= '</select>'; - return($group_select); + return $group_select; } // Upload already uploaded file... huh? are you kidding? diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php index b590150080..e10a3b8ecf 100644 --- a/phpBB/adm/admin_board.php +++ b/phpBB/adm/admin_board.php @@ -71,6 +71,7 @@ $display_vars = array( 'vars' => array( 'email_enable' => array('lang' => 'ENABLE_EMAIL', 'type' => 'radio:enabled_disabled', 'explain' => true), 'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'type' => 'radio:enabled_disabled', 'explain' => true), + 'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'type' => 'radio:enabled_disabled', 'explain' => true), 'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'type' => 'text:20:50', 'explain' => true), 'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'type' => 'text:5:5', 'explain' => true), 'board_contact' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => true), @@ -148,10 +149,7 @@ $display_vars = array( 'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'type' => 'radio:yes_no', 'explain' => false), 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false), 'auth_download_pm' => array('lang' => 'ALLOW_DOWNLOAD_PM', 'type' => 'radio:yes_no', 'explain' => false), - 'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'type' => 'radio:yes_no', 'explain' => false), -// 'enable_karma_pm' => array('lang' => 'ENABLE_KARMA_PM', 'type' => 'radio:yes_no', 'explain' => false), 'auth_report_pm' => array('lang' => 'ALLOW_REPORT_PM', 'type' => 'radio:yes_no', 'explain' => false), - 'auth_quote_pm' => array('lang' => 'ALLOW_QUOTE_PM', 'type' => 'radio:yes_no', 'explain' => false), 'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'type' => 'radio:yes_no', 'explain' => false), 'email_pm' => array('lang' => 'ALLOW_EMAIL_PM', 'type' => 'radio:yes_no', 'explain' => false), 'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'type' => 'radio:yes_no', 'explain' => false), @@ -512,5 +510,4 @@ function board_disable($value) return '<input type="radio" name="config[board_disable]" value="1"' . $board_disable_yes . ' /> ' . $user->lang['YES'] . ' <input type="radio" name="config[board_disable]" value="0"' . $board_disable_no . ' /> ' . $user->lang['NO'] . '<br /><input class="post" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $new['board_disable_msg'] . '" />'; } - -?> +?>
\ No newline at end of file diff --git a/phpBB/adm/admin_database.php b/phpBB/adm/admin_database.php index b6d7586242..6d217fbafc 100644 --- a/phpBB/adm/admin_database.php +++ b/phpBB/adm/admin_database.php @@ -802,11 +802,11 @@ function get_table_def_mysql($table, $crlf) if (get_magic_quotes_runtime()) { - return(stripslashes($schema_create)); + return stripslashes($schema_create); } else { - return($schema_create); + return $schema_create; } } // End get_table_def_mysql diff --git a/phpBB/adm/pagestart.php b/phpBB/adm/pagestart.php index 32a72d14e7..7b1b6e5f78 100644 --- a/phpBB/adm/pagestart.php +++ b/phpBB/adm/pagestart.php @@ -153,9 +153,9 @@ function adm_page_footer($copyright_html = true) exit; } -function adm_page_message($title, $message, $show_header = false, $show_prev_info = true) +function adm_page_message($title, $message, $show_header = false) { - global $phpEx, $SID, $user, $_SERVER, $_ENV; + global $phpEx, $SID, $user; if ($show_header) { @@ -173,7 +173,6 @@ function adm_page_message($title, $message, $show_header = false, $show_prev_inf } - $page = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : $_ENV['REQUEST_URI']; ?> <br /><br /> @@ -183,14 +182,7 @@ function adm_page_message($title, $message, $show_header = false, $show_prev_inf <th><?php echo $title; ?></th> </tr> <tr> - <td class="row1" align="center"><?php echo $message; ?> -<?php - if ($page && $show_prev_info) - { - echo '<br /><br />'; - echo sprintf($user->lang['RETURN_PAGE'], '<a href="' . $page . '">', '</a>'); - } -?> </td> + <td class="row1" align="center"><?php echo $message; ?></td> </tr> </table> diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php index f0b48809c5..bba431eeb9 100644 --- a/phpBB/develop/add_permissions.php +++ b/phpBB/develop/add_permissions.php @@ -165,7 +165,6 @@ $u_permissions = array( 'u_pm_bbcode' => array(0, 1), 'u_pm_smilies' => array(0, 1), 'u_pm_download' => array(0, 1), - 'u_pm_sig' => array(0, 1), 'u_pm_report' => array(0, 1), 'u_pm_edit' => array(0, 1), 'u_pm_printpm' => array(0, 1), @@ -178,15 +177,29 @@ $u_permissions = array( echo "<p><b>Determining existing permissions</b></p>\n"; -$sql = 'SELECT auth_option FROM ' . ACL_OPTIONS_TABLE; +$sql = 'SELECT auth_option_id, auth_option FROM ' . ACL_OPTIONS_TABLE; $result = $db->sql_query($sql); +$remove_auth_options = array(); while ($row = $db->sql_fetchrow($result)) { + if (!in_array($row['auth_option'], array_keys(${substr($row['auth_option'], 0, 2) . 'permissions'}))) + { + $remove_auth_options[$row['auth_option']] = $row['auth_option_id']; + } unset(${substr($row['auth_option'], 0, 2) . 'permissions'}[$row['auth_option']]); } $db->sql_freeresult($result); +if (sizeof($remove_auth_options)) +{ + $db->sql_query('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')'); + $db->sql_query('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')'); + $db->sql_query('DELETE FROM ' . ACL_OPTIONS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')'); + + echo '<p><b>Removed the following auth options... [<i>' . implode(', ', array_keys($remove_auth_options)) . "</i>]</b></p>\n\n"; +} + $prefixes = array('f_', 'a_', 'm_', 'u_'); foreach ($prefixes as $prefix) 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 { diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 23dd0fa26d..220fc30ff5 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -31,6 +31,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0' INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg',''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_dst','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_hide_emails','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb22'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/'); @@ -163,9 +164,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_html_pm', '0' INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_download_pm', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_report_pm', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_quote_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('forward_pm', '1'); @@ -299,7 +298,6 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_html', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_bbcode', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_smilies', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_download', 1); -INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_sig', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_report', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_edit', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_printpm', 1); diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php index 30aec56bb2..cb16911993 100644 --- a/phpBB/language/en/admin.php +++ b/phpBB/language/en/admin.php @@ -523,13 +523,13 @@ $lang += array( 'acl_u_savedrafts' => 'Can save drafts', 'acl_u_download' => 'Can download files', 'acl_u_attach' => 'Can attach files', + 'acl_u_sig' => 'Can use signature', 'acl_u_pm_attach' => 'Can attach files in private messages', 'acl_u_pm_html' => 'Can post HTML in private messages', 'acl_u_pm_bbcode' => 'Can post BBCode in private messages', 'acl_u_pm_smilies' => 'Can post smilies in private messages', 'acl_u_pm_download' => 'Can download files in private messages', - 'acl_u_pm_sig' => 'Can use signature in private messages', 'acl_u_pm_report' => 'Can report private messages', 'acl_u_pm_edit' => 'Can edit own private messages', 'acl_u_pm_printpm' => 'Can print private messages', @@ -640,10 +640,8 @@ $lang += array( 'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages', 'ALLOW_SMILIES_PM' => 'Allow smilies in private messages', 'ALLOW_DOWNLOAD_PM' => 'Allow downloading of attachments in private messages', - 'ALLOW_SIG_PM' => 'Allow signatures in private messages', 'ALLOW_REPORT_PM' => 'Allow reporting of private messages', 'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages', - 'ALLOW_QUOTE_PM' => 'Allow quoting of private messages', 'ALLOW_PRINT_PM' => 'Allow print view in private messaging', 'ALLOW_EMAIL_PM' => 'Allow emailing private messages', 'ALLOW_IMG_PM' => 'Allow use of IMG BBCode Tag', @@ -746,7 +744,9 @@ $lang += array( 'ENABLE_EMAIL' => 'Enable board-wide emails', 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no emails will be sent by the board at all.', 'BOARD_EMAIL_FORM' => 'Users send email via board', - 'BOARD_EMAIL_FORM_EXPLAIN' => 'This function keeps email addresses completely private.', + 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.', + 'BOARD_HIDE_EMAILS' => 'Hide email addresses', + 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.', 'EMAIL_FUNCTION_NAME' => 'Email Function Name', 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.', 'EMAIL_PACKAGE_SIZE' => 'Email Package Size', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 101f60a723..bcfa4b589b 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -221,10 +221,8 @@ $lang += array( 'NO_AUTH_EDIT_MESSAGE' => 'You are not authorized to edit private messages.', 'NO_AUTH_FORWARD_MESSAGE' => 'You are not authorized to forward private messages.', 'NO_AUTH_GROUP_MESSAGE' => 'You are not authorized to send private messages to groups.', - 'NO_AUTH_QUOTE_MESSAGE' => 'You are not authorized to quote private messages.', 'NO_AUTH_READ_MESSAGE' => 'You are not authorized to read private messages.', 'NO_AUTH_READ_REMOVED_MESSAGE' => 'You are not able to read this message because it was removed by the author.', - 'NO_AUTH_REPLY_MESSAGE' => 'You are not authorized to reply to private messages.', 'NO_AUTH_SEND_MESSAGE' => 'You are not authorized sending private messages.', 'NO_AUTH_SIGNATURE' => 'You are not authorized to define a signature', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index fd5f5a5e7a..d6ed0707bf 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -997,7 +997,14 @@ function show_profile($data) } } - $email = (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_email')) ? ((!empty($config['board_email_form'])) ? "memberlist.$phpEx$SID&mode=email&u=$user_id" : 'mailto:' . $data['user_email']) : ''; + if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_email')) + { + $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:' . $data['user_email']); + } + else + { + $email = ''; + } $last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit']; diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index cac180d3cf..69e183d0e6 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -933,7 +933,7 @@ while ($row = $db->sql_fetchrow($result)) if (!empty($row['user_allow_viewemail']) || $auth->acl_get('a_email')) { - $user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? "memberlist.$phpEx$SID&mode=email&u=" . $poster_id : 'mailto:' . $row['user_email']; + $user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=email&u=$poster_id" : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']); } else { |