Skip to content

Commit

Permalink
Fix #12545: Relationship graph output should use cmapx instead of cmap
Browse files Browse the repository at this point in the history
The dot utility of Graphviz has -Tcmap and -Tcmapx output options that
correspond to HTML and XHTML output respectively. We should be using
"cmapx" to ensure that we're outputting a valid XHTML map element.

This commit also fixes incorrect permissions on graphviz_api.php
(removed execute bits).
  • Loading branch information
davidhicks committed Nov 20, 2010
1 parent 0fea46f commit 7161efe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Empty file modified core/graphviz_api.php 100755 → 100644
Empty file.
12 changes: 8 additions & 4 deletions core/relationship_graph_api.php
Expand Up @@ -463,12 +463,16 @@ function relgraph_output_image( $p_graph ) {
$p_graph->output( 'png', true );
}

# Outputs an image map in HTML form (too bad dot didn't output XHTML...)
# for the given relationship graph, previously generated by
# relgraph_generate_graph_for_bug().
/**
* Outputs an image map in XHTML format using the <map> element for the given
* relationship graph.
* @param Graph $p_graph Relationship graph object generated from relgraph_generate_graph_for_bug()
* @param string $p_name The XHTML name attribute to apply to the containing <map> element
* @return null
*/
function relgraph_output_map( $p_graph, $p_name ) {
echo '<map name="' . $p_name . '">' . "\n";
$p_graph->output( 'cmap' );
$p_graph->output( 'cmapx' );
echo '</map>' . "\n";
}

Expand Down

0 comments on commit 7161efe

Please sign in to comment.