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 --- .../excel/PHPExcel/Shared/ZipStreamWrapper.php | 183 --------------------- 1 file changed, 183 deletions(-) delete mode 100644 admin/survey/excel/PHPExcel/Shared/ZipStreamWrapper.php (limited to 'admin/survey/excel/PHPExcel/Shared/ZipStreamWrapper.php') diff --git a/admin/survey/excel/PHPExcel/Shared/ZipStreamWrapper.php b/admin/survey/excel/PHPExcel/Shared/ZipStreamWrapper.php deleted file mode 100644 index 8c55884..0000000 --- a/admin/survey/excel/PHPExcel/Shared/ZipStreamWrapper.php +++ /dev/null @@ -1,183 +0,0 @@ -_archive = new ZipArchive(); - $this->_archive->open($url['host']); - - $this->_fileNameInArchive = $url['fragment']; - $this->_position = 0; - $this->_data = $this->_archive->getFromName( $this->_fileNameInArchive ); - - return true; - } - - /** - * Implements support for fstat(). - * - * @return boolean - */ - public function stream_stat() { - return $this->_archive->statName( $this->_fileNameInArchive ); - } - - /** - * Implements support for fread(), fgets() etc. - * - * @param int $count maximum number of bytes to read - * @return string - */ - function stream_read($count) { - $ret = substr($this->_data, $this->_position, $count); - $this->_position += strlen($ret); - return $ret; - } - - /** - * Returns the position of the file pointer, i.e. its offset into the file - * stream. Implements support for ftell(). - * - * @return int - */ - public function stream_tell() { - return $this->_position; - } - - /** - * EOF stream - * - * @return bool - */ - public function stream_eof() { - return $this->_position >= strlen($this->_data); - } - - /** - * Seek stream - * - * @param int $offset byte offset - * @param int $whence SEEK_SET, SEEK_CUR or SEEK_END - * @return bool - */ - public function stream_seek($offset, $whence) { - switch ($whence) { - case SEEK_SET: - if ($offset < strlen($this->_data) && $offset >= 0) { - $this->_position = $offset; - return true; - } else { - return false; - } - break; - - case SEEK_CUR: - if ($offset >= 0) { - $this->_position += $offset; - return true; - } else { - return false; - } - break; - - case SEEK_END: - if (strlen($this->_data) + $offset >= 0) { - $this->_position = strlen($this->_data) + $offset; - return true; - } else { - return false; - } - break; - - default: - return false; - } - } -} -- cgit v1.2.3