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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-11-19 07:13 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!