From: Vincent Vanwaelscappel Date: Wed, 20 Feb 2019 17:03:20 +0000 (+0100) Subject: wip #2602 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a635f6c902c26d2109b28167af118141e7a94203;p=cubist_util.git wip #2602 @0:10 --- diff --git a/composer.json b/composer.json index d35f5f9..d5210fc 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,6 @@ "ext-simplexml": "", "ext-igbinary": "", "ext-json": "", - "ext-iconv": "", + "ext-iconv": "" } } \ No newline at end of file diff --git a/src/Cubist/Util/Zip.php b/src/Cubist/Util/Zip.php index 812f346..3a9e03b 100644 --- a/src/Cubist/Util/Zip.php +++ b/src/Cubist/Util/Zip.php @@ -7,19 +7,17 @@ class Zip public static function extract($zip, $dir) { - $bin = array(); - if (!file_exists($dir)) { mkdir($dir, 0777, true); } - if (isset($bin['unzip'])) { - $cl = new CubeIT_CommandLine($bin['unzip']); + if (true) { + $cl = new CubeIT_CommandLine('unzip'); $cl->cd($dir); $cl->setArg('o'); $cl->setArg(null, $zip); $cl->execute(); } else if (class_exists('ZipArchive')) { - $za = new ZipArchive(); + $za = new \ZipArchive(); $za->open($zip); $za->extractTo($dir); $za->close();