From: <gi...@ma...> - 2009-10-31 03:21:07
|
The branch, master has been updated via 9fc04be8df104caf95da33514a34b1aa145cf794 (commit) from ecb3b6ba0845e13ce85b7dd1227b460bf3295dbc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9fc04be8df104caf95da33514a34b1aa145cf794 Author: Victor Boctor <vb...@gm...> Date: Fri Oct 30 20:20:52 2009 -0700 Fixes #10947: Entries in RSS feed show the...@ex... + a PHP error fix. ----------------------------------------------------------------------- Summary of changes: issues_rss.php | 17 ++++++++++------- news_rss.php | 12 +++++++++--- 2 files changed, 19 insertions(+), 10 deletions(-) ----------------------------------------------------------------------- commit 9fc04be8df104caf95da33514a34b1aa145cf794 Author: Victor Boctor <vb...@gm...> Date: Fri Oct 30 20:20:52 2009 -0700 Fixes #10947: Entries in RSS feed show the...@ex... + a PHP error fix. diff --git a/issues_rss.php b/issues_rss.php index 789c156..7aa37cc 100644 --- a/issues_rss.php +++ b/issues_rss.php @@ -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' ) . ']'; } @@ -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'; diff --git a/news_rss.php b/news_rss.php index da8a94c..ceb04c6 100644 --- a/news_rss.php +++ b/news_rss.php @@ -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; + } } } ----------------------------------------------------------------------- -- Mantis Bug Tracker |