mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
b459d489a3
commit
79912f6ba6
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user