@@ -1228,7 +1228,9 @@ discard block |
||
1228 | 1228 | ); |
1229 | 1229 | |
1230 | 1230 | // Create a task to create sharekeys for users |
1231 | - if (WIP=== true) error_log('createTaskForItem - new password for this item - '.$post_password ." -- ". $pw); |
|
1231 | + if (WIP=== true) { |
|
1232 | + error_log('createTaskForItem - new password for this item - '.$post_password ." -- ". $pw); |
|
1233 | + } |
|
1232 | 1234 | $tasksToBePerformed = ['item_password']; |
1233 | 1235 | $encryptionTaskIsRequested = true; |
1234 | 1236 | } else { |
@@ -1553,7 +1555,9 @@ discard block |
||
1553 | 1555 | |
1554 | 1556 | // create a task for all fields updated |
1555 | 1557 | if ($encryptionTaskIsRequested === true && (int) $dataItem['perso'] !== 1) { |
1556 | - if (WIP === true) error_log('createTaskForItem - '.print_r($tasksToBePerformed, true)); |
|
1558 | + if (WIP === true) { |
|
1559 | + error_log('createTaskForItem - '.print_r($tasksToBePerformed, true)); |
|
1560 | + } |
|
1557 | 1561 | createTaskForItem( |
1558 | 1562 | 'item_update_create_keys', |
1559 | 1563 | array_unique($tasksToBePerformed), |
@@ -2103,7 +2107,9 @@ discard block |
||
2103 | 2107 | $inputData['itemId'] |
2104 | 2108 | ); |
2105 | 2109 | foreach ($rows as $record) { |
2106 | - if ($record['raison'] === NULL) continue; |
|
2110 | + if ($record['raison'] === NULL) { |
|
2111 | + continue; |
|
2112 | + } |
|
2107 | 2113 | $reason = explode(':', $record['raison']); |
2108 | 2114 | if (count($reason) > 0) { |
2109 | 2115 | $sentence = date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['date']) . ' - ' |
@@ -4819,8 +4825,9 @@ discard block |
||
4819 | 4825 | $ids = $tree->getDescendants($folder['id'], true, false, true); |
4820 | 4826 | |
4821 | 4827 | // This folder is owned by user |
4822 | - if (in_array($inputData['folderId'], $ids)) |
|
4823 | - $accessLevel = 30; |
|
4828 | + if (in_array($inputData['folderId'], $ids)) { |
|
4829 | + $accessLevel = 30; |
|
4830 | + } |
|
4824 | 4831 | } |
4825 | 4832 | } |
4826 | 4833 |
@@ -55,13 +55,17 @@ discard block |
||
55 | 55 | ); |
56 | 56 | |
57 | 57 | if (empty($subtasks)) { |
58 | - if (LOG_TASKS=== true) $this->logger->log("No subtask was found for task {$this->taskId}"); |
|
58 | + if (LOG_TASKS=== true) { |
|
59 | + $this->logger->log("No subtask was found for task {$this->taskId}"); |
|
60 | + } |
|
59 | 61 | return; |
60 | 62 | } |
61 | 63 | |
62 | 64 | // Process each subtask |
63 | 65 | foreach ($subtasks as $subtask) { |
64 | - if (LOG_TASKS=== true) $this->logger->log("Processing subtask {$subtask['increment_id']} for task {$this->taskId}"); |
|
66 | + if (LOG_TASKS=== true) { |
|
67 | + $this->logger->log("Processing subtask {$subtask['increment_id']} for task {$this->taskId}"); |
|
68 | + } |
|
65 | 69 | $this->processGenerateUserKeysSubtask($subtask, $arguments); |
66 | 70 | } |
67 | 71 | |
@@ -98,7 +102,9 @@ discard block |
||
98 | 102 | $subtask['increment_id'] |
99 | 103 | ); |
100 | 104 | |
101 | - if (LOG_TASKS=== true) $this->logger->log("Subtask is in progress: ".$taskData['step'], 'INFO'); |
|
105 | + if (LOG_TASKS=== true) { |
|
106 | + $this->logger->log("Subtask is in progress: ".$taskData['step'], 'INFO'); |
|
107 | + } |
|
102 | 108 | switch ($taskData['step'] ?? '') { |
103 | 109 | case 'step0': |
104 | 110 | $this->generateNewUserStep0($arguments); |
@@ -752,7 +758,7 @@ discard block |
||
752 | 758 | 'login' => $userInfo['login'], |
753 | 759 | 'name' => $userInfo['name'], |
754 | 760 | ]; |
755 | - }else { |
|
761 | + } else { |
|
756 | 762 | // Normal case |
757 | 763 | return [ |
758 | 764 | 'private_key' => decryptPrivateKey($pwd, $userInfo['private_key']), |