Skip to content

Commit

Permalink
Revert limit history range to current project
Browse files Browse the repository at this point in the history
Revert the changes made by Issue #19945 (commit adbd088).

The api function history_get_event_from_row should not impose a
limitation for current project queries.

The original timeline issue, which #19945 was addressing, has now been
resolved in another way, see issue #21072.

Fixes: #21146
  • Loading branch information
cproensa authored and dregad committed Aug 16, 2016
1 parent 28b6d79 commit e48e737
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/history_api.php
Expand Up @@ -287,7 +287,6 @@ function history_get_range_result( $p_bug_id = null, $p_start_time = null, $p_en
function history_get_event_from_row( $p_result, $p_user_id = null, $p_check_access_to_issue = true ) {
static $s_bug_visible = array();
$t_user_id = ( null === $p_user_id ) ? auth_get_current_user_id() : $p_user_id;
$t_project_id = helper_get_current_project();

while ( $t_row = db_fetch_array( $p_result ) ) {
extract( $t_row, EXTR_PREFIX_ALL, 'v' );
Expand All @@ -297,11 +296,6 @@ function history_get_event_from_row( $p_result, $p_user_id = null, $p_check_acce
continue;
}

# Make sure the entry belongs to current project.
if ( $t_project_id != ALL_PROJECTS && $t_project_id != bug_get_field( $v_bug_id, 'project_id' ) ) {
continue;
}

if( $p_check_access_to_issue ) {
if( !isset( $s_bug_visible[$v_bug_id] ) ) {
$s_bug_visible[$v_bug_id] = access_has_bug_level( VIEWER, $v_bug_id );
Expand Down

0 comments on commit e48e737

Please sign in to comment.