From: Victor B. <vb...@us...> - 2004-06-28 10:13:36
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4914/core Modified Files: filter_api.php html_api.php Added Files: my_view_inc.php my_view_inc_assigned.php my_view_inc_recent.php my_view_inc_reported.php my_view_inc_resolved.php my_view_inc_unassigned.php Log Message: Enh #3739: Portal for viewing bug status lists and summaries after login. M config_defaults_inc.php M login.php M login_cookie_test.php M set_project.php M core/filter_api.php M core/html_api.php A core/my_view_inc.php A core/my_view_inc_assigned.php A core/my_view_inc_recent.php A core/my_view_inc_reported.php A core/my_view_inc_resolved.php A core/my_view_inc_unassigned.php M lang/strings_english.txt - Implementation of "My View" page (thanks to tazza70 for providing the patch) --- NEW FILE: my_view_inc_resolved.php --- <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... # Copyright (C) 2002 - 2004 Mantis Team - man...@li... # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # -------------------------------------------------------- # $Id: my_view_inc_resolved.php,v 1.1 2004/06/28 10:13:23 vboctor Exp $ # -------------------------------------------------------- ?> <?php $c_filter_resolved = array( '_version' => 'v5', 'show_category' => Array ( '0' => any ), 'show_severity' => Array ( '0' => any ), 'show_status' => Array ( '0' => 80 ), 'per_page' => '50', 'highlight_changed' => '6', 'hide_closed' => 'on', 'reporter_id' => Array ( '0' => any ), 'handler_id' => Array ( '0' => any ), 'sort' => 'last_updated', 'dir' => 'DESC', 'start_month' => '', 'start_day' => '', 'start_year' => '', 'end_month' => '', 'end_day' => '', 'end_year' => '', 'search' => '', 'hide_resolved' => '', 'and_not_assigned' => '', 'show_resolution' => Array ( '0' => any ), 'show_build' => Array ( '0' => any ), 'show_version' => Array ( '0' => any ), 'do_filter_by_date' => '', 'custom_fields' => Array ( ), '_view_type' => 'simple', 'hide_status' => Array ( '0' => 90 ) ); $rows = filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter_resolved ); $box_title = lang_get( 'my_view_title_resolved' ); include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); ?> --- NEW FILE: my_view_inc_reported.php --- <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... # Copyright (C) 2002 - 2004 Mantis Team - man...@li... # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # -------------------------------------------------------- # $Id: my_view_inc_reported.php,v 1.1 2004/06/28 10:13:23 vboctor Exp $ # -------------------------------------------------------- ?> <?php $c_filter_reported = array( '_version' => 'v5', 'show_category' => Array ( '0' => any ), 'show_severity' => Array ( '0' => any ), 'show_status' => Array ( '0' => any ), 'per_page' => '50', 'highlight_changed' => '6', 'hide_closed' => 'on', 'reporter_id' => Array ( '0' => $t_current_user_id ), 'handler_id' => Array ( '0' => any ), 'sort' => 'last_updated', 'dir' => 'DESC', 'start_month' => '', 'start_day' => '', 'start_year' => '', 'end_month' => '', 'end_day' => '', 'end_year' => '', 'search' => '', 'hide_resolved' => '', 'and_not_assigned' => '', 'show_resolution' => Array ( '0' => any ), 'show_build' => Array ( '0' => any ), 'show_version' => Array ( '0' => any ), 'do_filter_by_date' => '', 'custom_fields' => Array ( ), '_view_type' => 'simple', 'hide_status' => Array ( '0' => 90 ) ); $rows = filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter_reported ); $box_title = lang_get( 'my_view_title_reported' ); include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); ?> Index: filter_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- filter_api.php 24 Jun 2004 03:46:45 -0000 1.40 +++ filter_api.php 28 Jun 2004 10:13:23 -0000 1.41 @@ -36,7 +36,7 @@ # $p_bug_count # - you don't need to give a value here, the number of bugs will be # stored here on return - function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p_bug_count ) { + function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p_bug_count, $custom_filter = null ) { $t_bug_table = config_get( 'mantis_bug_table' ); $t_bug_text_table = config_get( 'mantis_bug_text_table' ); $t_bugnote_table = config_get( 'mantis_bugnote_table' ); @@ -46,7 +46,11 @@ $t_limit_reporters = config_get( 'limit_reporters' ); $t_report_bug_threshold = config_get( 'report_bug_threshold' ); - $t_filter = current_user_get_bug_filter(); + if ( $custom_filter == null ) { + $t_filter = current_user_get_bug_filter(); + } else { + $t_filter = $custom_filter; + } if ( false === $t_filter ) { return false; # signify a need to create a cookie --- NEW FILE: my_view_inc_recent.php --- <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... # Copyright (C) 2002 - 2004 Mantis Team - man...@li... # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # -------------------------------------------------------- # $Id: my_view_inc_recent.php,v 1.1 2004/06/28 10:13:23 vboctor Exp $ # -------------------------------------------------------- ?> <?php $c_filter_recent = array( '_version' => 'v5', 'show_category' => Array ( '0' => any ), 'show_severity' => Array ( '0' => any ), 'show_status' => Array ( '0' => any ), 'per_page' => '50', 'highlight_changed' => '6', 'hide_closed' => 'on', 'reporter_id' => Array ( '0' => any ), 'handler_id' => Array ( '0' => any ), 'sort' => 'last_updated', 'dir' => 'DESC', 'start_month' => '', 'start_day' => '', 'start_year' => '', 'end_month' => '', 'end_day' => '', 'end_year' => '', 'search' => '', 'hide_resolved' => 'on', 'and_not_assigned' => '', 'show_resolution' => Array ( '0' => any ), 'show_build' => Array ( '0' => any ), 'show_version' => Array ( '0' => any ), 'do_filter_by_date' => '', 'custom_fields' => Array ( ), '_view_type' => 'simple', 'hide_status' => Array ( '0' => none ) ); $rows = filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter_recent ); $box_title = lang_get( 'my_view_title_recent_mod' ); include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); ?> --- NEW FILE: my_view_inc_assigned.php --- <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... # Copyright (C) 2002 - 2004 Mantis Team - man...@li... # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # -------------------------------------------------------- # $Id: my_view_inc_assigned.php,v 1.1 2004/06/28 10:13:23 vboctor Exp $ # -------------------------------------------------------- ?> <?php $c_filter_assigned = array( '_version' => 'v5', 'show_category' => Array ( '0' => any ), 'show_severity' => Array ( '0' => any ), 'show_status' => Array ( '0' => any ), 'per_page' => '50', 'highlight_changed' => '6', 'hide_closed' => 'on', 'reporter_id' => Array ( '0' => any ), 'handler_id' => Array ( '0' => $t_current_user_id ), 'sort' => 'last_updated', 'dir' => 'DESC', 'start_month' => '', 'start_day' => '', 'start_year' => '', 'end_month' => '', 'end_day' => '', 'end_year' => '', 'search' => '', 'hide_resolved' => 'on', 'and_not_assigned' => '', 'show_resolution' => Array ( '0' => any ), 'show_build' => Array ( '0' => any ), 'show_version' => Array ( '0' => any ), 'do_filter_by_date' => '', 'custom_fields' => Array ( ), '_view_type' => 'simple', 'hide_status' => Array ( '0' => 80 ) ); $rows = filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter_assigned); $box_title = lang_get( 'my_view_title_assigned' ); include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); ?> --- NEW FILE: my_view_inc_unassigned.php --- <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... # Copyright (C) 2002 - 2004 Mantis Team - man...@li... # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # -------------------------------------------------------- # $Id: my_view_inc_unassigned.php,v 1.1 2004/06/28 10:13:23 vboctor Exp $ # -------------------------------------------------------- ?> <?php $c_filter_unassigned = array( '_version' => 'v5', 'show_category' => Array ( '0' => any ), 'show_severity' => Array ( '0' => any ), 'show_status' => Array ( '0' => any ), 'per_page' => '50', 'highlight_changed' => '6', 'hide_closed' => 'on', 'reporter_id' => Array ( '0' => any ), 'handler_id' => Array ( '0' => none ), 'sort' => 'last_updated', 'dir' => 'DESC', 'start_month' => '', 'start_day' => '', 'start_year' => '', 'end_month' => '', 'end_day' => '', 'end_year' => '', 'search' => '', 'hide_resolved' => '', 'and_not_assigned' => '', 'show_resolution' => Array ( '0' => any ), 'show_build' => Array ( '0' => any ), 'show_version' => Array ( '0' => any ), 'do_filter_by_date' => '', 'custom_fields' => Array ( ), '_view_type' => 'simple', 'hide_status' => Array ( '0' => 90 ) ); $rows = filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter_unassigned ); $box_title = lang_get( 'my_view_title_unassigned' ); include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'my_view_inc.php' ); ?> Index: html_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/html_api.php,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- html_api.php 28 May 2004 06:24:00 -0000 1.103 +++ html_api.php 28 Jun 2004 10:13:23 -0000 1.104 @@ -369,6 +369,9 @@ # Main Page $t_menu_options[] = '<a href="main_page.php">' . lang_get( 'main_link' ) . '</a>'; + # My View + $t_menu_options[] = '<a href="my_view_page.php">' . lang_get( 'my_view_link' ) . '</a>'; + # View Bugs $t_menu_options[] = '<a href="view_all_bug_page.php">' . lang_get( 'view_bugs_link' ) . '</a>'; --- NEW FILE: my_view_inc.php --- <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - ke...@30... # Copyright (C) 2002 - 2004 Mantis Team - man...@li... # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details # -------------------------------------------------------- # $Id: my_view_inc.php,v 1.1 2004/06/28 10:13:23 vboctor Exp $ # -------------------------------------------------------- ?> <?php $t_core_path = config_get( 'core_path' ); require_once( $t_core_path . 'current_user_api.php' ); require_once( $t_core_path . 'bug_api.php' ); require_once( $t_core_path . 'string_api.php' ); require_once( $t_core_path . 'date_api.php' ); require_once( $t_core_path . 'icon_api.php' ); ?> <?php $t_filter = current_user_get_bug_filter(); $t_sort = $t_filter['sort']; $t_dir = $t_filter['dir']; $t_checkboxes_exist = false; $t_icon_path = config_get( 'icon_path' ); $t_update_bug_threshold = config_get( 'update_bug_threshold' ); ?> <?php # -- ====================== BUG LIST ========================= -- ?> <table class="width100" cellspacing="1"> <?php # -- Navigation header row -- ?> <tr> <?php # -- Viewing range info -- ?> <td class="form-title" colspan="2"> <?php #echo lang_get( 'viewing_bugs_title' ) ?> <?php echo $box_title ?> <?php if ( sizeof( $rows ) > 0 ) { $v_start = $t_filter['per_page'] * ($f_page_number-1) +1; $v_end = $v_start + sizeof( $rows ) -1; } else { $v_start = 0; $v_end = 0; } echo "($v_start - $v_end / $t_bug_count)"; ?> </td> </tr> <?php mark_time( 'begin loop' ); ?> <?php # -- Loop over bug rows and create $v_* variables -- ?> <?php for($i=0; $i < sizeof( $rows ); $i++) { # prefix bug data with v_ extract( $rows[$i], EXTR_PREFIX_ALL, 'v' ); $v_summary = string_display_links( $v_summary ); $t_last_updated = date( config_get( 'normal_date_format' ), $v_last_updated ); # choose color based on status $status_color = get_status_color( $v_status ); # grab the bugnote count $bugnote_count = bug_get_bugnote_count( $v_id ); # Check for attachments $t_attachment_count = 0; if ( ( file_can_view_bug_attachments( $v_id ) ) ) { $t_attachment_count = file_bug_attachment_count( $v_id ); } # grab the project name $project_name = project_get_field( $v_project_id, 'name' ); if ( $bugnote_count > 0 ) { $v_bugnote_updated = bug_get_newest_bugnote_timestamp( $v_id ); } ?> <tr bgcolor="<?php echo $status_color ?>"> <?php # -- Bug ID and details link + Pencil shortcut -- ?> <td class="center" valign="top" width ="0" nowrap> <span class="small"> <?php print_bug_link( $v_id ); echo '<br />'; if ( access_has_bug_level( $t_update_bug_threshold, $v_id ) ) { echo '<a href="' . string_get_bug_update_url( $v_id ) . '"><img border="0" src="' . $t_icon_path . 'update.png' . '" alt="' . lang_get( 'update_bug_button' ) . '" /></a>'; } print_status_icon( $v_priority ); if ( 0 < $t_attachment_count ) { echo '<a href="' . string_get_bug_view_url( $v_id ) . '#attachments">'; echo '<img border="0" src="' . $t_icon_path . 'attachment.png' . '"'; echo ' alt="' . lang_get( 'attachment_alt' ) . '"'; echo ' title="' . $t_attachment_count . ' ' . lang_get( 'attachments' ) . '"'; echo ' />'; echo '</a>'; } if ( VS_PRIVATE == $v_view_state ) { echo '<img src="' . $t_icon_path . 'protected.gif" width="8" height="15" alt="' . lang_get( 'private' ) . '" />'; } ?> </span> </td> <?php # -- Summary -- ?> <td class="left" valign="top" width="100%"> <span class="small"> <?php echo $v_summary; ?> <br /> <?php # type project name if viewing 'all projects' if ( ON == config_get( 'show_bug_project_links' ) && helper_get_current_project() == ALL_PROJECTS ) { echo '['; print( $project_name ); echo '] '; } echo string_display( $v_category ); if ( $v_last_updated > strtotime( '-'.$t_filter['highlight_changed'].' hours' ) ) { echo ' - <b>' . $t_last_updated . '</b>'; } else { echo ' - ' . $t_last_updated; } ?> </span> </td> </tr> <?php # -- end of Repeating bug row -- ?> <?php } ?> <?php # -- ====================== end of BUG LIST ========================= -- ?> </table> <?php mark_time( 'end loop' ); ?> |