From f1ab2f022fdc780aca0944d90e9a0e844a0820d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:12:17 +0200 Subject: =?UTF-8?q?2024-02-19:=20popravljen=20(prej=C5=A1nji=20commit=20je?= =?UTF-8?q?=20napa=C4=8Den)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/survey/excel/PHPExcel/Shared/ZipArchive.php | 114 ---------------------- 1 file changed, 114 deletions(-) delete mode 100644 admin/survey/excel/PHPExcel/Shared/ZipArchive.php (limited to 'admin/survey/excel/PHPExcel/Shared/ZipArchive.php') diff --git a/admin/survey/excel/PHPExcel/Shared/ZipArchive.php b/admin/survey/excel/PHPExcel/Shared/ZipArchive.php deleted file mode 100644 index b9eae98..0000000 --- a/admin/survey/excel/PHPExcel/Shared/ZipArchive.php +++ /dev/null @@ -1,114 +0,0 @@ -_tempDir = PHPExcel_Shared_File::sys_get_temp_dir(); - - $this->_zip = new PclZip($fileName); - - return true; - } - - - /** - * Close this zip archive - * - */ - public function close() - { - } - - - /** - * Add a new file to the zip archive from a string of raw data. - * - * @param string $localname Directory/Name of the file to add to the zip archive - * @param string $contents String of data to add to the zip archive - */ - public function addFromString($localname, $contents) - { - $filenameParts = pathinfo($localname); - - $handle = fopen($this->_tempDir.'/'.$filenameParts["basename"], "wb"); - fwrite($handle, $contents); - fclose($handle); - - $res = $this->_zip->add($this->_tempDir.'/'.$filenameParts["basename"], - PCLZIP_OPT_REMOVE_PATH, $this->_tempDir, - PCLZIP_OPT_ADD_PATH, $filenameParts["dirname"] - ); - if ($res == 0) { - throw new Exception("Error zipping files : " . $this->_zip->errorInfo(true)); - } - - unlink($this->_tempDir.'/'.$filenameParts["basename"]); - } - -} -- cgit v1.2.3