. /** * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org * @copyright Copyright (C) 2002 - 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org * @package MantisBT */ /** * requires current_user_api */ require_once( 'current_user_api.php' ); /** * requires bug_api */ require_once( 'bug_api.php' ); /** * requires string_api */ require_once( 'string_api.php' ); /** * requires date_api */ require_once( 'date_api.php' ); /** * requires icon_api */ require_once( 'icon_api.php' ); $t_filter = current_user_get_bug_filter(); if( $t_filter === false ) { $t_filter = filter_get_default(); } $t_sort = $t_filter['sort']; $t_dir = $t_filter['dir']; $t_icon_path = config_get( 'icon_path' ); $t_update_bug_threshold = config_get( 'update_bug_threshold' ); $t_bug_resolved_status_threshold = config_get( 'bug_resolved_status_threshold' ); $t_hide_status_default = config_get( 'hide_status_default' ); $t_default_show_changed = config_get( 'default_show_changed' ); $c_filter['assigned'] = filter_create_assigned_to_unresolved( helper_get_current_project(), $t_current_user_id ); $url_link_parameters['assigned'] = FILTER_PROPERTY_HANDLER_ID . '=' . $t_current_user_id . '&' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_bug_resolved_status_threshold; $c_filter['recent_mod'] = array( FILTER_PROPERTY_CATEGORY => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_SEVERITY_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_STATUS_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HIGHLIGHT_CHANGED => $t_default_show_changed, FILTER_PROPERTY_REPORTER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HANDLER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_RESOLUTION_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_BUILD => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_VERSION => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HIDE_STATUS_ID => Array( '0' => META_FILTER_NONE, ), FILTER_PROPERTY_MONITOR_USER_ID => Array( '0' => META_FILTER_ANY, ), ); $url_link_parameters['recent_mod'] = FILTER_PROPERTY_HIDE_STATUS_ID . '=none'; $c_filter['reported'] = filter_create_reported_by( helper_get_current_project(), $t_current_user_id ); $url_link_parameters['reported'] = FILTER_PROPERTY_REPORTER_ID . '=' . $t_current_user_id . '&' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_hide_status_default; $c_filter['resolved'] = array( FILTER_PROPERTY_CATEGORY => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_SEVERITY_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_STATUS_ID => Array( '0' => $t_bug_resolved_status_threshold, ), FILTER_PROPERTY_HIGHLIGHT_CHANGED => $t_default_show_changed, FILTER_PROPERTY_REPORTER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HANDLER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_RESOLUTION_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_BUILD => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_VERSION => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HIDE_STATUS_ID => Array( '0' => $t_hide_status_default, ), FILTER_PROPERTY_MONITOR_USER_ID => Array( '0' => META_FILTER_ANY, ), ); $url_link_parameters['resolved'] = FILTER_PROPERTY_STATUS_ID . '=' . $t_bug_resolved_status_threshold . '&' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_bug_resolved_status_threshold; $c_filter['unassigned'] = filter_create_assigned_to_unresolved( helper_get_current_project(), 0 ); $url_link_parameters['unassigned'] = FILTER_PROPERTY_HANDLER_ID . '=[none]' . '&' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_hide_status_default; # TODO: check. handler value looks wrong $c_filter['monitored'] = filter_create_monitored_by( helper_get_current_project(), $t_current_user_id ); $url_link_parameters['monitored'] = FILTER_PROPERTY_MONITOR_USER_ID . '=' . $t_current_user_id . '&' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_hide_status_default; $c_filter['feedback'] = array( FILTER_PROPERTY_CATEGORY => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_SEVERITY_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_STATUS_ID => Array( '0' => config_get( 'bug_feedback_status' ), ), FILTER_PROPERTY_HIGHLIGHT_CHANGED => $t_default_show_changed, FILTER_PROPERTY_REPORTER_ID => Array( '0' => $t_current_user_id, ), FILTER_PROPERTY_HANDLER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_RESOLUTION_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_BUILD => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_VERSION => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HIDE_STATUS_ID => Array( '0' => $t_hide_status_default, ), FILTER_PROPERTY_MONITOR_USER_ID => Array( '0' => META_FILTER_ANY, ), ); $url_link_parameters['feedback'] = FILTER_PROPERTY_REPORTER_ID . '=' . $t_current_user_id . '&' . FILTER_PROPERTY_STATUS_ID . '=' . config_get( 'bug_feedback_status' ) . '&' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_hide_status_default; $c_filter['verify'] = array( FILTER_PROPERTY_CATEGORY => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_SEVERITY_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_STATUS_ID => Array( '0' => $t_bug_resolved_status_threshold, ), FILTER_PROPERTY_HIGHLIGHT_CHANGED => $t_default_show_changed, FILTER_PROPERTY_REPORTER_ID => Array( '0' => $t_current_user_id, ), FILTER_PROPERTY_HANDLER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_RESOLUTION_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_BUILD => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_VERSION => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HIDE_STATUS_ID => Array( '0' => $t_hide_status_default, ), FILTER_PROPERTY_MONITOR_USER_ID => Array( '0' => META_FILTER_ANY, ), ); $url_link_parameters['verify'] = FILTER_PROPERTY_REPORTER_ID . '=' . $t_current_user_id . '&' . FILTER_PROPERTY_STATUS_ID . '=' . $t_bug_resolved_status_threshold; $c_filter['my_comments'] = array( FILTER_PROPERTY_CATEGORY => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_SEVERITY_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_STATUS_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HIGHLIGHT_CHANGED => $t_default_show_changed, FILTER_PROPERTY_REPORTER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HANDLER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_RESOLUTION_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_BUILD => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_PRODUCT_VERSION => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_HIDE_STATUS_ID => Array( '0' => $t_hide_status_default, ), FILTER_PROPERTY_MONITOR_USER_ID => Array( '0' => META_FILTER_ANY, ), FILTER_PROPERTY_NOTE_USER_ID=> Array( '0' => META_FILTER_MYSELF, ), ); $url_link_parameters['my_comments'] = FILTER_PROPERTY_NOTE_USER_ID. '=' . META_FILTER_MYSELF . '&' . FILTER_PROPERTY_HIDE_STATUS_ID . '=' . $t_hide_status_default; $rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter[$t_box_title] ); # Improve performance by caching category data in one pass if( helper_get_current_project() == 0 ) { $t_categories = array(); foreach( $rows as $t_row ) { $t_categories[] = $t_row->category_id; } category_cache_array_rows( array_unique( $t_categories ) ); } $t_filter = array_merge( $c_filter[$t_box_title], $t_filter ); $box_title = lang_get( 'my_view_title_' . $t_box_title ); # -- ====================== BUG LIST ========================= -- ?>