]> _ Git - cubist_util.git/commitdiff
wip #2602 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 20 Feb 2019 17:03:20 +0000 (18:03 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 20 Feb 2019 17:03:20 +0000 (18:03 +0100)
composer.json
src/Cubist/Util/Zip.php

index d35f5f90a85ab72a5b7a90ad9da7fb8671571191..d5210fc529cf48041e31328011a53eabc2b5f6e0 100644 (file)
@@ -22,6 +22,6 @@
     "ext-simplexml": "",
     "ext-igbinary": "",
     "ext-json": "",
-    "ext-iconv": "",
+    "ext-iconv": ""
   }
 }
\ No newline at end of file
index 812f346afc9993f26cad7b116d7cf561c9115758..3a9e03b21e3239fd2d9196954f1cf371b1de900a 100644 (file)
@@ -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();