]> _ Git - cubeextranet.git/commitdiff
#1404
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 13 Jun 2017 15:20:15 +0000 (15:20 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 13 Jun 2017 15:20:15 +0000 (15:20 +0000)
inc/ws/Controlleur/class.ws.ajax.php

index b05f4f745b9891358ea92503015aabbb320e9de6..cf79efd8950fc4c7e21333a803326b841aa52fca 100644 (file)
@@ -210,6 +210,7 @@ class wsAjax extends cubeAjax {
 
                $datas = array();
 
+
                $dir = WS_COLLECTIONS . '/apns/' . $_POST['collection_id'];
                if (!file_exists($dir)) {
                        mkdir($dir, 0777, true);
@@ -230,16 +231,18 @@ class wsAjax extends cubeAjax {
 
                        if (!$_FILES[$t]['error']) {
                                $ext = CubeIT_Files::getExtension($_FILES[$t]['name']);
-                               move_uploaded_file($_FILES[$t]['tmp_name'], $wdir . '/' . $t . '.' . $ext);
+                               //move_uploaded_file($_FILES[$t]['tmp_name'], $wdir . '/' . $t . '.' . $ext);
                                $save['theme'][$t] = $t . '.' . $ext;
 
                                if ($t == 'filesalt') {
-                                       CubeIT_Files::rmdir($wdir . '/filesalt');
-                                       $unzip = CubeIT_Util_Zip::extract($wdir . '/' . $t . '.' . $ext, $wdir . '/filesalt');
+                                       $d = $wdir . '/filesalt';
+                                       CubeIT_Files::rmdir($d);
+                                       $unzip = CubeIT_Util_Zip::extract($wdir . '/' . $t . '.' . $ext, $d);
                                }
                        }
                }
 
+
                foreach ($_POST['group'] as $gid => $group) {
                        if ($gid && $gid == 'new_') {
                                continue;