Passed
Push — wip_sessions ( b55e55...384f5b )
by Nils
05:05
created
pages/utilities.renewal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('utilities.renewal') === false) {
65 65
     // Not allowed page
66 66
     $session->set('system-error_code', ERR_NOT_ALLOWED);
67
-    include $SETTINGS['cpassman_dir'] . '/error.php';
67
+    include $SETTINGS['cpassman_dir'].'/error.php';
68 68
     exit;
69 69
 }
70 70
 
Please login to merge, or discard this patch.
pages/search.js.php 2 patches
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('search') === 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
 $var = [];
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -2,28 +2,28 @@
 block discarded – undo
2 2
 
3 3
 declare(strict_types=1);
4 4
 
5
- /**
6
-  * Teampass - a collaborative passwords manager.
7
-  * ---
8
-  * This library is distributed in the hope that it will be useful,
9
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
-  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
-  * ---
12
-  *
13
-  * @project   Teampass
14
-  *
15
-  * @file      search.js.php
16
-  * ---
17
-  *
18
-  * @author    Nils LaumaillĂ© ([email protected])
19
-  *
20
-  * @copyright 2009-2023 Teampass.net
21
-  *
22
-  * @license   https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0
23
-  * ---
24
-  *
25
-  * @see       https://www.teampass.net
26
-  */
5
+    /**
6
+     * Teampass - a collaborative passwords manager.
7
+     * ---
8
+     * This library is distributed in the hope that it will be useful,
9
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
+     * ---
12
+     *
13
+     * @project   Teampass
14
+     *
15
+     * @file      search.js.php
16
+     * ---
17
+     *
18
+     * @author    Nils LaumaillĂ© ([email protected])
19
+     *
20
+     * @copyright 2009-2023 Teampass.net
21
+     *
22
+     * @license   https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0
23
+     * ---
24
+     *
25
+     * @see       https://www.teampass.net
26
+     */
27 27
 
28 28
 use TeampassClasses\PerformChecks\PerformChecks;
29 29
 use TeampassClasses\SessionManager\SessionManager;
Please login to merge, or discard this patch.
pages/api.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('api') === false) {
66 66
     // Not allowed page
67 67
     $session->set('system-error_code', ERR_NOT_ALLOWED);
68
-    include $SETTINGS['cpassman_dir'] . '/error.php';
68
+    include $SETTINGS['cpassman_dir'].'/error.php';
69 69
     exit;
70 70
 }
71 71
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                                     <?php
150 150
                                     $rowsKeys = DB::query(
151 151
                                         'SELECT increment_id, label, timestamp, user_id, value 
152
-                                        FROM ' . prefixTable('api') . '
152
+                                        FROM ' . prefixTable('api').'
153 153
                                         WHERE type = %s
154 154
                                         ORDER BY timestamp ASC',
155 155
                                         'key'
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
                                             <?php
168 168
                                             foreach ($rowsKeys as $key) {
169 169
                                                 echo '
170
-                                                    <tr data-id="' . $key['increment_id'] . '">
171
-                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . $lang->get('del_button') . '"></i></td>
172
-                                                    <td><span class="edit-api-key pointer">' . $key['label'] . '</span></td>
173
-                                                    <td>' . $key['value']. '</td>                        
170
+                                                    <tr data-id="' . $key['increment_id'].'">
171
+                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . $lang->get('del_button').'"></i></td>
172
+                                                    <td><span class="edit-api-key pointer">' . $key['label'].'</span></td>
173
+                                                    <td>' . $key['value'].'</td>                        
174 174
                                                 </tr>';
175 175
                                             } ?>
176 176
                                         </tbody>
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                                 <div class="col-12 mt-4" id="table-api-ip">
206 206
                                     <?php
207 207
                                     $rowsIps = DB::query(
208
-                                                'SELECT increment_id, label, timestamp value FROM ' . prefixTable('api') . '
208
+                                                'SELECT increment_id, label, timestamp value FROM '.prefixTable('api').'
209 209
                                                 WHERE type = %s
210 210
                                                 ORDER BY timestamp ASC',
211 211
                                                 'ip'
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
                                             <?php
224 224
                                             foreach ($rowsIps as $ip) {
225 225
                                                 echo '
226
-                                                <tr data-id="' . $ip['increment_id'] . '">
227
-                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . $lang->get('del_button') . '"></i></td>
228
-                                                    <td><span class="edit-api-ip pointer" data-field="label">' . $ip['label'] . '</span></td>
229
-                                                    <td><span class="edit-api-ip pointer" data-field="value">' . $ip['value'] . '</span></td>                        
226
+                                                <tr data-id="' . $ip['increment_id'].'">
227
+                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . $lang->get('del_button').'"></i></td>
228
+                                                    <td><span class="edit-api-ip pointer" data-field="label">' . $ip['label'].'</span></td>
229
+                                                    <td><span class="edit-api-ip pointer" data-field="value">' . $ip['value'].'</span></td>                        
230 230
                                                 </tr>';
231 231
                                             } ?>
232 232
                                         </tbody>
Please login to merge, or discard this patch.
pages/roles.js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('roles') === false) {
68 68
     // Not allowed page
69 69
     $session->set('system-error_code', ERR_NOT_ALLOWED);
70
-    include $SETTINGS['cpassman_dir'] . '/error.php';
70
+    include $SETTINGS['cpassman_dir'].'/error.php';
71 71
     exit;
72 72
 }
73 73
 ?>
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
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('options') === false) {
66 66
     // Not allowed page
67 67
     $session->set('system-error_code', ERR_NOT_ALLOWED);
68
-    include $SETTINGS['cpassman_dir'] . '/error.php';
68
+    include $SETTINGS['cpassman_dir'].'/error.php';
69 69
     exit;
70 70
 }
71 71
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                                     // get list of all timezones
298 298
                                     foreach ($zones as $key => $zone) {
299 299
                                         echo '
300
-                                <option value="' . $key . '"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>' . $zone . '</option>';
300
+                                <option value="' . $key.'"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>'.$zone.'</option>';
301 301
                                     }
302 302
                                     ?>
303 303
                                 </select>
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
                                     <?php
349 349
                                     foreach ($languagesList as $teampassLang) {
350 350
                                         echo '
351
-                                <option value="' . $teampassLang . '"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>' . $teampassLang . '</option>';
351
+                                <option value="' . $teampassLang.'"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>'.$teampassLang.'</option>';
352 352
                                     }
353 353
                                     ?>
354 354
                                 </select>
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
                                 <?php
446 446
                                 foreach (TP_PW_COMPLEXITY as $complex) {
447 447
                                     echo '
448
-                                <option value="' . $complex[0] . '"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>';
448
+                                <option value="' . $complex[0].'"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>';
449 449
                                 }
450 450
                                 ?>
451 451
                             </select>
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
                                         );
782 782
                                         foreach ($roles as $role) {
783 783
                                             echo '
784
-                                    <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>';
784
+                                    <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>';
785 785
                                         }
786 786
                                     }
787 787
                                     ?>
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
                                     <?php
959 959
                                     foreach (TP_PW_COMPLEXITY as $complex) {
960 960
                                         echo '
961
-                                <option value="' . $complex[0] . '"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>';
961
+                                <option value="' . $complex[0].'"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>';
962 962
                                     }
963 963
                                     ?>
964 964
                                 </select>
Please login to merge, or discard this patch.
pages/folders.js.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('folders') === false) {
68 68
     // Not allowed page
69 69
     $session->set('system-error_code', ERR_NOT_ALLOWED);
70
-    include $SETTINGS['cpassman_dir'] . '/error.php';
70
+    include $SETTINGS['cpassman_dir'].'/error.php';
71 71
     exit;
72 72
 }
73 73
 ?>
@@ -697,14 +697,14 @@  discard block
 block discarded – undo
697 697
             '<label><?php echo $lang->get('icon'); ?></label>' +
698 698
             '<input type="text" class="form-control form-folder-control purify" id="folder-edit-icon" data-field="icon" value="'+folderIcon+'">' +
699 699
             '<small class="form-text text-muted">' +
700
-            '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' +
700
+            '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' +
701 701
             '</small>' +
702 702
             '</div>' +
703 703
             '<div class="form-group ml-2">' +
704 704
             '<label><?php echo $lang->get('icon_on_selection'); ?></label>' +
705 705
             '<input type="text" class="form-control form-folder-control purify" id="folder-edit-icon-selected" data-field="iconSelected" value="'+folderIconSelection+'">' +
706 706
             '<small class="form-text text-muted">' +
707
-            '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' +
707
+            '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' +
708 708
             '</small>' +
709 709
             '</div>' +
710 710
             '<div class="form-group ml-2" id="folder-rights-tuned">' +
Please login to merge, or discard this patch.
pages/emails.js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('emails') === 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
 ?>
Please login to merge, or discard this patch.
pages/utilities.deletion.js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('utilities.deletion') === 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
 ?>
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
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('items') === false) {
67 67
     // Not allowed page
68 68
     $session->set('system-error_code', ERR_NOT_ALLOWED);
69
-    include $SETTINGS['cpassman_dir'] . '/error.php';
69
+    include $SETTINGS['cpassman_dir'].'/error.php';
70 70
     exit;
71 71
 }
72 72
 
@@ -2553,7 +2553,7 @@  discard block
 block discarded – undo
2553 2553
                 progress: "#form-item-password-strength",
2554 2554
                 score: "#form-item-password-strength"
2555 2555
             },
2556
-            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;?>],
2556
+            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; ?>],
2557 2557
         },
2558 2558
         i18n : {
2559 2559
             t: function (key) {
@@ -2580,7 +2580,7 @@  discard block
 block discarded – undo
2580 2580
     <?php
2581 2581
     $max_file_size = '';
2582 2582
     if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) {
2583
-        $max_file_size = $SETTINGS['upload_maxfilesize'] . 'mb';
2583
+        $max_file_size = $SETTINGS['upload_maxfilesize'].'mb';
2584 2584
     } else {
2585 2585
         $max_file_size = $SETTINGS['upload_maxfilesize'];
2586 2586
     }
@@ -4593,7 +4593,7 @@  discard block
 block discarded – undo
4593 4593
 
4594 4594
                             // Show passwords inputs and form
4595 4595
                             $('#dialog-ldap-user-change-password-info')
4596
-                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4596
+                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4597 4597
                                 .removeClass('hidden');
4598 4598
                             $('#dialog-ldap-user-change-password').removeClass('hidden');
4599 4599
                         } else if (data.error_type !== 'undefined') {
@@ -4612,7 +4612,7 @@  discard block
 block discarded – undo
4612 4612
 
4613 4613
                                 // Show passwords inputs and form
4614 4614
                                 $('#dialog-ldap-user-change-password-info')
4615
-                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4615
+                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4616 4616
                                     .removeClass('hidden');
4617 4617
                                 $('#dialog-ldap-user-change-password').removeClass('hidden');
4618 4618
                             });
@@ -4973,7 +4973,7 @@  discard block
 block discarded – undo
4973 4973
                         '#get_item_link',
4974 4974
                         {
4975 4975
                             text: function(e) {
4976
-                                return ("<?php echo $SETTINGS['cpassman_url'];?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
4976
+                                return ("<?php echo $SETTINGS['cpassman_url']; ?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
4977 4977
                             }
4978 4978
                         })
4979 4979
                         .on('success', function(e) {
Please login to merge, or discard this patch.