From efa7d00dbd1de5737928c6da08f0813588f61bd6 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 14 Apr 2022 07:52:01 -0500 Subject: [PATCH] Minor : Clean code with php-cs-fixer --- main/inc/ajax/document.ajax.php | 1 - main/inc/ajax/dropbox.ajax.php | 2 -- main/inc/ajax/exercise.ajax.php | 3 --- main/inc/ajax/work.ajax.php | 4 ---- 4 files changed, 10 deletions(-) diff --git a/main/inc/ajax/document.ajax.php b/main/inc/ajax/document.ajax.php index d8419686c0..312f0eb97a 100755 --- a/main/inc/ajax/document.ajax.php +++ b/main/inc/ajax/document.ajax.php @@ -148,7 +148,6 @@ switch ($action) { $resultList = []; foreach ($fileList as $file) { - if (isset($_REQUEST['chunkAction']) && 'done' === $_REQUEST['chunkAction']) { // to rename and move the finished file $chunkedFile = api_get_path(SYS_ARCHIVE_PATH).$file['name']; diff --git a/main/inc/ajax/dropbox.ajax.php b/main/inc/ajax/dropbox.ajax.php index 6a59deb6b3..c33c4afbcd 100644 --- a/main/inc/ajax/dropbox.ajax.php +++ b/main/inc/ajax/dropbox.ajax.php @@ -41,7 +41,6 @@ switch ($action) { 'errorStatus' => 0, ]); exit; - } else { // User access same as upload.php @@ -78,7 +77,6 @@ switch ($action) { $resultList = []; foreach ($fileList as $file) { - if (isset($_REQUEST['chunkAction']) && 'done' === $_REQUEST['chunkAction']) { // to rename and move the finished file $chunkedFile = api_get_path(SYS_ARCHIVE_PATH).$file['name']; diff --git a/main/inc/ajax/exercise.ajax.php b/main/inc/ajax/exercise.ajax.php index 17d3b01f35..f110b8cc9a 100755 --- a/main/inc/ajax/exercise.ajax.php +++ b/main/inc/ajax/exercise.ajax.php @@ -1134,9 +1134,7 @@ switch ($action) { 'errorStatus' => 0, ]); exit; - } else { - if (!empty($_FILES)) { $currentDirectory = Security::remove_XSS($_REQUEST['curdirpath']); $userId = api_get_user_id(); @@ -1203,7 +1201,6 @@ switch ($action) { echo json_encode(['files' => $resultList]); exit; } - } break; default: diff --git a/main/inc/ajax/work.ajax.php b/main/inc/ajax/work.ajax.php index 2f3e809d5a..85e81d192c 100755 --- a/main/inc/ajax/work.ajax.php +++ b/main/inc/ajax/work.ajax.php @@ -90,9 +90,7 @@ switch ($action) { 'errorStatus' => 0, ]); exit; - } else { - $workId = isset($_REQUEST['id']) ? $_REQUEST['id'] : ''; $workInfo = get_work_data_by_id($workId); $sessionId = api_get_session_id(); @@ -120,7 +118,6 @@ switch ($action) { $resultList = []; foreach ($fileList as $file) { - if (isset($_REQUEST['chunkAction']) && 'done' === $_REQUEST['chunkAction']) { // to rename and move the finished file $chunkedFile = api_get_path(SYS_ARCHIVE_PATH).$file['name']; @@ -176,7 +173,6 @@ switch ($action) { echo json_encode(['files' => $resultList]); exit; } - } break; case 'delete_work':