|
|
ef5584 |
|
|
|
ef5584 |
# Mantis - a php based bugtracking system
|
|
|
ef5584 |
|
|
|
ef5584 |
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
|
|
|
ef5584 |
# Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net
|
|
|
ef5584 |
|
|
|
ef5584 |
# Mantis is free software: you can redistribute it and/or modify
|
|
|
ef5584 |
# it under the terms of the GNU General Public License as published by
|
|
|
ef5584 |
# the Free Software Foundation, either version 2 of the License, or
|
|
|
ef5584 |
# (at your option) any later version.
|
|
|
ef5584 |
#
|
|
|
ef5584 |
# Mantis is distributed in the hope that it will be useful,
|
|
|
ef5584 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
ef5584 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
ef5584 |
# GNU General Public License for more details.
|
|
|
ef5584 |
#
|
|
|
ef5584 |
# You should have received a copy of the GNU General Public License
|
|
|
ef5584 |
# along with Mantis. If not, see <http://www.gnu.org/licenses/>.
|
|
|
ef5584 |
|
|
|
ef5584 |
# --------------------------------------------------------
|
|
|
ef5584 |
# $Id: bug_relationship_graph.php,v 1.6.2.1 2007-10-13 22:32:47 giallu Exp $
|
|
|
ef5584 |
# --------------------------------------------------------
|
|
|
ef5584 |
|
|
|
ef5584 |
require_once( 'core.php' );
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_core_path = config_get( 'core_path' );
|
|
|
ef5584 |
|
|
|
ef5584 |
require_once( $t_core_path.'bug_api.php' );
|
|
|
ef5584 |
require_once( $t_core_path.'compress_api.php' );
|
|
|
ef5584 |
require_once( $t_core_path.'current_user_api.php' );
|
|
|
ef5584 |
require_once( $t_core_path.'relationship_graph_api.php' );
|
|
|
ef5584 |
|
|
|
ef5584 |
# If relationship graphs were made disabled, we disallow any access to
|
|
|
ef5584 |
# this script.
|
|
|
ef5584 |
|
|
|
ef5584 |
auth_ensure_user_authenticated();
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( ON != config_get( 'relationship_graph_enable' ) )
|
|
|
ef5584 |
access_denied();
|
|
|
ef5584 |
|
|
|
ef5584 |
$f_bug_id = gpc_get_int( 'bug_id' );
|
|
|
ef5584 |
$f_type = gpc_get_string( 'graph', 'relation' );
|
|
|
ef5584 |
$f_orientation = gpc_get_string( 'orientation', config_get( 'relationship_graph_orientation' ) );
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( 'relation' == $f_type ) {
|
|
|
ef5584 |
$t_graph_type = 'relation';
|
|
|
ef5584 |
$t_graph_relation = true;
|
|
|
ef5584 |
} else {
|
|
|
ef5584 |
$t_graph_type = 'dependency';
|
|
|
ef5584 |
$t_graph_relation = false;
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( 'horizontal' == $f_orientation ) {
|
|
|
ef5584 |
$t_graph_orientation = 'horizontal';
|
|
|
ef5584 |
$t_graph_horizontal = true;
|
|
|
ef5584 |
} else {
|
|
|
ef5584 |
$t_graph_orientation = 'vertical';
|
|
|
ef5584 |
$t_graph_horizontal = false;
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
access_ensure_bug_level( VIEWER, $f_bug_id );
|
|
|
ef5584 |
|
|
|
ef5584 |
$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
|
|
|
ef5584 |
|
|
|
ef5584 |
if( $t_bug->project_id != helper_get_current_project() ) {
|
|
|
ef5584 |
# in case the current project is not the same project of the bug we are viewing...
|
|
|
ef5584 |
# ... override the current project. This to avoid problems with categories and handlers lists etc.
|
|
|
ef5584 |
$g_project_override = $t_bug->project_id;
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
compress_enable();
|
|
|
ef5584 |
|
|
|
ef5584 |
html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) );
|
|
|
ef5584 |
html_page_top2();
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( $t_graph_relation )
|
|
|
ef5584 |
echo lang_get( 'viewing_bug_relationship_graph_title' );
|
|
|
ef5584 |
else
|
|
|
ef5584 |
echo lang_get( 'viewing_bug_dependency_graph_title' );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( $t_graph_relation )
|
|
|
ef5584 |
print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=dependency', lang_get( 'dependency_graph' ) );
|
|
|
ef5584 |
else
|
|
|
ef5584 |
print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=relation', lang_get( 'relation_graph' ) );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( !$t_graph_relation ) {
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( $t_graph_horizontal )
|
|
|
ef5584 |
print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=dependency&orientation=vertical', lang_get( 'vertical' ) );
|
|
|
ef5584 |
else
|
|
|
ef5584 |
print_bracket_link( 'bug_relationship_graph.php?bug_id=' . $f_bug_id . '&graph=dependency&orientation=horizontal', lang_get( 'horizontal' ) );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
}
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
if ( $t_graph_relation )
|
|
|
ef5584 |
$t_graph = relgraph_generate_rel_graph( $f_bug_id, $t_bug );
|
|
|
ef5584 |
else
|
|
|
ef5584 |
$t_graph = relgraph_generate_dep_graph( $f_bug_id, $t_bug, $t_graph_horizontal );
|
|
|
ef5584 |
|
|
|
ef5584 |
relgraph_output_map( $t_graph, 'relationship_graph_map' );
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
border="0" usemap="#relationship_graph_map" />
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
include( 'bug_view_inc.php' );
|
|
|
ef5584 |
html_page_bottom1( __FILE__ );
|
|
|
ef5584 |
?>
|