From 79912f6ba6a80533768022dc61a76252c7b28a59 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 10 Jul 2009 03:21:48 +0000 Subject: [PATCH] MINOR Removed faulty detection of "digraph" binary from ModelViewer git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81584 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- dev/ModelViewer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/ModelViewer.php b/dev/ModelViewer.php index 7068109fb..8159bb9f2 100644 --- a/dev/ModelViewer.php +++ b/dev/ModelViewer.php @@ -26,10 +26,10 @@ class ModelViewer extends Controller { // check for graphviz dependencies $returnCode = 0; $output = array(); - exec("which digraph && which neato", $output, $returnCode); + exec("which neato", $output, $returnCode); if($returnCode != 0) { user_error( - 'You don\'t seem to have the GraphViz library (http://graphviz.org/) or the "digraph" and "neato" command-line utility available', + 'You don\'t seem to have the GraphViz library (http://graphviz.org/) and the "neato" command-line utility available', E_USER_ERROR ); } @@ -99,7 +99,7 @@ class ModelViewer_Module extends ModelViewer { SSViewer::set_source_file_comments(false); $dotContent = $this->renderWith("ModelViewer_dotsrc"); $CLI_dotContent = escapeshellarg($dotContent); - + $output= `echo $CLI_dotContent | neato -Tpng:gd &> /dev/stdout`; if(substr($output,1,3) == 'PNG') header("Content-type: image/png"); else header("Content-type: text/plain");