@@ -38,7 +38,7 @@ |
||
| 38 | 38 | "error" => '', |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | - }catch (Exception $e) { |
|
| 41 | + } catch (Exception $e) { |
|
| 42 | 42 | return false; |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -2603,7 +2603,9 @@ |
||
| 2603 | 2603 | } |
| 2604 | 2604 | |
| 2605 | 2605 | foreach ($results as $adUser) { |
| 2606 | - if (isset($adUser[$SETTINGS['ldap_user_attribute']][0]) === false) continue; |
|
| 2606 | + if (isset($adUser[$SETTINGS['ldap_user_attribute']][0]) === false) { |
|
| 2607 | + continue; |
|
| 2608 | + } |
|
| 2607 | 2609 | // Build the list of all groups in AD |
| 2608 | 2610 | if (isset($adUser['memberof']) === true) { |
| 2609 | 2611 | foreach($adUser['memberof'] as $j => $adUserGroup) { |
@@ -74,7 +74,9 @@ discard block |
||
| 74 | 74 | if ($args['step'] === 'create_users_files_key') { |
| 75 | 75 | // Loop on all files for this item |
| 76 | 76 | // and encrypt them for each user |
| 77 | - if (WIP === true) provideLog('[DEBUG] '.print_r($args['files_keys'], true), $SETTINGS); |
|
| 77 | + if (WIP === true) { |
|
| 78 | + provideLog('[DEBUG] '.print_r($args['files_keys'], true), $SETTINGS); |
|
| 79 | + } |
|
| 78 | 80 | foreach($args['files_keys'] as $file) { |
| 79 | 81 | storeUsersShareKey( |
| 80 | 82 | prefixTable('sharekeys_items'), |
@@ -91,7 +93,9 @@ discard block |
||
| 91 | 93 | } elseif ($args['step'] === 'create_users_fields_key') { |
| 92 | 94 | // Loop on all encrypted fields for this item |
| 93 | 95 | // and encrypt them for each user |
| 94 | - if (WIP === true) provideLog('[DEBUG] '.print_r($args, true), $SETTINGS); |
|
| 96 | + if (WIP === true) { |
|
| 97 | + provideLog('[DEBUG] '.print_r($args, true), $SETTINGS); |
|
| 98 | + } |
|
| 95 | 99 | foreach($args['fields_keys'] as $field) { |
| 96 | 100 | storeUsersShareKey( |
| 97 | 101 | prefixTable('sharekeys_fields'), |
@@ -149,7 +149,9 @@ |
||
| 149 | 149 | } |
| 150 | 150 | $filePath = realpath($filePath); |
| 151 | 151 | |
| 152 | - if (WIP === true) error_log('downloadFile.php: filePath: ' . $filePath." - "); |
|
| 152 | + if (WIP === true) { |
|
| 153 | + error_log('downloadFile.php: filePath: ' . $filePath." - "); |
|
| 154 | + } |
|
| 153 | 155 | |
| 154 | 156 | if ($filePath && is_readable($filePath) && strpos($filePath, realpath($SETTINGS['path_to_upload_folder'])) === 0) { |
| 155 | 157 | header('Content-Description: File Transfer'); |
@@ -86,7 +86,9 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | if (DB::count() > 0) { |
| 88 | 88 | // handle tasks inside this process |
| 89 | - if (WIP === true) error_log("Process in progress: ".$process_to_perform['increment_id']); |
|
| 89 | + if (WIP === true) { |
|
| 90 | + error_log("Process in progress: ".$process_to_perform['increment_id']); |
|
| 91 | + } |
|
| 90 | 92 | handleTask( |
| 91 | 93 | $process_to_perform['increment_id'], |
| 92 | 94 | json_decode($process_to_perform['arguments'], true), |
@@ -103,7 +105,9 @@ discard block |
||
| 103 | 105 | ); |
| 104 | 106 | |
| 105 | 107 | if (DB::count() > 0) { |
| 106 | - if (WIP === true) error_log("New process ta start: ".$process_to_perform['increment_id']); |
|
| 108 | + if (WIP === true) { |
|
| 109 | + error_log("New process ta start: ".$process_to_perform['increment_id']); |
|
| 110 | + } |
|
| 107 | 111 | // update DB - started_at |
| 108 | 112 | DB::update( |
| 109 | 113 | prefixTable('background_tasks'), |
@@ -306,7 +310,9 @@ discard block |
||
| 306 | 310 | if ($args['step'] === 'create_users_files_key') { |
| 307 | 311 | // Loop on all files for this item |
| 308 | 312 | // and encrypt them for each user |
| 309 | - if (WIP === true) provideLog('[DEBUG] '.print_r($args['files_keys'], true), $SETTINGS); |
|
| 313 | + if (WIP === true) { |
|
| 314 | + provideLog('[DEBUG] '.print_r($args['files_keys'], true), $SETTINGS); |
|
| 315 | + } |
|
| 310 | 316 | foreach($args['files_keys'] as $file) { |
| 311 | 317 | storeUsersShareKey( |
| 312 | 318 | prefixTable('sharekeys_items'), |
@@ -323,7 +329,9 @@ discard block |
||
| 323 | 329 | } elseif ($args['step'] === 'create_users_fields_key') { |
| 324 | 330 | // Loop on all encrypted fields for this item |
| 325 | 331 | // and encrypt them for each user |
| 326 | - if (WIP === true) provideLog('[DEBUG] '.print_r($args, true), $SETTINGS); |
|
| 332 | + if (WIP === true) { |
|
| 333 | + provideLog('[DEBUG] '.print_r($args, true), $SETTINGS); |
|
| 334 | + } |
|
| 327 | 335 | foreach($args['fields_keys'] as $field) { |
| 328 | 336 | storeUsersShareKey( |
| 329 | 337 | prefixTable('sharekeys_fields'), |
@@ -58,7 +58,9 @@ |
||
| 58 | 58 | $get['state'] = filter_var($_GET['state'], FILTER_SANITIZE_SPECIAL_CHARS); |
| 59 | 59 | $get['session_state'] = filter_var($_GET['session_state'], FILTER_SANITIZE_SPECIAL_CHARS); |
| 60 | 60 | |
| 61 | - if (WIP === true) error_log('---- OAUTH2 START ----'); |
|
| 61 | + if (WIP === true) { |
|
| 62 | + error_log('---- OAUTH2 START ----'); |
|
| 63 | + } |
|
| 62 | 64 | |
| 63 | 65 | // Création d'une instance du contrôleur |
| 64 | 66 | $OAuth2 = new OAuth2Controller($SETTINGS); |
@@ -401,12 +401,13 @@ |
||
| 401 | 401 | <select class="form-control" id="profile-user-timezone"> |
| 402 | 402 | <?php foreach ($zones as $key => $zone): ?> |
| 403 | 403 | <option value="<?php echo $key; ?>"<?php |
| 404 | - if ($session->has('user-timezone')) |
|
| 405 | - if($session->get('user-timezone') === $key) |
|
| 404 | + if ($session->has('user-timezone')) { |
|
| 405 | + if($session->get('user-timezone') === $key) |
|
| 406 | 406 | echo ' selected'; |
| 407 | - elseif ($session->get('user-timezone') === 'not_defined') |
|
| 408 | - if (isset($SETTINGS['timezone']) && $SETTINGS['timezone'] === $key) |
|
| 407 | + } elseif ($session->get('user-timezone') === 'not_defined') { |
|
| 408 | + if (isset($SETTINGS['timezone']) && $SETTINGS['timezone'] === $key) |
|
| 409 | 409 | echo ' selected'; |
| 410 | + } |
|
| 410 | 411 | ?>><?php echo $zone; ?></option> |
| 411 | 412 | <?php endforeach; ?> |
| 412 | 413 | </select> |
@@ -149,8 +149,7 @@ |
||
| 149 | 149 | </div> |
| 150 | 150 | <?php |
| 151 | 151 | } |
| 152 | -} |
|
| 153 | -catch (Exception $e) { |
|
| 152 | +} catch (Exception $e) { |
|
| 154 | 153 | if (defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) { |
| 155 | 154 | error_log('TEAMPASS Error - tasks page - '.$e->getMessage()); |
| 156 | 155 | } |
@@ -222,8 +222,7 @@ |
||
| 222 | 222 | </div> |
| 223 | 223 | <?php |
| 224 | 224 | } |
| 225 | -} |
|
| 226 | -catch (Exception $e) { |
|
| 225 | +} catch (Exception $e) { |
|
| 227 | 226 | if (defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) { |
| 228 | 227 | error_log('TEAMPASS Error - admin page - '.$e->getMessage()); |
| 229 | 228 | } |