@@ -73,8 +73,8 @@ |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (!$this->isParentFolderAllowed($parent_id, $user_accessible_folders, $user_is_admin)) { |
| 76 | - if ($parent_id != 0 && $user_can_create_root_folder == false ) |
|
| 77 | - return $this->errorResponse($this->lang->get('error_folder_not_allowed_for_this_user')); |
|
| 76 | + if ($parent_id != 0 && $user_can_create_root_folder == false ) |
|
| 77 | + return $this->errorResponse($this->lang->get('error_folder_not_allowed_for_this_user')); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | if (!$this->checkDuplicateFolderAllowed($title) && $personal_folder == 0) { |
@@ -73,8 +73,9 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (!$this->isParentFolderAllowed($parent_id, $user_accessible_folders, $user_is_admin)) { |
| 76 | - if ($parent_id != 0 && $user_can_create_root_folder == false ) |
|
| 77 | - return $this->errorResponse($this->lang->get('error_folder_not_allowed_for_this_user')); |
|
| 76 | + if ($parent_id != 0 && $user_can_create_root_folder == false ) { |
|
| 77 | + return $this->errorResponse($this->lang->get('error_folder_not_allowed_for_this_user')); |
|
| 78 | + } |
|
| 78 | 79 | } |
| 79 | 80 | |
| 80 | 81 | if (!$this->checkDuplicateFolderAllowed($title) && $personal_folder == 0) { |
@@ -435,8 +436,9 @@ discard block |
||
| 435 | 436 | )['count']; |
| 436 | 437 | |
| 437 | 438 | // Don't insert duplicates |
| 438 | - if ($count > 0) |
|
| 439 | - continue; |
|
| 439 | + if ($count > 0) { |
|
| 440 | + continue; |
|
| 441 | + } |
|
| 440 | 442 | |
| 441 | 443 | // Insert new background task |
| 442 | 444 | DB::insert( |
@@ -342,8 +342,8 @@ |
||
| 342 | 342 | ); |
| 343 | 343 | |
| 344 | 344 | if (DB::count() > 0 && ( |
| 345 | - (isset($SETTINGS['duplicate_item']) && (int) $SETTINGS['duplicate_item'] === 0) |
|
| 346 | - && (int) $itemInfos['personal_folder'] === 0) |
|
| 345 | + (isset($SETTINGS['duplicate_item']) && (int) $SETTINGS['duplicate_item'] === 0) |
|
| 346 | + && (int) $itemInfos['personal_folder'] === 0) |
|
| 347 | 347 | ) { |
| 348 | 348 | throw new Exception('Similar item already exists. Duplicates are not allowed.'); |
| 349 | 349 | } |