[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16378] alternative unzip
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16378] alternative unzip |
Date: |
Thu, 23 Feb 2017 07:10:40 -0500 (EST) |
Revision: 16378
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16378
Author: sigurdne
Date: 2017-02-23 07:10:39 -0500 (Thu, 23 Feb 2017)
Log Message:
-----------
alternative unzip
Modified Paths:
--------------
trunk/property/inc/import/class.import_component_files.inc.php
Modified: trunk/property/inc/import/class.import_component_files.inc.php
===================================================================
--- trunk/property/inc/import/class.import_component_files.inc.php
2017-02-22 14:20:13 UTC (rev 16377)
+++ trunk/property/inc/import/class.import_component_files.inc.php
2017-02-23 12:10:39 UTC (rev 16378)
@@ -311,9 +311,22 @@
$zip = new ZipArchive;
if ($zip->open($file) === TRUE)
{
+ $zip->extractTo($dir);
+ $zip->close();
+ return true;
+ }
+ else
+ {
+ $this->receipt['error'][] = array('msg' =>
lang('Failed opening file %1', $file));
+ return false;
+ }
+/*
+ $zip = new ZipArchive;
+ if ($zip->open($file) === TRUE)
+ {
for ($i = 0; $i < $zip->numFiles; $i++)
{
-// $file_name = str_replace('..', '.',
iconv("CP850", "UTF-8", $zip->getNameIndex($i)));
+ //
$file_name = str_replace('..', '.', iconv("CP850", "UTF-8",
$zip->getNameIndex($i)));
$file_name = str_replace('..', '.',
$zip->getNameIndex($i));
$copy_to = $dir . '/' . $file_name;
if (!is_dir(dirname($copy_to)))
@@ -331,6 +344,7 @@
$this->receipt['error'][] = array('msg' =>
lang('Failed opening file %1', $file));
return false;
}
+ */
}
private function _un_rar( $file, $dir )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16378] alternative unzip,
sigurdne <=