Skip to content

Commit

Permalink
Remove legacy references to wingraphviz module that was removed sever…
Browse files Browse the repository at this point in the history
…al years ago
  • Loading branch information
mantis committed Oct 15, 2013
1 parent 8dd28f8 commit efbcc33
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
4 changes: 2 additions & 2 deletions bug_relationship_graph.php
Expand Up @@ -143,9 +143,9 @@
<td colspan="2">
<?php
if ( $t_graph_relation )
$t_graph = relgraph_generate_rel_graph( $f_bug_id, $t_bug );
$t_graph = relgraph_generate_rel_graph( $f_bug_id );
else
$t_graph = relgraph_generate_dep_graph( $f_bug_id, $t_bug, $t_graph_horizontal );
$t_graph = relgraph_generate_dep_graph( $f_bug_id, $t_graph_horizontal );

relgraph_output_map( $t_graph, 'relationship_graph_map' );
?>
Expand Down
4 changes: 2 additions & 2 deletions bug_relationship_graph_img.php
Expand Up @@ -65,8 +65,8 @@
$t_graph_horizontal = ( 'horizontal' == $f_orientation );

if ( $t_graph_relation )
$t_graph = relgraph_generate_rel_graph( $f_bug_id, $t_bug );
$t_graph = relgraph_generate_rel_graph( $f_bug_id );
else
$t_graph = relgraph_generate_dep_graph( $f_bug_id, $t_bug, $t_graph_horizontal );
$t_graph = relgraph_generate_dep_graph( $f_bug_id, $t_graph_horizontal );

relgraph_output_image( $t_graph );
5 changes: 1 addition & 4 deletions core/graphviz_api.php
Expand Up @@ -107,7 +107,6 @@ class Graph {
* Graphviz tool
*/
var $graphviz_tool;
var $graphviz_com_module;

/**
* Formats
Expand Down Expand Up @@ -215,18 +214,16 @@ class Graph {
* @param string $p_name
* @param array $p_attributes
* @param string $p_tool
* @param string $p_com_module
* @return null
*/
function Graph( $p_name = 'G', $p_attributes = array(), $p_tool = 'neato', $p_com_module = 'WinGraphviz.NEATO' ) {
function Graph( $p_name = 'G', $p_attributes = array(), $p_tool = 'neato' ) {
if( is_string( $p_name ) ) {
$this->name = $p_name;
}

$this->set_attributes( $p_attributes );

$this->graphviz_tool = $p_tool;
$this->graphviz_com_module = $p_com_module;
}

/**
Expand Down
23 changes: 10 additions & 13 deletions core/relationship_graph_api.php
Expand Up @@ -18,17 +18,12 @@
* Relationship Graph API
*
* This uses GraphViz utilities to generate relationship graphs for
* issues. Either GraphViz (for all OSs except Windows) or
* WinGraphviz (for Windows) must be installed in order to use this
* feature.
* issues. GraphViz must be installed in order to use this feature.
*
* Graphviz is available at:
* - http://www.graphviz.org/
* - http://www.research.att.com/sw/tools/graphviz/
*
* WinGraphviz is available at:
* - http://home.so-net.net.tw/oodtsen/wingraphviz/
*
* Most Linux distributions already have a GraphViz package
* conveniently available for download and install. Refer to
* config_defaults_inc.php for how to enable this feature once
Expand Down Expand Up @@ -81,8 +76,13 @@ function relgraph_bug_format_id( $p_bug_id ) {
return $t_pretty_bug_id;
}

# Generate a relationship graph for the given issue.
function relgraph_generate_rel_graph( $p_bug_id, $p_bug = null ) {
/**
* Generate a relationship graph for the given issue.
*
* @param int $p_bug_id bug id
* @return Graph
*/
function relgraph_generate_rel_graph( $p_bug_id ) {

# List of visited issues and their data.
$v_bug_list = array();
Expand Down Expand Up @@ -228,12 +228,11 @@ function relgraph_generate_rel_graph( $p_bug_id, $p_bug = null ) {
/**
* Generate a dependency relationship graph for the given issue.
* @param int $p_bug_id bug id
* @param MantisBug $p_bug Bug object
* @param bool $p_horizontal graph orientation - horizontal if true
* @todo duplicate bug/bugid
* @return Digraph
*/
function relgraph_generate_dep_graph( $p_bug_id, $p_bug = null, $p_horizontal = false ) {
function relgraph_generate_dep_graph( $p_bug_id, $p_horizontal = false ) {

# List of visited issues and their data.
$v_bug_list = array();
Expand All @@ -246,9 +245,7 @@ function relgraph_generate_dep_graph( $p_bug_id, $p_bug = null, $p_horizontal =
# so, if these issues happen to be visited also, relationship links
# will be preserved.
# The first issue in the list is the one we are parting from.
if( null === $p_bug ) {
$p_bug = bug_get( $p_bug_id, true );
}
$p_bug = bug_get( $p_bug_id, true );

$v_bug_list[$p_bug_id] = $p_bug;
$v_bug_list[$p_bug_id]->is_descendant = true;
Expand Down

0 comments on commit efbcc33

Please sign in to comment.