Skip to content

Commit

Permalink
Fixes #10947: Entries in RSS feed show theusername@example.com + a PH…
Browse files Browse the repository at this point in the history
…P error fix.
  • Loading branch information
vboctor committed Oct 31, 2009
1 parent 06c9ea2 commit 72c6185
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
17 changes: 10 additions & 7 deletions issues_rss.php
Expand Up @@ -174,7 +174,7 @@
$about = $link = $t_path . "view.php?id=" . $t_bug->id;
$title = string_rss_links( bug_format_id( $t_bug->id ) . ': ' . $t_bug->summary );

if ( $row['view_state'] == VS_PRIVATE ) {
if ( $t_bug->view_state == VS_PRIVATE ) {
$title .= ' [' . lang_get( 'private' ) . ']';
}

Expand All @@ -187,16 +187,19 @@
$date = $t_bug->last_updated;

# author of item
$author = string_rss_links( user_get_name( $t_bug->reporter_id ) );
$author = '';
if ( access_has_global_level( config_get( 'show_user_email_threshold' ) ) ) {
$t_author_name = string_rss_links( user_get_name( $t_bug->reporter_id ) );
$t_author_email = user_get_field( $t_bug->reporter_id, 'email' );
if ( is_blank( $t_author_email ) ) {
$t_author_email = $author . '@example.com';

if ( !is_blank( $t_author_email ) ) {
if ( !is_blank( $t_author_name ) ) {
$author = $t_author_name . ' <' . $t_author_email . '>';
} else {
$author = $t_author_email;
}
}
} else {
$t_author_email = $author . '@example.com';
}
$author .= ' <' . $t_author_email . '>';

# $comments = 'http://www.example.com/sometext.php?somevariable=somevalue&comments=1'; # url to comment page rss 2.0 value
$comments = $t_path . 'view.php?id=' . $t_bug->id . '#bugnotes';
Expand Down
12 changes: 9 additions & 3 deletions news_rss.php
Expand Up @@ -141,11 +141,17 @@
$date = $v_date_posted;

# author of item
$author = string_rss_links( user_get_name( $v_poster_id ) );
$author = '';
if ( access_has_global_level( config_get( 'show_user_email_threshold' ) ) ) {
$t_author_name = string_rss_links( user_get_name( $v_poster_id ) );
$t_author_email = user_get_field( $v_poster_id, 'email' );
if ( ! is_blank( $t_author_email ) ) {
$author .= ' <' . $t_author_email . '>';

if ( !is_blank( $t_author_email ) ) {
if ( !is_blank( $t_author_name ) ) {
$author = $t_author_name . ' <' . $t_author_email . '>';
} else {
$author = $t_author_email;
}
}
}

Expand Down

0 comments on commit 72c6185

Please sign in to comment.