Permalink
Browse files

Improved temporary file creation.

git-svn-id: http://svn.php.net/repository/pear/packages/Image_GraphViz/trunk@151902 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
sebastianbergmann committed Feb 20, 2004
1 parent 210b911 commit d64e31991373a99b17149fa8b5de25e7d2110d5f
Showing with 7 additions and 2 deletions.
  1. +3 −1 GraphViz.php
  2. +4 −1 package.xml
View
@@ -16,6 +16,8 @@
// $Id$
//
+require_once 'PEAR/System.php';
+
/**
* PEAR::Image_GraphViz
*
@@ -403,7 +405,7 @@ function saveParsedGraph($file = '') {
if (!empty($parsedGraph)) {
if (empty($file)) {
- $file = tempnam('/tmp', 'graph_');
+ $file = System::mktemp('Image_GraphViz');
}
if ($fp = @fopen($file, 'w')) {
View
@@ -20,11 +20,14 @@
<license>PHP License</license>
<release>
<version>1.0.2</version>
- <date>200X-XX-XX</date>
+ <date>2004-02-20</date>
<state>stable</state>
<notes>
<![CDATA[
* Fixed Content-Type header for SVG images.
+
+* Improved temporary file creation by using
+ System::mktemp() instead of tempnam().
]]>
</notes>
<filelist>

0 comments on commit d64e319

Please sign in to comment.