Passed
Pull Request — master (#4784)
by Nils
06:50
created
pages/admin.js.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                     // error
170 170
                     toastr.remove();
171 171
                     toastr.error(
172
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
172
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
173 173
                         '', {
174 174
                             closeButton: true,
175 175
                             positionClass: 'toast-bottom-right'
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                     // error
249 249
                     toastr.remove();
250 250
                     toastr.error(
251
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
251
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
252 252
                         '', {
253 253
                             closeButton: true,
254 254
                             positionClass: 'toast-bottom-right'
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                     // error
311 311
                     toastr.remove();
312 312
                     toastr.error(
313
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
313
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
314 314
                         '', {
315 315
                             closeButton: true,
316 316
                             positionClass: 'toast-bottom-right'
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
                     // error
405 405
                     toastr.remove();
406 406
                     toastr.error(
407
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
407
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
408 408
                         '', {
409 409
                             closeButton: true,
410 410
                             positionClass: 'toast-bottom-right'
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
                     
434 434
                     //const className = result.success ? 'success' : 'error';
435 435
                     const icon = result.success ? '<i class="fa-solid fa-check text-success mr-1"></i>' : '<i class="fa-solid fa-xmark text-danger mr-1"></i>';
436
-                    const message = result.success ? '<?php echo $lang->get('server_returned_data');?>' : 'Error: ' + result.error;
436
+                    const message = result.success ? '<?php echo $lang->get('server_returned_data'); ?>' : 'Error: ' + result.error;
437 437
                     
438 438
                     output += '<li>' + icon + '<b>' + file + '</b><br/>' + message + '</li>';
439 439
                 });
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
                     // error
465 465
                     toastr.remove();
466 466
                     toastr.error(
467
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
467
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
468 468
                         '', {
469 469
                             closeButton: true,
470 470
                             positionClass: 'toast-bottom-right'
Please login to merge, or discard this patch.
pages/items.js.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
             //
1057 1057
         } else if ($(this).data('item-action') === 'link') {
1058 1058
             // Add link to clipboard.
1059
-            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url'];?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1059
+            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url']; ?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1060 1060
 
1061 1061
             // Display message.
1062 1062
             toastr.remove();
@@ -2698,7 +2698,7 @@  discard block
 block discarded – undo
2698 2698
                 progress: "#form-item-password-strength",
2699 2699
                 score: "#form-item-password-strength"
2700 2700
             },
2701
-            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;?>],
2701
+            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; ?>],
2702 2702
         },
2703 2703
         i18n : {
2704 2704
             t: function (key) {
@@ -2725,7 +2725,7 @@  discard block
 block discarded – undo
2725 2725
     <?php
2726 2726
     $max_file_size = '';
2727 2727
     if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) {
2728
-        $max_file_size = $SETTINGS['upload_maxfilesize'] . 'mb';
2728
+        $max_file_size = $SETTINGS['upload_maxfilesize'].'mb';
2729 2729
     } else {
2730 2730
         $max_file_size = $SETTINGS['upload_maxfilesize'];
2731 2731
     }
@@ -4647,7 +4647,7 @@  discard block
 block discarded – undo
4647 4647
                         (retData.edition_locked_delay === null ? 
4648 4648
                         '' 
4649 4649
                         :
4650
-                        ' : ' + retData.edition_locked_delay + ' <?php echo $lang->get('seconds');?>'),
4650
+                        ' : ' + retData.edition_locked_delay + ' <?php echo $lang->get('seconds'); ?>'),
4651 4651
                     '', {
4652 4652
                         timeOut: 5000,
4653 4653
                         progressBar: true
@@ -4804,7 +4804,7 @@  discard block
 block discarded – undo
4804 4804
 
4805 4805
                             // Show passwords inputs and form
4806 4806
                             $('#dialog-ldap-user-change-password-info')
4807
-                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4807
+                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4808 4808
                                 .removeClass('hidden');
4809 4809
                             $('#dialog-ldap-user-change-password').removeClass('hidden');
4810 4810
                         } else if (data.error_type !== 'undefined') {
@@ -4823,7 +4823,7 @@  discard block
 block discarded – undo
4823 4823
 
4824 4824
                                 // Show passwords inputs and form
4825 4825
                                 $('#dialog-ldap-user-change-password-info')
4826
-                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4826
+                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4827 4827
                                     .removeClass('hidden');
4828 4828
                                 $('#dialog-ldap-user-change-password').removeClass('hidden');
4829 4829
                             });
Please login to merge, or discard this patch.
includes/language/english.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
  * @see       https://www.teampass.net
29 29
  */
30 30
 
31
- // TO REMOVE
32
- // - selected_items_to_be_imported
31
+    // TO REMOVE
32
+    // - selected_items_to_be_imported
33 33
 
34 34
 return array(
35 35
     'at_phone_number' => 'Phone number',
Please login to merge, or discard this patch.
pages/options.php 1 patch
Spacing   +6 added lines, -6 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('options') === 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
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                                     // get list of all timezones
323 323
                                     foreach ($zones as $key => $zone) {
324 324
                                         echo '
325
-                                <option value="' . $key . '"', isset($SETTINGS['timezone']) === true && (int) $SETTINGS['timezone'] === $key ? ' selected' : '', '>' . $zone . '</option>';
325
+                                <option value="' . $key.'"', isset($SETTINGS['timezone']) === true && (int) $SETTINGS['timezone'] === $key ? ' selected' : '', '>'.$zone.'</option>';
326 326
                                     }
327 327
                                     ?>
328 328
                                 </select>
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
                                     $languagesList = $languagesList ?? [];
375 375
                                     foreach ($languagesList as $teampassLang) {
376 376
                                         echo '
377
-                                <option value="' . $teampassLang . '"', isset($SETTINGS['default_language']) === true && (int) $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>' . $teampassLang . '</option>';
377
+                                <option value="' . $teampassLang.'"', isset($SETTINGS['default_language']) === true && (int) $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>'.$teampassLang.'</option>';
378 378
                                     }
379 379
                                     ?>
380 380
                                 </select>
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
                                 <?php
472 472
                                 foreach (TP_PW_COMPLEXITY as $complex) {
473 473
                                     echo '
474
-                                <option value="' . $complex[0] . '"', isset($SETTINGS['personal_saltkey_security_level']) === true && (int) $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>';
474
+                                <option value="' . $complex[0].'"', isset($SETTINGS['personal_saltkey_security_level']) === true && (int) $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>';
475 475
                                 }
476 476
                                 ?>
477 477
                             </select>
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
                                         $roles = getRolesTitles();
849 849
                                         foreach ($roles as $role) {
850 850
                                             echo '
851
-                                    <option value="' . htmlspecialchars($role['id']) . '"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>' . htmlspecialchars(addslashes($role['title'])) . '</option>';
851
+                                    <option value="' . htmlspecialchars($role['id']).'"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>'.htmlspecialchars(addslashes($role['title'])).'</option>';
852 852
                                         }
853 853
                                     }
854 854
                                     ?>
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
                                     <?php
1076 1076
                                     foreach (TP_PW_COMPLEXITY as $complex) {
1077 1077
                                         echo '
1078
-                                <option value="' . $complex[0] . '"', isset($SETTINGS['offline_key_level']) === true && (int) $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>';
1078
+                                <option value="' . $complex[0].'"', isset($SETTINGS['offline_key_level']) === true && (int) $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>';
1079 1079
                                     }
1080 1080
                                     ?>
1081 1081
                                 </select>
Please login to merge, or discard this patch.