Skip to content

Commit

Permalink
BugID: 695
Browse files Browse the repository at this point in the history
Added: $g_hide_user_email
Modified: get_email_link(), can now hide the users email, default is set to "Show the email"


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@302 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
rufinus committed Jul 17, 2001
1 parent 271e459 commit d8e10cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions config_inc.php
Expand Up @@ -89,6 +89,7 @@
# set to 0 to disable email check
$g_validate_email = 1;
$g_check_mx_record = 1;
$g_hide_user_email =0;

################################
### Mantis Language Settings ###
Expand Down
11 changes: 8 additions & 3 deletions core_print_API.php
Expand Up @@ -25,7 +25,7 @@ function print_user( $p_user_id ) {
$t_username = db_result( $result, 0, 0 );
$t_email = db_result( $result, 0, 1 );

PRINT "<a href=\"mailto:$t_email\">".$t_username."</a>";
print_email_link($t_email,$t_username);
}
else {
PRINT $s_user_no_longer_exists;
Expand Down Expand Up @@ -587,12 +587,17 @@ function print_bracket_link( $p_link, $p_url_text ) {
### --------------------
# print a mailto: href link
function print_email_link( $p_email, $p_text ) {
PRINT "<a href=\"mailto:$p_email\">$p_text</a>";
PRINT get_email_link($p_email,$p_text);
}
### --------------------
# return the mailto: href string link instead of printing it
function get_email_link( $p_email, $p_text ) {
return "<a href=\"mailto:$p_email\">$p_text</a>";
global $g_hide_user_email;
if($g_hide_user_email){
return "$p_text";
}else{
return "<a href=\"mailto:$p_email\">$p_text</a>";
}
}
### --------------------
# print our standard mysql query error
Expand Down

0 comments on commit d8e10cc

Please sign in to comment.