Passed
Push — master ( 668057...23b17c )
by Nils
06:25 queued 14s
created
pages/import.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     || isset($SETTINGS['allow_import']) === false || (int) $SETTINGS['allow_import'] !== 1) {
72 72
     // Not allowed page
73 73
     $session->set('system-error_code', ERR_NOT_ALLOWED);
74
-    include $SETTINGS['cpassman_dir'] . '/error.php';
74
+    include $SETTINGS['cpassman_dir'].'/error.php';
75 75
     exit;
76 76
 }
77 77
 
Please login to merge, or discard this patch.
pages/items.js.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('items') === false) {
73 73
     // Not allowed page
74 74
     $session->set('system-error_code', ERR_NOT_ALLOWED);
75
-    include $SETTINGS['cpassman_dir'] . '/error.php';
75
+    include $SETTINGS['cpassman_dir'].'/error.php';
76 76
     exit;
77 77
 }
78 78
 
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
             //
1031 1031
         } else if ($(this).data('item-action') === 'link') {
1032 1032
             // Add link to clipboard.
1033
-            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url'];?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1033
+            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url']; ?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1034 1034
 
1035 1035
             // Display message.
1036 1036
             toastr.remove();
@@ -2649,7 +2649,7 @@  discard block
 block discarded – undo
2649 2649
                 progress: "#form-item-password-strength",
2650 2650
                 score: "#form-item-password-strength"
2651 2651
             },
2652
-            scores: [<?php echo TP_PW_STRENGTH_1;?>, <?php echo TP_PW_STRENGTH_2;?>, <?php echo TP_PW_STRENGTH_3;?>, <?php echo TP_PW_STRENGTH_4;?>, <?php echo TP_PW_STRENGTH_5;?>],
2652
+            scores: [<?php echo TP_PW_STRENGTH_1; ?>, <?php echo TP_PW_STRENGTH_2; ?>, <?php echo TP_PW_STRENGTH_3; ?>, <?php echo TP_PW_STRENGTH_4; ?>, <?php echo TP_PW_STRENGTH_5; ?>],
2653 2653
         },
2654 2654
         i18n : {
2655 2655
             t: function (key) {
@@ -2676,7 +2676,7 @@  discard block
 block discarded – undo
2676 2676
     <?php
2677 2677
     $max_file_size = '';
2678 2678
     if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) {
2679
-        $max_file_size = $SETTINGS['upload_maxfilesize'] . 'mb';
2679
+        $max_file_size = $SETTINGS['upload_maxfilesize'].'mb';
2680 2680
     } else {
2681 2681
         $max_file_size = $SETTINGS['upload_maxfilesize'];
2682 2682
     }
@@ -4723,7 +4723,7 @@  discard block
 block discarded – undo
4723 4723
 
4724 4724
                             // Show passwords inputs and form
4725 4725
                             $('#dialog-ldap-user-change-password-info')
4726
-                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4726
+                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4727 4727
                                 .removeClass('hidden');
4728 4728
                             $('#dialog-ldap-user-change-password').removeClass('hidden');
4729 4729
                         } else if (data.error_type !== 'undefined') {
@@ -4742,7 +4742,7 @@  discard block
 block discarded – undo
4742 4742
 
4743 4743
                                 // Show passwords inputs and form
4744 4744
                                 $('#dialog-ldap-user-change-password-info')
4745
-                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4745
+                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4746 4746
                                     .removeClass('hidden');
4747 4747
                                 $('#dialog-ldap-user-change-password').removeClass('hidden');
4748 4748
                             });
Please login to merge, or discard this patch.
scripts/task_maintenance_users_personal_folder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     //get through all users with enabled personnal folder.
80 80
     $users = DB::query(
81 81
         'SELECT id, login, email
82
-        FROM ' . prefixTable('users') . '
82
+        FROM ' . prefixTable('users').'
83 83
         WHERE id NOT IN ('.OTV_USER_ID.', '.TP_USER_ID.', '.SSH_USER_ID.', '.API_USER_ID.')
84 84
         AND personal_folder = 1
85 85
         ORDER BY login ASC'
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         //if folder doesn't exist then create it
89 89
         $data = DB::queryfirstrow(
90 90
             'SELECT id
91
-            FROM ' . prefixTable('nested_tree') . '
91
+            FROM ' . prefixTable('nested_tree').'
92 92
             WHERE title = %s AND parent_id = %i',
93 93
             $user['id'],
94 94
             0
Please login to merge, or discard this patch.
pages/items.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('items') === false) {
70 70
     // Not allowed page
71 71
     $session->set('system-error_code', ERR_NOT_ALLOWED);
72
-    include $SETTINGS['cpassman_dir'] . '/error.php';
72
+    include $SETTINGS['cpassman_dir'].'/error.php';
73 73
     exit;
74 74
 }
75 75
 // Define Timezone
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 // Get list of users
92 92
 $usersList = [];
93
-$rows = DB::query('SELECT id,login,email FROM ' . prefixTable('users') . ' ORDER BY login ASC');
93
+$rows = DB::query('SELECT id,login,email FROM '.prefixTable('users').' ORDER BY login ASC');
94 94
 foreach ($rows as $record) {
95 95
     $usersList[$record['login']] = [
96 96
         'id' => $record['id'],
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 // Get list of roles
102 102
 $arrRoles = [];
103 103
 $listRoles = '';
104
-$rows = DB::query('SELECT id,title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC');
104
+$rows = DB::query('SELECT id,title FROM '.prefixTable('roles_title').' ORDER BY title ASC');
105 105
 foreach ($rows as $reccord) {
106 106
     $arrRoles[$reccord['title']] = [
107 107
         'id' => $reccord['id'],
108 108
         'title' => $reccord['title'],
109 109
     ];
110 110
     if (empty($listRoles)) {
111
-        $listRoles = $reccord['id'] . '#' . $reccord['title'];
111
+        $listRoles = $reccord['id'].'#'.$reccord['title'];
112 112
     } else {
113
-        $listRoles .= ';' . $reccord['id'] . '#' . $reccord['title'];
113
+        $listRoles .= ';'.$reccord['id'].'#'.$reccord['title'];
114 114
     }
115 115
 }
116 116
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                         <li class="nav-item"><a class="nav-link" href="#tab_3" data-toggle="tab"><i class="fa-solid fa-archive mr-2"></i><?php echo $lang->get('attachments'); ?></a></li>
186 186
                         <?php
187 187
                         echo isset($SETTINGS['item_extra_fields']) === true && (int) $SETTINGS['item_extra_fields'] === 1 ? '
188
-                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields') . '</a></li>' : '';
188
+                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields').'</a></li>' : '';
189 189
                         ?>
190 190
                     </ul>
191 191
                 </div><!-- /.card-header -->
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                                                 <?php
255 255
                                                 for ($i = 4; $i <= $SETTINGS['pwd_maximum_length']; ++$i) {
256 256
                                                     echo '
257
-                                                <option>' . $i . '</option>';
257
+                                                <option>' . $i.'</option>';
258 258
                                                 }
259 259
                                                 ?>
260 260
                                             </select>
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                                     <span class="ml-2 col-md-1 clear-me-html" id="form-item-icon-show"></span>
285 285
                                 </div>
286 286
                                 <small class='form-text text-muted'>
287
-                                    <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
287
+                                    <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
288 288
                                 </small>
289 289
                             </div>
290 290
 
@@ -473,39 +473,39 @@  discard block
 block discarded – undo
473 473
                             <div class="tab-pane" id="tab_4">
474 474
                                 <div id="form-item-field" class="hidden">
475 475
                                     <?php
476
-                                        $session_item_fields = $session->get('system-item_fields');//print_r($session_item_fields);
476
+                                        $session_item_fields = $session->get('system-item_fields'); //print_r($session_item_fields);
477 477
                                         if (isset($session_item_fields) === true) {
478 478
                                             foreach ($session_item_fields as $category) {
479 479
                                                 //print_r($category);
480 480
                                                 echo '
481
-                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'] . '">
482
-                                                <h5>' . $category['title'] . '</h5>
481
+                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'].'">
482
+                                                <h5>' . $category['title'].'</h5>
483 483
                                                 <p>';
484 484
                                                 foreach ($category['fields'] as $field) {
485 485
                                                     if ($field['type'] === 'textarea') {
486 486
                                                         echo '
487
-                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
487
+                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
488 488
                                                         <label>' . $field['title'],
489 489
                                                             $field['is_mandatory'] === '1' ?
490
-                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '',
490
+                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '',
491 491
                                                             '</label>
492
-                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0"></textarea>
492
+                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0"></textarea>
493 493
                                                     </div>';
494 494
                                                     } else {
495 495
                                                         echo '
496
-                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
496
+                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
497 497
                                                         <div class="input-group-prepend">
498 498
                                                             <span class="input-group-text">' . $field['title'],
499 499
                                                             $field['is_mandatory'] === '1' ?
500
-                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '',
500
+                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '',
501 501
                                                             '</span>
502 502
                                                         </div>
503
-                                                        <input type="' . $field['type'] . '" class="form-control form-item-control form-item-field-custom" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0">
503
+                                                        <input type="' . $field['type'].'" class="form-control form-item-control form-item-field-custom" data-field-name="'.$field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0">
504 504
                                                     </div>';
505 505
                                                     }
506 506
                                                     if (!empty($field['regex'])) {
507 507
                                                         echo '
508
-                                                    <div>Regex: '. $field['regex'] .'</div>
508
+                                                    <div>Regex: '. $field['regex'].'</div>
509 509
                                                         ';
510 510
                                                     }
511 511
                                                 }
@@ -516,8 +516,8 @@  discard block
 block discarded – undo
516 516
                                                 ) {
517 517
                                                     echo '
518 518
                                                     <div class="form-check icheck-blue">
519
-                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'] . '" data-change-ongoing="0" data-field-name="template" id="template_' . $category['id'] . '">
520
-                                                        <label class="form-check-label ml-3" for="template_' . $category['id'] . '">' . $lang->get('main_template') . '</label>
519
+                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'].'" data-change-ongoing="0" data-field-name="template" id="template_'.$category['id'].'">
520
+                                                        <label class="form-check-label ml-3" for="template_' . $category['id'].'">'.$lang->get('main_template').'</label>
521 521
                                                     </div>';
522 522
                                                 }
523 523
                                                 echo '
@@ -527,8 +527,8 @@  discard block
 block discarded – undo
527 527
                                         } else {
528 528
                                             echo
529 529
                                             '<div class="alert alert-info">
530
-                                                <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information') . '</h5>
531
-                                                ' . $lang->get('no_fields') . '
530
+                                                <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information').'</h5>
531
+                                                ' . $lang->get('no_fields').'
532 532
                                             </div>';
533 533
                                         } ?>
534 534
                                 </div>
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
                         <p><?php
670 670
                             echo str_replace(
671 671
         ['##otv_expiration_period##', '. '],
672
-        ['<span class="text-bold text-primary">' . $SETTINGS['otv_expiration_period'] . '</span>', '<br>'],
672
+        ['<span class="text-bold text-primary">'.$SETTINGS['otv_expiration_period'].'</span>', '<br>'],
673 673
         $lang->get('otv_message')
674 674
     );
675 675
                             ?></p>
@@ -687,9 +687,9 @@  discard block
 block discarded – undo
687 687
 
688 688
                     <div class="row">
689 689
                         <div class="form-group col-4">
690
-                            <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period'];?>)</label>
690
+                            <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period']; ?>)</label>
691 691
                             <div class="input-group mb-3">
692
-                                <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period'];?>" value="<?php echo $SETTINGS['otv_expiration_period'];?>">
692
+                                <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period']; ?>" value="<?php echo $SETTINGS['otv_expiration_period']; ?>">
693 693
                             </div>
694 694
                         </div>
695 695
 
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
                             <select class="form-control form-folder-control select2" style="width:100%;" id="form-folder-add-complexicity" required>
778 778
                                 <?php
779 779
                                 foreach (TP_PW_COMPLEXITY as $key => $value) {
780
-                                    echo '<option value="' . $key . '">' . $value[1] . '</option>';
780
+                                    echo '<option value="'.$key.'">'.$value[1].'</option>';
781 781
                                 }
782 782
                                 ?>
783 783
                             </select>
@@ -795,14 +795,14 @@  discard block
 block discarded – undo
795 795
                             <label><?php echo $lang->get('icon'); ?></label>
796 796
                             <input type="text" class="form-control form-folder-control" id="form-folder-add-icon">
797 797
                             <small class='form-text text-muted'>
798
-                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
798
+                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
799 799
                             </small>
800 800
                         </div>
801 801
                         <div class="form-group">
802 802
                             <label><?php echo $lang->get('icon_on_selection'); ?></label>
803 803
                             <input type="text" class="form-control form-folder-control" id="form-folder-add-icon-selected">
804 804
                             <small class='form-text text-muted'>
805
-                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
805
+                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
806 806
                             </small>
807 807
                         </div>
808 808
                     </div>
@@ -1213,18 +1213,18 @@  discard block
 block discarded – undo
1213 1213
                                 <?php
1214 1214
                                     foreach ($session_item_fields as $elem) {
1215 1215
                                         echo '
1216
-                                <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'] . '">
1217
-                                    <h5>' . $elem['title'] . '</h5>
1216
+                                <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'].'">
1217
+                                    <h5>' . $elem['title'].'</h5>
1218 1218
                                     <p>
1219 1219
                                         <ul class="list-group list-group-unbordered mb-3">';
1220 1220
                                         foreach ($elem['fields'] as $field) {
1221 1221
                                             echo '
1222
-                                            <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'] . '">
1223
-                                                <span id="card-item-field-title-' . $field['id'] . '"><b>' . $field['title'] . '</b></span>
1224
-                                                <button type="button" class="float-right btn btn-secondary btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'] . '">
1222
+                                            <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'].'">
1223
+                                                <span id="card-item-field-title-' . $field['id'].'"><b>'.$field['title'].'</b></span>
1224
+                                                <button type="button" class="float-right btn btn-secondary btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'].'">
1225 1225
                                                     <i class="fa-solid fa-copy"></i>
1226 1226
                                                 </button>
1227
-                                                <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'] . '"></span>
1227
+                                                <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'].'"></span>
1228 1228
                                             </li>';
1229 1229
                                         }
1230 1230
                                         echo '
Please login to merge, or discard this patch.
pages/admin.js.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('admin') === false) {
69 69
     // Not allowed page
70 70
     $session->set('system-error_code', ERR_NOT_ALLOWED);
71
-    include $SETTINGS['cpassman_dir'] . '/error.php';
71
+    include $SETTINGS['cpassman_dir'].'/error.php';
72 72
     exit;
73 73
 }
74 74
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                     // error
150 150
                     toastr.remove();
151 151
                     toastr.error(
152
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
152
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
153 153
                         '', {
154 154
                             closeButton: true,
155 155
                             positionClass: 'toast-bottom-right'
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                     // error
224 224
                     toastr.remove();
225 225
                     toastr.error(
226
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
226
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
227 227
                         '', {
228 228
                             closeButton: true,
229 229
                             positionClass: 'toast-bottom-right'
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                     // error
272 272
                     toastr.remove();
273 273
                     toastr.error(
274
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
274
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
275 275
                         '', {
276 276
                             closeButton: true,
277 277
                             positionClass: 'toast-bottom-right'
Please login to merge, or discard this patch.
pages/tasks.js.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('tasks') === false) {
74 74
     // Not allowed page
75 75
     $session->set('system-error_code', ERR_NOT_ALLOWED);
76
-    include $SETTINGS['cpassman_dir'] . '/error.php';
76
+    include $SETTINGS['cpassman_dir'].'/error.php';
77 77
     exit;
78 78
 }
79 79
 ?>
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                         // error
371 371
                         toastr.remove();
372 372
                         toastr.error(
373
-                            '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
373
+                            '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
374 374
                             '', {
375 375
                                 closeButton: true,
376 376
                                 positionClass: 'toast-bottom-right'
@@ -393,11 +393,11 @@  discard block
 block discarded – undo
393 393
                         $('#'+field+'_parameter_value').val(frequency === null ? '' : frequency + ';' +value,);
394 394
                         param = value.split(';');
395 395
                         if (param.length === 1) {
396
-                            txt = ' <?php echo $lang->get('at');?> ' + param[0];
396
+                            txt = ' <?php echo $lang->get('at'); ?> ' + param[0];
397 397
                         } else {
398
-                            txt = ' <?php echo $lang->get('day');?> ' + param[1] + ' <?php echo $lang->get('at');?> ' + param[0];
398
+                            txt = ' <?php echo $lang->get('day'); ?> ' + param[1] + ' <?php echo $lang->get('at'); ?> ' + param[0];
399 399
                         }
400
-                        $('#'+field+'_parameter').val(frequency === null ? '<?php echo $lang->get('not_defined');?>' : (data.message + txt));
400
+                        $('#'+field+'_parameter').val(frequency === null ? '<?php echo $lang->get('not_defined'); ?>' : (data.message + txt));
401 401
                         $("#task-define-modal").modal('hide');
402 402
                         $('#task-define-modal-type, #task-define-modal-parameter-hourly-value, #task-define-modal-parameter-daily-value, #task-define-modal-frequency').val('');
403 403
                     }
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
                         // error
504 504
                         toastr.remove();
505 505
                         toastr.error(
506
-                            '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
506
+                            '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
507 507
                             '', {
508 508
                                 closeButton: true,
509 509
                                 positionClass: 'toast-bottom-right'
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
                     // error
565 565
                     toastr.remove();
566 566
                     toastr.error(
567
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
567
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
568 568
                         '', {
569 569
                             closeButton: true,
570 570
                             positionClass: 'toast-bottom-right'
Please login to merge, or discard this patch.
pages/oauth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('oauth') === false) {
72 72
     // Not allowed page
73 73
     $session->set('system-error_code', ERR_NOT_ALLOWED);
74
-    include $SETTINGS['cpassman_dir'] . '/error.php';
74
+    include $SETTINGS['cpassman_dir'].'/error.php';
75 75
     exit;
76 76
 }
77 77
 
Please login to merge, or discard this patch.
scripts/background_tasks___sending_emails.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 $emailService = new EmailService();
71 71
 $rows = DB::query(
72 72
     'SELECT *
73
-    FROM ' . prefixTable('background_tasks') . '
73
+    FROM ' . prefixTable('background_tasks').'
74 74
     WHERE is_in_progress = %i AND process_type = %s
75 75
     ORDER BY increment_id ASC LIMIT 0,10',
76 76
     0,
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     
139 139
     //if ((int) $SETTINGS['enable_backlog_mail'] === 1) {
140 140
         $row = DB::queryFirstRow(
141
-            'SELECT valeur FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s',
141
+            'SELECT valeur FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s',
142 142
             'cron',
143 143
             'sending_emails'
144 144
         );
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         if ((int) (time() - $row['valeur']) >= 300 || (int) $row['valeur'] === 0) {
147 147
             $rows = DB::query(
148 148
                 'SELECT *
149
-                FROM ' . prefixTable('emails') .
149
+                FROM ' . prefixTable('emails').
150 150
                 ' WHERE status != %s',
151 151
                 'sent'
152 152
             );
Please login to merge, or discard this patch.
includes/core/login.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +40 added lines, -41 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $postType = $request->query->get('post_type', '');
48 48
 $postType = filter_var($postType, FILTER_SANITIZE_SPECIAL_CHARS);
49 49
 $get['post_type'] = $postType;
50
-if (isset($SETTINGS['duo']) === true && (int) $SETTINGS['duo'] === 1 && $get['post_type'] === 'duo' ) {
50
+if (isset($SETTINGS['duo']) === true && (int) $SETTINGS['duo'] === 1 && $get['post_type'] === 'duo') {
51 51
     $get['duo_state'] = $request->query->get('state');
52 52
     $get['duo_code'] = $request->query->get('duo_code');
53 53
 }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         exit;
78 78
     } else {
79 79
         // Gérer les erreurs
80
-        echo 'Erreur lors de la récupération des informations utilisateur : ' . htmlspecialchars($userInfo['message'], ENT_QUOTES, 'UTF-8');
80
+        echo 'Erreur lors de la récupération des informations utilisateur : '.htmlspecialchars($userInfo['message'], ENT_QUOTES, 'UTF-8');
81 81
     };
82 82
 }
83 83
 
@@ -100,8 +100,7 @@  discard block
 block discarded – undo
100 100
 <div class="login-box">
101 101
     <div class="login-logo"><div style="margin:30px;">',
102 102
     isset($SETTINGS['custom_logo']) === true && empty($SETTINGS['custom_logo']) === false ?
103
-        '<img src="' . (string) $SETTINGS['custom_logo'] . '" alt="" style="text-align:center; max-width:100px;" />' :
104
-        '<img src="includes/images/teampass-logo2-login.png" alt="Teampass Logo">',
103
+        '<img src="'.(string) $SETTINGS['custom_logo'].'" alt="" style="text-align:center; max-width:100px;" />' : '<img src="includes/images/teampass-logo2-login.png" alt="Teampass Logo">',
105 104
         '
106 105
         </div>
107 106
         <div style="font-weight:bold;">
@@ -121,14 +120,14 @@  discard block
 block discarded – undo
121 120
 
122 121
         <div class="card-body login-card-body1">
123 122
             <div class="input-group has-feedback mb-2">
124
-                <div class="input-group-prepend infotip" title="' . $lang->get('login') . '">
123
+                <div class="input-group-prepend infotip" title="' . $lang->get('login').'">
125 124
                     <span class="input-group-text"><i class="fa-solid fa-user fa-fw"></i></span>
126 125
                 </div>';
127 126
 if (
128 127
     isset($SETTINGS['enable_http_request_login']) === true
129 128
     && (int) $SETTINGS['enable_http_request_login'] === 1
130 129
     && $request->getUser() !== null
131
-    && ! (isset($SETTINGS['maintenance_mode']) === true
130
+    && !(isset($SETTINGS['maintenance_mode']) === true
132 131
         && (int) $SETTINGS['maintenance_mode'] === 1)
133 132
 ) {
134 133
     if (strpos($request->getUser(), '@') !== false) {
@@ -142,42 +141,42 @@  discard block
 block discarded – undo
142 141
             <input type="text" id="login" class="form-control" placeholder="', filter_var($username, FILTER_SANITIZE_FULL_SPECIAL_CHARS), '" readonly>';
143 142
 } else {
144 143
     echo '
145
-            <input type="text" id="login" class="form-control" placeholder="' . $lang->get('index_login') . '" value="'.(null !== $session->get('user-login') && empty($session->get('user-login')) === false ? filter_var($session->get('user-login'), FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '').'">';
144
+            <input type="text" id="login" class="form-control" placeholder="' . $lang->get('index_login').'" value="'.(null !== $session->get('user-login') && empty($session->get('user-login')) === false ? filter_var($session->get('user-login'), FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '').'">';
146 145
 }
147 146
 
148 147
 echo '
149 148
         </div>';
150
-if (! (isset($SETTINGS['enable_http_request_login']) === true
149
+if (!(isset($SETTINGS['enable_http_request_login']) === true
151 150
     && (int) $SETTINGS['enable_http_request_login'] === 1
152 151
     && $request->getUser() !== null
153
-    && ! (isset($SETTINGS['maintenance_mode']) === true
152
+    && !(isset($SETTINGS['maintenance_mode']) === true
154 153
         && (int) $SETTINGS['maintenance_mode'] === 1))) {
155 154
     echo '
156 155
         <div class="input-group has-feedback mb-2">
157
-            <div class="input-group-prepend infotip" title="' . $lang->get('password') . '">
156
+            <div class="input-group-prepend infotip" title="' . $lang->get('password').'">
158 157
                 <span class="input-group-text"><i class="fa-solid fa-lock fa-fw"></i></span>
159 158
             </div>
160
-            <input type="password" id="pw" class="form-control submit-button" placeholder="' . $lang->get('index_password') . '">
159
+            <input type="password" id="pw" class="form-control submit-button" placeholder="' . $lang->get('index_password').'">
161 160
         </div>';
162 161
 }
163 162
 
164 163
 echo '
165 164
         <div class="input-group has-feedback mb-2">
166
-            <div class="input-group-prepend infotip" title="' . $lang->get('session_expiration_in_minutes') . '">
165
+            <div class="input-group-prepend infotip" title="' . $lang->get('session_expiration_in_minutes').'">
167 166
                 <span class="input-group-text"><i class="fa-solid fa-clock fa-fw"></i></span>
168 167
             </div>
169 168
             <input type="text" id="session_duration" class="form-control submit-button" 
170
-            placeholder="' . $lang->get('index_session_duration') .'&nbsp;(' . $lang->get('minutes') . ')" 
169
+            placeholder="' . $lang->get('index_session_duration').'&nbsp;('.$lang->get('minutes').')" 
171 170
             value="', isset($SETTINGS['default_session_expiration_time']) === true ? $SETTINGS['default_session_expiration_time'] : '', '">
172 171
         </div>';
173 172
 // 2FA auth selector
174 173
 $mfaHtmlPart = '
175
-        <input type="hidden" id="2fa_user_selection" value="'.htmlspecialchars((isset($get['post_type']) === true && $get['post_type'] === 'duo') ? 'duo' : ''). '">
176
-        <input type="hidden" id="duo_code" value="'.htmlspecialchars(isset($get['duo_code']) === true && is_null($get['duo_code']) === false ? $get['duo_code'] : ''). '">
177
-        <input type="hidden" id="duo_state" value="'.htmlspecialchars(isset($get['duo_state']) === true && is_null($get['duo_state']) === false ? $get['duo_state'] : ''). '">
174
+        <input type="hidden" id="2fa_user_selection" value="'.htmlspecialchars((isset($get['post_type']) === true && $get['post_type'] === 'duo') ? 'duo' : '').'">
175
+        <input type="hidden" id="duo_code" value="'.htmlspecialchars(isset($get['duo_code']) === true && is_null($get['duo_code']) === false ? $get['duo_code'] : '').'">
176
+        <input type="hidden" id="duo_state" value="'.htmlspecialchars(isset($get['duo_state']) === true && is_null($get['duo_state']) === false ? $get['duo_state'] : '').'">
178 177
         <div class="row mb-3 hidden" id="2fa_methods_selector">
179 178
             <div class="col-12">
180
-                <h8 class="login-box-msg">' . $lang->get('2fa_authentication_selector') . '</h8>
179
+                <h8 class="login-box-msg">' . $lang->get('2fa_authentication_selector').'</h8>
181 180
                 <div class="2fa-methods text-center mt-2">'.
182 181
                 (isset($SETTINGS['google_authentication']) === true && (int) $SETTINGS['google_authentication'] === 1 ?
183 182
         '
@@ -210,14 +209,14 @@  discard block
 block discarded – undo
210 209
     echo '
211 210
         <div id="div-2fa-google" class="mb-3 div-2fa-method hidden">
212 211
             <div class="input-group has-feedback mb-2">
213
-                <div class="input-group-prepend infotip" title="' . $lang->get('mfa_unique_code') . '">
212
+                <div class="input-group-prepend infotip" title="' . $lang->get('mfa_unique_code').'">
214 213
                     <span class="input-group-text"><i class="fa-solid fa-key fa-fw"></i></span>
215 214
                 </div>
216
-                <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . $lang->get('ga_identification_code') . '" />
215
+                <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . $lang->get('ga_identification_code').'" />
217 216
                 <span class="input-group-append">
218 217
                     <button type="button" class="btn btn-info btn-flat" onclick="send_user_new_temporary_ga_code()">
219 218
                         <i class="fa-solid fa-envelope form-control-feedback pointer infotip" 
220
-                    title="' . $lang->get('i_need_to_generate_new_ga_code') . '"></i>
219
+                    title="' . $lang->get('i_need_to_generate_new_ga_code').'"></i>
221 220
                     </button>
222 221
                 </span>
223 222
             </div>
@@ -235,7 +234,7 @@  discard block
 block discarded – undo
235 234
 <script>
236 235
 var seconds = 1;
237 236
 function updateLogonButton(timeToGo){
238
-    document.getElementById("but_identify_user").value = "' . $lang->get('duration_login_attempt') . ' " + timeToGo;
237
+    document.getElementById("but_identify_user").value = "' . $lang->get('duration_login_attempt').' " + timeToGo;
239 238
 }
240 239
 $( window ).on( "load", function() {
241 240
     updateLogonButton(seconds);
@@ -244,7 +243,7 @@  discard block
 block discarded – undo
244 243
         if (seconds >= 0) {
245 244
             updateLogonButton(seconds);
246 245
         } else if(seconds === 0) {
247
-            launchIdentify("", "' . $nextUrl . '");
246
+            launchIdentify("", "' . $nextUrl.'");
248 247
         }
249 248
         updateLogonButton(seconds);
250 249
     },
@@ -265,15 +264,15 @@  discard block
 block discarded – undo
265 264
             <div class="col-8">
266 265
                 <div id="yubiko-new-key" class="alert alert-info hidden">
267 266
                     <p>
268
-                        <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . $lang->get('yubico_user_id') . '">
267
+                        <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . $lang->get('yubico_user_id').'">
269 268
                     </p>
270 269
                     <p>
271
-                    <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . $lang->get('yubico_user_key') . '">
270
+                    <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . $lang->get('yubico_user_key').'">
272 271
                     </p>
273 272
                 </div>
274
-                <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . $lang->get('press_your_yubico_key') . '">
273
+                <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . $lang->get('press_your_yubico_key').'">
275 274
                 <div class="row">
276
-                    <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . $lang->get('register_new_yubiko_key') . '</span>
275
+                    <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . $lang->get('register_new_yubiko_key').'</span>
277 276
                 </div>
278 277
             </div>
279 278
         </div>';
@@ -282,22 +281,22 @@  discard block
 block discarded – undo
282 281
 echo '
283 282
         <div class="row mt-5">
284 283
             <div class="col-12">
285
-                <button id="but_identify_user" class="btn btn-primary btn-block">' . $lang->get('log_in') . '</button>
284
+                <button id="but_identify_user" class="btn btn-primary btn-block">' . $lang->get('log_in').'</button>
286 285
                 
287 286
                 <!-- In case of upgrade, the user has to provide his One Time Code -->
288 287
                 <div class="card-body user-one-time-code-card-body hidden">
289
-                    <h5 class="login-box-msg">' . $lang->get('provide_personal_one_time_code') . '</h5>
288
+                    <h5 class="login-box-msg">' . $lang->get('provide_personal_one_time_code').'</h5>
290 289
 
291 290
                     <div class="input-group has-feedback mb-2 mt-4">
292 291
                         <div class="input-group-prepend">
293 292
                             <span class="input-group-text"><i class="fa-solid fa-unlock-alt"></i></span>
294 293
                         </div>
295
-                        <input type="password" id="user-one-time-code" class="form-control" placeholder="' . $lang->get('one_time_code') . '">
294
+                        <input type="password" id="user-one-time-code" class="form-control" placeholder="' . $lang->get('one_time_code').'">
296 295
                     </div>
297 296
 
298 297
                     <div class="row mb-3">
299 298
                         <div class="col-12">
300
-                            <button id="but_confirm_otc" class="btn btn-primary btn-block">' . $lang->get('confirm') . '</button>
299
+                            <button id="but_confirm_otc" class="btn btn-primary btn-block">' . $lang->get('confirm').'</button>
301 300
                         </div>
302 301
                     </div>
303 302
                 </div>
@@ -312,7 +311,7 @@  discard block
 block discarded – undo
312 311
         <hr class="mt-3 mb-3"/>
313 312
         <div class="row mb-2">
314 313
             <div class="col-12">
315
-                <button id="but_login_with_oauth2" class="btn btn-primary btn-block">' . $SETTINGS['oauth2_client_appname'] . '</button>
314
+                <button id="but_login_with_oauth2" class="btn btn-primary btn-block">' . $SETTINGS['oauth2_client_appname'].'</button>
316 315
             </div>
317 316
         </div>';
318 317
 }
@@ -325,10 +324,10 @@  discard block
 block discarded – undo
325 324
 // In case of password change
326 325
 echo '
327 326
     <div class="card-body confirm-password-card-body hidden">
328
-        <h5 class="login-box-msg">' . $lang->get('new_password_required') . '</h5>
327
+        <h5 class="login-box-msg">' . $lang->get('new_password_required').'</h5>
329 328
 
330 329
         <div class="alert alert-info">
331
-            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('password_strength') . '
330
+            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('password_strength').'
332 331
             <span id="confirm-password-level" class="ml-2 font-weight-bold"></span></div>
333 332
         </div>
334 333
 
@@ -338,20 +337,20 @@  discard block
 block discarded – undo
338 337
                     <div class="input-group-prepend">
339 338
                         <span class="input-group-text"><i class="fas fa-key"></i></span>
340 339
                     </div>
341
-                    <input type="password" id="current-user-password" class="form-control" placeholder="' . $lang->get('current_password') . '">
340
+                    <input type="password" id="current-user-password" class="form-control" placeholder="' . $lang->get('current_password').'">
342 341
                 </div>
343 342
             </div>
344 343
             <div class="input-group has-feedback mb-2 mt-4">
345 344
                 <div class="input-group-prepend">
346 345
                     <span class="input-group-text"><i class="fas fa-key"></i></span>
347 346
                 </div>
348
-                <input type="password" id="new-user-password" class="form-control" placeholder="' . $lang->get('index_new_pw') . '">
347
+                <input type="password" id="new-user-password" class="form-control" placeholder="' . $lang->get('index_new_pw').'">
349 348
             </div>
350 349
             <div class="input-group has-feedback mb-2">
351 350
                 <div class="input-group-prepend">
352 351
                     <span class="input-group-text"><i class="fas fa-key"></i></span>
353 352
                 </div>
354
-                <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . $lang->get('index_change_pw_confirmation') . '">
353
+                <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . $lang->get('index_change_pw_confirmation').'">
355 354
             </div>
356 355
             <div class="row mb-3">
357 356
                 <div class="col-md-12 offset-sm-4 text-center">
@@ -362,7 +361,7 @@  discard block
 block discarded – undo
362 361
             </div>
363 362
             <div class="row mb-3">
364 363
                 <div class="col-12">
365
-                    <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . $lang->get('confirm') . '</button>
364
+                    <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . $lang->get('confirm').'</button>
366 365
                 </div>
367 366
             </div>
368 367
         </div>
@@ -370,20 +369,20 @@  discard block
 block discarded – undo
370 369
 
371 370
     <div class="card-body hidden" id="card-user-treat-psk">
372 371
         <div class="alert alert-info">
373
-            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('user_has_psk_info') . '</div>
372
+            <div class="text-center"><i class="icon fa fa-info"></i>' . $lang->get('user_has_psk_info').'</div>
374 373
         </div>
375 374
         <div class="input-group has-feedback mb-2">
376 375
             <div class="input-group-prepend">
377 376
                 <span class="input-group-text"><i class="fas fa-key"></i></span>
378 377
             </div>
379
-            <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . $lang->get('home_personal_saltkey') . '">
378
+            <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . $lang->get('home_personal_saltkey').'">
380 379
         </div>
381 380
         <div class="row mb-3 mt-4">
382 381
             <div class="col-12">
383
-                <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . $lang->get('launch') . '</button>
382
+                <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . $lang->get('launch').'</button>
384 383
             </div>
385 384
             <div class="col-12 mt-3">
386
-                <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . $lang->get('i_cannot_remember') . '</button>
385
+                <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . $lang->get('i_cannot_remember').'</button>
387 386
             </div>
388 387
         </div>
389 388
     </div>
Please login to merge, or discard this patch.