Passed
Push — master ( 8045ef...5a3ed5 )
by Nils
06:16 queued 14s
created
api/Model/FolderModel.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $ret = [];
35 35
 
36 36
         foreach ($rows as $row) {
37
-			$isVisible = in_array((int) $row['id'], $foldersId);
37
+            $isVisible = in_array((int) $row['id'], $foldersId);
38 38
             $childrens = $this->getFoldersChildren($row['id'], $foldersId);
39 39
 
40 40
             if ($isVisible || count($childrens) > 0) {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                     [
44 44
                         'id' => (int) $row['id'],
45 45
                         'title' => $row['title'],
46
-						'isVisible' => $isVisible,
46
+                        'isVisible' => $isVisible,
47 47
                         'childrens' => $childrens
48 48
                     ]
49 49
                 );
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         if ( count($childrens) > 0) {
65 65
             foreach ($childrens as $children) {
66
-				$isVisible = in_array((int) $children['id'], $foldersId);
66
+                $isVisible = in_array((int) $children['id'], $foldersId);
67 67
                 $childs = $this->getFoldersChildren($children['id'], $foldersId);
68 68
 
69 69
                 if (in_array((int) $children['id'], $foldersId) || count($childs) > 0) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                         [
73 73
                             'id' => (int) $children['id'],
74 74
                             'title' => $children['title'],
75
-							'isVisible' => $isVisible,
75
+                            'isVisible' => $isVisible,
76 76
                             'childrens' => $childs
77 77
                         ]
78 78
                     );
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         // Get folders
38 38
         $rows = DB::query(
39 39
             'SELECT id, title
40
-            FROM ' . prefixTable('nested_tree') . '
40
+            FROM ' . prefixTable('nested_tree').'
41 41
             WHERE nlevel = %i',
42 42
             1
43 43
         );
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
         $ret = [];
70 70
         $childrens = DB::query(
71 71
             'SELECT id, title
72
-            FROM ' . prefixTable('nested_tree') . '
72
+            FROM ' . prefixTable('nested_tree').'
73 73
             WHERE parent_id = %i',
74 74
             $parentId
75 75
         );
76 76
 
77
-        if ( count($childrens) > 0) {
77
+        if (count($childrens) > 0) {
78 78
             foreach ($childrens as $children) {
79 79
 				$isVisible = in_array((int) $children['id'], $foldersId);
80 80
                 $childs = $this->getFoldersChildren($children['id'], $foldersId);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     ): array
117 117
     {
118 118
         // Validate inputs
119
-        include_once API_ROOT_PATH . '/../sources/main.functions.php';
119
+        include_once API_ROOT_PATH.'/../sources/main.functions.php';
120 120
         $data = [
121 121
             'title' => $title,
122 122
             'parent_id' => $parent_id,
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 'error' => true,
182 182
                 'error_header' => 'HTTP/1.1 422 Unprocessable Entity',
183 183
                 'error_message' => 'Invalid parameters'
184
-            ];}
184
+            ]; }
185 185
 
186 186
         // Create folder
187 187
         require_once TEAMPASS_ROOT_PATH.'/sources/folders.class.php';
Please login to merge, or discard this patch.
api/Controller/Api/AuthController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $arrQueryStringParams = $this->getQueryStringParams();
40 40
 
41 41
         if (strtoupper($requestMethod) === 'POST') {
42
-            require API_ROOT_PATH . "/Model/AuthModel.php";
42
+            require API_ROOT_PATH."/Model/AuthModel.php";
43 43
             try {
44 44
                 $authModel = new AuthModel();
45 45
                 $arrUser = $authModel->getUserAuth(
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 if (array_key_exists("token", $arrUser)) {
51 51
                     $responseData = json_encode($arrUser);
52 52
                 } else {
53
-                    $strErrorDesc = $arrUser['error'] . " (" . $arrUser['info'] . ")";
53
+                    $strErrorDesc = $arrUser['error']." (".$arrUser['info'].")";
54 54
                     $strErrorHeader = 'HTTP/1.1 401 Unauthorized';
55 55
                 }
56 56
             } catch (Error $e) {
Please login to merge, or discard this patch.
api/Model/Operation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
                 "error" => '',
41 41
             );
42 42
     
43
-        }catch (Exception $e) {    
43
+        } catch (Exception $e) {    
44 44
             return false;
45 45
         }
46 46
     }
Please login to merge, or discard this patch.
pages/statistics.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('statistics') === 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
 
Please login to merge, or discard this patch.
pages/folders.php 1 patch
Spacing   +11 added lines, -11 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('folders') === 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
 
@@ -99,28 +99,28 @@  discard block
 block discarded – undo
99 99
 $complexityHtml = '<div id="hidden-select-complexity" class="hidden"><select id="select-complexity" class="form-control form-item-control save-me">';
100 100
 $complexitySelect = '';
101 101
 foreach (TP_PW_COMPLEXITY as $level) {
102
-    $complexitySelect .= '<option value="' . $level[0] . '">' . $level[1] . '</option>';
102
+    $complexitySelect .= '<option value="'.$level[0].'">'.$level[1].'</option>';
103 103
 }
104
-$complexityHtml .= $complexitySelect . '</select></div>';
104
+$complexityHtml .= $complexitySelect.'</select></div>';
105 105
 
106 106
 /* Get full tree structure */
107 107
 $tst = $tree->getDescendants();
108 108
 // prepare options list
109
-$droplist = '<option value="na">---' . $lang->get('select') . '---</option>';
109
+$droplist = '<option value="na">---'.$lang->get('select').'---</option>';
110 110
 if ((int) $session->get('user-admin') === 1 || (int) $session->get('user-manager') === 1 || (int) $session->get('user-can_create_root_folder') === 1) {
111
-    $droplist .= '<option value="0">' . $lang->get('root') . '</option>';
111
+    $droplist .= '<option value="0">'.$lang->get('root').'</option>';
112 112
 }
113 113
 foreach ($tst as $t) {
114 114
     if (
115 115
         in_array($t->id, $session->get('user-accessible_folders')) === true
116 116
         && in_array($t->id, $session->get('user-personal_visible_folders')) === false
117 117
     ) {
118
-        $droplist .= '<option value="' . $t->id . '">' . addslashes($t->title);
118
+        $droplist .= '<option value="'.$t->id.'">'.addslashes($t->title);
119 119
         $text = '';
120 120
         foreach ($tree->getPath($t->id, false) as $fld) {
121
-            $text .= empty($text) === true ? '     [' . $fld->title : ' > ' . $fld->title;
121
+            $text .= empty($text) === true ? '     ['.$fld->title : ' > '.$fld->title;
122 122
         }
123
-        $droplist .= (empty($text) === true ? '' : $text . '</i>]') . '</option>';
123
+        $droplist .= (empty($text) === true ? '' : $text.'</i>]').'</option>';
124 124
     }
125 125
 }
126 126
 
@@ -199,14 +199,14 @@  discard block
 block discarded – undo
199 199
                                     <label><?php echo $lang->get('icon'); ?></label>
200 200
                                     <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon" data-field="icon">
201 201
                                     <small class='form-text text-muted'>
202
-                                        <?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>
202
+                                        <?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>
203 203
                                     </small>
204 204
                                 </div>
205 205
                                 <div class="form-group">
206 206
                                     <label><?php echo $lang->get('icon_on_selection'); ?></label>
207 207
                                     <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon-selected" data-field="iconSelected">
208 208
                                     <small class='form-text text-muted'>
209
-                                        <?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>
209
+                                        <?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>
210 210
                                     </small>
211 211
                                 </div>
212 212
                                 <div class="form-group">
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                                 <th scope="col" min-width="200px"><?php echo $lang->get('group'); ?></th>
298 298
                                 <th scope="col" min-width="200px"><?php echo $lang->get('group_parent'); ?></th>
299 299
                                 <th scope="col" width="50px"><i class="fas fa-gavel fa-lg infotip" title="<?php echo $lang->get('password_strength'); ?>"></i></th>
300
-                                <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo $lang->get('group_pw_duration') . ' ' . $lang->get('group_pw_duration_tip'); ?>"></i></th>
300
+                                <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo $lang->get('group_pw_duration').' '.$lang->get('group_pw_duration_tip'); ?>"></i></th>
301 301
                                 <th scope="col" width="50px"><i class="fas fa-pen fa-lg infotip" title="<?php echo $lang->get('auth_creation_without_complexity'); ?>"></i></th>
302 302
                                 <th scope="col" width="50px"><i class="fas fa-edit fa-lg infotip" title="<?php echo $lang->get('auth_modification_without_complexity'); ?>"></i></th>
303 303
                                 <th scope="col" width="50px"><i class="fas fa-folder fa-lg infotip" title="<?php echo $lang->get('icon'); ?>"></i></th>
Please login to merge, or discard this patch.
pages/users.js.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('users') === false) {
71 71
     // Not allowed page
72 72
     $session->set('system-error_code', ERR_NOT_ALLOWED);
73
-    include $SETTINGS['cpassman_dir'] . '/error.php';
73
+    include $SETTINGS['cpassman_dir'].'/error.php';
74 74
     exit;
75 75
 }
76 76
 ?>
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
         if (store.get('teampassApplication').formUserAction === "add_new_user") {
303 303
             var data = {
304 304
                 'receipt': $('#form-email').val(),
305
-                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code');?>',
306
-                'body': '<?php echo $lang->get('email_body_new_user');?>',
305
+                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code'); ?>',
306
+                'body': '<?php echo $lang->get('email_body_new_user'); ?>',
307 307
                 'pre_replace' : {
308 308
                     '#code#' : store.get('teampassUser').admin_new_user_temporary_encryption_code,
309 309
                     '#login#' : store.get('teampassUser').admin_new_user_login,
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
         } else {
314 314
             var data = {
315 315
                 'receipt': $('#form-email').val(),
316
-                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code');?>',
317
-                'body': '<?php echo $lang->get('email_body_temporary_encryption_code');?>',
316
+                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code'); ?>',
317
+                'body': '<?php echo $lang->get('email_body_temporary_encryption_code'); ?>',
318 318
                 'pre_replace' : {
319 319
                     '#enc_code#' : store.get('teampassUser').admin_new_user_temporary_encryption_code,
320 320
                 }
@@ -567,14 +567,14 @@  discard block
 block discarded – undo
567 567
             }
568 568
             // Inform user
569 569
             $("#warningModalBody").html('<b><?php echo $lang->get('encryption_keys'); ?> - ' +
570
-                stepText + '</b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH;?>) + ']<span id="warningModalBody_extra">' + $nbItemsToConvert + '</span> ' +
570
+                stepText + '</b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH; ?>) + ']<span id="warningModalBody_extra">' + $nbItemsToConvert + '</span> ' +
571 571
                 '... <?php echo $lang->get('please_wait'); ?><i class="fas fa-spinner fa-pulse ml-3 text-primary"></i>');
572 572
 
573 573
             // If expected, show the OPT to the admin
574 574
             if (constVisibleOTP === true) {
575 575
                 toastr.info(
576
-                    '<?php echo $lang->get('show_encryption_code_to_admin');?> <div><input class="form-control form-item-control flex-nowrap" value="' + userTemporaryCode + '" readonly></div>'
577
-                    + '<br /><button type="button" class="btn clear"><?php echo $lang->get('close');?></button>',
576
+                    '<?php echo $lang->get('show_encryption_code_to_admin'); ?> <div><input class="form-control form-item-control flex-nowrap" value="' + userTemporaryCode + '" readonly></div>'
577
+                    + '<br /><button type="button" class="btn clear"><?php echo $lang->get('close'); ?></button>',
578 578
                     '<?php echo $lang->get('information'); ?>',
579 579
                     {
580 580
                         extendedTimeOut: 0,
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
             var data = {
594 594
                 action: step,
595 595
                 start: start,
596
-                length: <?php echo NUMBER_ITEMS_IN_BATCH;?>,
596
+                length: <?php echo NUMBER_ITEMS_IN_BATCH; ?>,
597 597
                 user_id: userId,
598 598
             }
599 599
             if (debugJavascript === true) {
@@ -1401,7 +1401,7 @@  discard block
 block discarded – undo
1401 1401
                         } else {
1402 1402
                             // Show icon or not
1403 1403
                             if ($('#user-disabled').prop('checked') === true) {
1404
-                                $('#user-login-'+userID).before('<i class="fas fa-user-slash infotip text-danger mr-2" title="<?php echo $lang->get('account_is_locked');?>" id="user-disable-'+userID+'"></i>');
1404
+                                $('#user-login-'+userID).before('<i class="fas fa-user-slash infotip text-danger mr-2" title="<?php echo $lang->get('account_is_locked'); ?>" id="user-disable-'+userID+'"></i>');
1405 1405
                             } else {
1406 1406
                                 $('#user-disable-'+userID).remove();
1407 1407
                             }
Please login to merge, or discard this patch.
pages/uploads.js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('uploads') === false) {
63 63
     // Not allowed page
64 64
     $session->set('system-error_code', ERR_NOT_ALLOWED);
65
-    include $SETTINGS['cpassman_dir'] . '/error.php';
65
+    include $SETTINGS['cpassman_dir'].'/error.php';
66 66
     exit;
67 67
 }
68 68
 ?>
Please login to merge, or discard this patch.
pages/emails.php 1 patch
Spacing   +2 added lines, -2 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('emails') === 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
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                     <div class="card-body">
245 245
                         <div id="unsent-emails">
246 246
                             <?php
247
-                            DB::query('SELECT * FROM ' . prefixTable('emails') . ' WHERE status = %s OR status = %s', 'not_sent', '');
247
+                            DB::query('SELECT * FROM '.prefixTable('emails').' WHERE status = %s OR status = %s', 'not_sent', '');
248 248
 echo str_replace('#nb_emails#', (string) DB::count(), $lang->get('email_send_backlog'));
249 249
                             ?>
250 250
                         </div>
Please login to merge, or discard this patch.
pages/statistics.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('statistics') === 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.