diff --git a/Source/Source.ViewAPI.php b/Source/Source.ViewAPI.php index 6aa5d3836..39da71d50 100644 --- a/Source/Source.ViewAPI.php +++ b/Source/Source.ViewAPI.php @@ -26,6 +26,7 @@ function Source_View_Changesets( $p_changesets, $p_repos=null, $p_show_repos=tru $t_repo = $t_repos[ $t_changeset->repo_id ]; $t_vcs = SourceVCS::repo( $t_repo ); + $t_changeset->load_bugs(); $t_changeset->load_files(); $t_author = Source_View_Author( $t_changeset, false ); @@ -35,6 +36,7 @@ function Source_View_Changesets( $p_changesets, $p_repos=null, $p_show_repos=tru +

name . ': ' : '' ) . $t_vcs->show_changeset( $t_repo, $t_changeset ) @@ -63,7 +65,7 @@ function Source_View_Changesets( $p_changesets, $p_repos=null, $p_show_repos=tru -message ) ) ) ) ); -?> + ?> + + +bugs ); + + if( $t_bugs ) { + echo '', + plugin_lang_get( 'affected_issues' ), + '
'; + echo '', implode( ', ', $t_bugs ), ''; + } else { +?> +

+ + + +
+ + +
+ + files as $t_file ) { ?> show_file( $t_repo, $t_changeset, $t_file ) ) ?> - + url_diff( $t_repo, $t_changeset, $t_file ) ) { ?> diff --git a/Source/pages/attach.php b/Source/pages/attach.php index b37d90181..8a1c183a7 100644 --- a/Source/pages/attach.php +++ b/Source/pages/attach.php @@ -8,6 +8,7 @@ $f_changeset_id = gpc_get_int( 'id' ); $f_bug_ids = gpc_get_string( 'bug_ids' ); +$f_redirect = gpc_get_string( 'redirect', '' ); $t_changeset = SourceChangeset::load( $f_changeset_id ); $t_changeset->load_bugs(); @@ -30,5 +31,16 @@ $t_changeset->save_bugs( $t_user_id ); form_security_purge( 'plugin_Source_attach' ); -print_successful_redirect( plugin_page( 'view', true ) . '&id=' . $t_changeset->id ); +# If a redirection id was provided, return to the corresponding anchor on +# changeset list page, otherwise go to view page +if( $f_redirect ) { + $t_redirect_url = plugin_page( 'list', true ) + . '&id=' . $t_changeset->repo_id + . '#' . string_attribute( $f_redirect ); +} else { + $t_redirect_url = plugin_page( 'view', true ) + . '&id=' . $t_changeset->id; +} + +print_successful_redirect( $t_redirect_url );