Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.0

Request #8295 One path to binaries
Submitted: 2006-07-26 09:29 UTC
From: troelskn at gmail dot com Assigned: sebastian
Status: Closed Package: Image_GraphViz (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2006-07-26 09:29 UTC] troelskn at gmail dot com (Troels)
Description: ------------ It would be helpful to have the path to binaries in one variable, rather than having to manually set $dotCommand + $neatoCommand. The following diff puts this in one variable (binPath) : Compare: (<)C:\PEAR\Image_GraphViz-1.2.1\Image_GraphViz-1.2.1\GraphViz.php (16097 bytes) with: (>)C:\PEAR\Image_GraphViz-1.2.1\Image_GraphViz-1.2.1\GraphViz-new.php (16232 bytes) 105c105 < * Path to GraphViz/dot command --- > * Path to GraphViz binaries 109,112c109,111 < var $dotCommand = 'dot'; < < /** < * Path to GraphViz/neato command --- > var $binPath = ''; > /** > * Path to GraphViz/dot command 116a115,121 > var $dotCommand = 'dot'; > > /** > * Path to GraphViz/neato command > * > * @var string > */ 204,211c210,218 < $command = $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand; < $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($file); < < @`$command`; < @unlink($file); < < $fp = fopen($outputfile, 'rb'); < --- > $command = $this->binPath; > $command .= $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand; > $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($file); > > @`$command`; > @unlink($file); > > $fp = fopen($outputfile, 'rb'); > 217,220c224,227 < < return $data; < } < --- > > return $data; > } > 239,243c246,251 < $command = $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand; < $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($dotfile); < < @`$command`; < --- > $command = $this->binPath; > $command .= $this->graph['directed'] ? $this->dotCommand : $this->neatoCommand; > $command .= ' -T' . escapeshellarg($format) . ' -o' . escapeshellarg($outputfile) . ' ' . escapeshellarg($dotfile); > > @`$command`; > 521c529 < --- >

Comments

 [2007-11-18 02:21 UTC] jausions (Philippe Jausions)
Patch available below along with patched class file and some test files (although not .phpt yet) http://pear.11abacus.com/dev/Image/GraphViz/ (the patch file itself is too big to be attached here) Fixes Bug #4924, Req #6630, Req #8295, Bug #10753.
 [2007-11-19 07:13 UTC] sebastian (Sebastian Bergmann)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/Image_GraphViz