From 99ea79d3b558205d66843a5ec3e318376172d404 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Wed, 3 Dec 2003 01:18:50 +0000 Subject: [PATCH] Add zip_close() and some inline docs --- addressbook/inc/class.boXport.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.boXport.inc.php b/addressbook/inc/class.boXport.inc.php index 55a653230c..58f0c645a4 100644 --- a/addressbook/inc/class.boXport.inc.php +++ b/addressbook/inc/class.boXport.inc.php @@ -301,7 +301,7 @@ /* Open the (uploaded) zip file */ $zip = zip_open($filename); - $temp = tempnam('/tmp','zip2vcf'); + $temp = tempnam('/tmp','zip2contact'); /* Open a temp file for read/write */ $fp = fopen($temp, 'w+'); @@ -323,7 +323,12 @@ zip_entry_close($dirent); } } + /* Close the zip file resource handle */ + zip_close($zip); + + /* Set the file pointer of our new file to the beginning for use by the import routines */ rewind($fp); + return $fp; }