@@ 66-69 (lines=4) @@ | ||
63 | $_course = api_get_course_info(); |
|
64 | $_user = api_get_user_info(); |
|
65 | //Check if the file is valid (not to big and exists) |
|
66 | if (!isset ($_FILES['userFile']) || !is_uploaded_file($_FILES['userFile']['tmp_name'])) { |
|
67 | // upload failed |
|
68 | return false; |
|
69 | } |
|
70 | if (preg_match('/.zip$/i', $_FILES['userFile']['name']) && handle_uploaded_document($_course, $_FILES['userFile'], $baseWorkDir, $uploadPath, $_user['user_id'], 0, null, 1, 'overwrite', false)) { |
|
71 | if (!function_exists('gzopen')) { |
|
72 | return false; |
@@ 25-28 (lines=4) @@ | ||
22 | $_user = api_get_user_info(); |
|
23 | ||
24 | //Check if the file is valid (not to big and exists) |
|
25 | if (!isset($_FILES['userFile']) || !is_uploaded_file($_FILES['userFile']['tmp_name'])) { |
|
26 | // upload failed |
|
27 | return false; |
|
28 | } |
|
29 | ||
30 | if (preg_match('/.zip$/i', $_FILES['userFile']['name']) && |
|
31 | handle_uploaded_document( |