Passed
Pull Request — master (#4765)
by Nils
05:55
created
pages/users.php 1 patch
Spacing   +11 added lines, -11 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('users') === 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
 
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 // If administrator then all roles are shown
93 93
 // else only the Roles the users is associated to.
94 94
 if ((int) $session->get('user-admin') === 1) {
95
-    $optionsManagedBy .= '<option value="0">' . $lang->get('administrators_only') . '</option>';
95
+    $optionsManagedBy .= '<option value="0">'.$lang->get('administrators_only').'</option>';
96 96
 }
97 97
 
98 98
 $rows = DB::query(
99 99
     'SELECT id, title, creator_id
100
-    FROM ' . prefixTable('roles_title') . '
100
+    FROM ' . prefixTable('roles_title').'
101 101
     ORDER BY title ASC'
102 102
 );
103 103
 foreach ($rows as $record) {
104 104
     if ((int) $session->get('user-admin') === 1 || in_array($record['id'], $session->get('user-roles_array')) === true) {
105
-        $optionsManagedBy .= '<option value="' . $record['id'] . '">' . $lang->get('managers_of') . ' ' . addslashes($record['title']) . '</option>';
105
+        $optionsManagedBy .= '<option value="'.$record['id'].'">'.$lang->get('managers_of').' '.addslashes($record['title']).'</option>';
106 106
     }
107 107
     if (
108 108
         (int) $session->get('user-admin') === 1
109 109
         || (((int) $session->get('user-manager') === 1 || (int) $session->get('user-can_manage_all_users') === 1)
110 110
             && (in_array($record['id'], $userRoles) === true) || (int) $record['creator_id'] === (int) $session->get('user-id'))
111 111
     ) {
112
-        $optionsRoles .= '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>';
112
+        $optionsRoles .= '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>';
113 113
     }
114 114
 }
115 115
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         for ($y = 1; $y < $t->nlevel; ++$y) {
125 125
             $ident .= '&nbsp;&nbsp;';
126 126
         }
127
-        $foldersList .= '<option value="' . $t->id . '">' . $ident . htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8') . '</option>';
127
+        $foldersList .= '<option value="'.$t->id.'">'.$ident.htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8').'</option>';
128 128
     }
129 129
 }
130 130
 
@@ -161,13 +161,13 @@  discard block
 block discarded – undo
161 161
                         </button><?php
162 162
                                     echo isset($SETTINGS['ldap_mode']) === true && (int) $SETTINGS['ldap_mode'] === 1 && (int) $session->get('user-admin') === 1 ?
163 163
                                         '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="ldap-sync">
164
-                            <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization') . '
164
+                            <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization').'
165 165
                         </button>' : '';
166 166
                                     ?>
167 167
                         </button><?php
168 168
                                     echo isset($SETTINGS['oauth2_enabled']) === true && (int) $SETTINGS['oauth2_enabled'] === 1 && (int) $session->get('user-admin') === 1 ?
169 169
                                         '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="oauth2-sync">
170
-                            <i class="fa-solid fa-plug mr-2"></i>' . $lang->get('oauth2_synchronization') . '
170
+                            <i class="fa-solid fa-plug mr-2"></i>' . $lang->get('oauth2_synchronization').'
171 171
                         </button>' : '';
172 172
                                     ?>
173 173
                     </h3>
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
                 <!-- /.card-header -->
177 177
                 <div class="card-body form" id="users-list">
178
-                    <label><input type="checkbox" id="warnings_display" class="tp-action pointer" data-action="refresh"><span class="ml-2 pointer"><?php echo $lang->get('display_warning_icons');?></span></label>
178
+                    <label><input type="checkbox" id="warnings_display" class="tp-action pointer" data-action="refresh"><span class="ml-2 pointer"><?php echo $lang->get('display_warning_icons'); ?></span></label>
179 179
                     <table id="table-users" class="table table-striped nowrap table-responsive-sm">
180 180
                         <thead>
181 181
                             <tr>
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                                             <?php
240 240
                                             foreach (TP_PW_COMPLEXITY as $entry) {
241 241
                                                 echo '
242
-                                            <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>';
242
+                                            <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>';
243 243
                                             }
244 244
                                             ?>
245 245
                                         </select>
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
                                             <?php
317 317
                                             foreach (TP_PW_COMPLEXITY as $entry) {
318 318
                                                 echo '
319
-                                            <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>';
319
+                                            <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>';
320 320
                                             }
321 321
                                             ?>
322 322
                                         </select>
Please login to merge, or discard this patch.
sources/users.datatable.php 1 patch
Spacing   +15 added lines, -17 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 ) {
78 78
     // Not allowed page
79 79
     $session->set('system-error_code', ERR_NOT_ALLOWED);
80
-    include $SETTINGS['cpassman_dir'] . '/error.php';
80
+    include $SETTINGS['cpassman_dir'].'/error.php';
81 81
     exit;
82 82
 }
83 83
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     if (isset($order['column']) && preg_match('#^(asc|desc)$#i', $order['dir'])) {
129 129
         $columnIndex = filter_var($order['column'], FILTER_SANITIZE_NUMBER_INT);
130 130
         $dir = filter_var($order['dir'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);
131
-        $sOrder .= $aColumns[$columnIndex] . ' ' . $dir . ', ';
131
+        $sOrder .= $aColumns[$columnIndex].' '.$dir.', ';
132 132
     }
133 133
 
134 134
     $sOrder = substr_replace($sOrder, '', -2);
@@ -152,15 +152,15 @@  discard block
 block discarded – undo
152 152
 
153 153
 if ($letter !== '' && $letter !== 'None') {
154 154
     $sWhere .= ' AND (';
155
-    $sWhere .= $aColumns[1] . " LIKE '" . $letter . "%' OR ";
156
-    $sWhere .= $aColumns[2] . " LIKE '" . $letter . "%' OR ";
157
-    $sWhere .= $aColumns[3] . " LIKE '" . $letter . "%' ";
155
+    $sWhere .= $aColumns[1]." LIKE '".$letter."%' OR ";
156
+    $sWhere .= $aColumns[2]." LIKE '".$letter."%' OR ";
157
+    $sWhere .= $aColumns[3]." LIKE '".$letter."%' ";
158 158
     $sWhere .= ')';
159 159
 } elseif ($searchValue !== '') {
160 160
     $sWhere .= ' AND (';
161
-    $sWhere .= $aColumns[1] . " LIKE '" . $searchValue . "%' OR ";
162
-    $sWhere .= $aColumns[2] . " LIKE '" . $searchValue . "%' OR ";
163
-    $sWhere .= $aColumns[3] . " LIKE '" . $searchValue . "%' ";
161
+    $sWhere .= $aColumns[1]." LIKE '".$searchValue."%' OR ";
162
+    $sWhere .= $aColumns[2]." LIKE '".$searchValue."%' OR ";
163
+    $sWhere .= $aColumns[3]." LIKE '".$searchValue."%' ";
164 164
     $sWhere .= ')';
165 165
 }
166 166
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         // Check for existing lock
247 247
         $unlock_at = DB::queryFirstField(
248 248
             'SELECT MAX(unlock_at)
249
-             FROM ' . prefixTable('auth_failures') . '
249
+             FROM ' . prefixTable('auth_failures').'
250 250
              WHERE unlock_at > %s AND source = %s AND value = %s',
251 251
             date('Y-m-d H:i:s', time()),
252 252
             'login',
@@ -255,33 +255,31 @@  discard block
 block discarded – undo
255 255
 
256 256
         // Get some infos about user
257 257
         $userDisplayInfos = 
258
-            (isset($userDate['date']) ? '<i class=\"fas fa-calendar-day infotip text-info ml-2\" title=\"'.$lang->get('creation_date').': '.date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $userDate['date']).'\"></i>' : '')
258
+            (isset($userDate['date']) ? '<i class=\"fas fa-calendar-day infotip text-info ml-2\" title=\"'.$lang->get('creation_date').': '.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $userDate['date']).'\"></i>' : '')
259 259
             .
260 260
             ((int) $record['last_connexion'] > 0 ? '<i class=\"far fa-clock infotip text-info ml-2\" title=\"'.$lang->get('index_last_seen').": ".
261
-            date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['last_connexion']).'\"></i>' : '')
261
+            date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['last_connexion']).'\"></i>' : '')
262 262
             .
263 263
             ((int) $record['user_ip'] > 0 ? '<i class=\"fas fa-street-view infotip text-info ml-1\" title=\"'.$lang->get('ip').": ".($record['user_ip']).'\"></i>' : '')
264 264
             .
265 265
             (($record['auth_type'] === 'ldap' || $record['auth_type'] === 'oauth2') ? '<i class=\"far fa-address-book infotip text-warning ml-1\" title=\"'.$lang->get('managed_through_ad').'\"></i>' : '')
266 266
             .
267 267
             ((in_array($record['id'], [OTV_USER_ID, TP_USER_ID, SSH_USER_ID, API_USER_ID]) === false && (int) $record['admin'] !== 1 && ((int) $SETTINGS['duo'] === 1 || (int) $SETTINGS['google_authentication'] === 1)) ?
268
-                ((int) $record['mfa_enabled'] === 1 ? '' : '<i class=\"fa-solid fa-fingerprint infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('mfa_disabled_for_user').'\"></i>') :
269
-                ''
268
+                ((int) $record['mfa_enabled'] === 1 ? '' : '<i class=\"fa-solid fa-fingerprint infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('mfa_disabled_for_user').'\"></i>') : ''
270 269
                 )
271 270
             .
272 271
             (($unlock_at) ? '<i class=\"fas fa-solid text-red fa-lock infotip text-info ml-1\" title=\"'.$lang->get('bruteforce_unlock_at').$unlock_at.'\"></i>' : '');
273 272
         if ($request->query->filter('display_warnings', '', FILTER_VALIDATE_BOOLEAN) === true) {
274 273
             $userDisplayInfos .= '<br>'.
275 274
                 ((in_array($record['id'], [OTV_USER_ID, TP_USER_ID, SSH_USER_ID, API_USER_ID]) === false && (int) $record['admin'] !== 1 && is_null($record['keys_recovery_time']) === true) ? 
276
-                    '<i class=\"fa-solid fa-download infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('recovery_keys_not_downloaded').'\"></i>' :
277
-                    ''
275
+                    '<i class=\"fa-solid fa-download infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('recovery_keys_not_downloaded').'\"></i>' : ''
278 276
                 ).
279 277
                 ((in_array($record['id'], [OTV_USER_ID, TP_USER_ID, SSH_USER_ID, API_USER_ID]) === false && (int) $record['pw_passwordlib'] === 1) ? '<i class=\"fa-solid fa-person-walking-luggage infotip ml-1\" style=\"color:Tomato\" title=\"Old password encryption. Shall login to initialize.\"></i>' : '');
280 278
         }
281 279
 
282 280
         $sOutput .= '["<span data-id=\"'.$record['id'].'\" data-fullname=\"'.
283
-            (empty($record['name']) === false ? htmlentities($record['name'], ENT_QUOTES|ENT_SUBSTITUTE|ENT_DISALLOWED) : '').' '.
284
-            (empty($record['lastname']) === false ? htmlentities($record['lastname'], ENT_QUOTES|ENT_SUBSTITUTE|ENT_DISALLOWED) : '').
281
+            (empty($record['name']) === false ? htmlentities($record['name'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED) : '').' '.
282
+            (empty($record['lastname']) === false ? htmlentities($record['lastname'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED) : '').
285 283
             '\" data-auth-type=\"'.$record['auth_type'].'\" data-special=\"'.$record['special'].'\" data-mfa-enabled=\"'.$record['mfa_enabled'].'\" data-otp-provided=\"'.(isset($record['otp_provided']) === true ? $record['otp_provided'] : '').'\"></span>", ';
286 284
         //col2
287 285
         $sOutput .= '"'.
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +181 added lines, -181 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 csrfProtector::init();
73 73
 
74 74
 // Load functions
75
-require_once __DIR__. '/includes/config/include.php';
75
+require_once __DIR__.'/includes/config/include.php';
76 76
 require_once __DIR__.'/sources/main.functions.php';
77 77
 
78 78
 // init
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 $SETTINGS = $antiXss->xss_clean($SETTINGS);
107 107
 
108 108
 // Load Core library
109
-require_once $SETTINGS['cpassman_dir'] . '/sources/core.php';
109
+require_once $SETTINGS['cpassman_dir'].'/sources/core.php';
110 110
 // Prepare POST variables
111 111
 $post_language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
112 112
 $session_user_language = $session->get('user-language');
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 if ($hasSuperPrivilege > 0) {
161 161
     if (defined('MYSQL_LOG') && MYSQL_LOG === true) {
162 162
         DB::query("SET GLOBAL general_log = 'ON'");
163
-        DB::query("SET GLOBAL general_log_file = " . (defined('MYSQL_LOG_FILE') ? MYSQL_LOG_FILE : "'/var/log/teampass_mysql_query.log'"));
163
+        DB::query("SET GLOBAL general_log_file = ".(defined('MYSQL_LOG_FILE') ? MYSQL_LOG_FILE : "'/var/log/teampass_mysql_query.log'"));
164 164
     } else {
165 165
         DB::query("SET GLOBAL general_log = 'OFF'");
166 166
     }
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
     //get default language
172 172
     $dataLanguage = DB::queryFirstRow(
173 173
         'SELECT m.valeur AS valeur, l.flag AS flag
174
-        FROM ' . prefixTable('misc') . ' AS m
175
-        INNER JOIN ' . prefixTable('languages') . ' AS l ON (m.valeur = l.name)
174
+        FROM ' . prefixTable('misc').' AS m
175
+        INNER JOIN ' . prefixTable('languages').' AS l ON (m.valeur = l.name)
176 176
         WHERE m.type=%s_type AND m.intitule=%s_intitule',
177 177
         [
178 178
             'type' => 'admin',
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $session_user_language = $SETTINGS['default_language'];
204 204
     }
205 205
 }
206
-$lang = new Language($session_user_language, __DIR__. '/includes/language/'); 
206
+$lang = new Language($session_user_language, __DIR__.'/includes/language/'); 
207 207
 
208 208
 if (isset($SETTINGS['cpassman_dir']) === false || $SETTINGS['cpassman_dir'] === '') {
209 209
     $SETTINGS['cpassman_dir'] = __DIR__;
@@ -277,29 +277,29 @@  discard block
 block discarded – undo
277 277
     </script>
278 278
 
279 279
     <!-- IonIcons -->
280
-    <link rel="stylesheet" href="includes/css/ionicons.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
280
+    <link rel="stylesheet" href="includes/css/ionicons.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
281 281
     <!-- Theme style -->
282
-    <link rel="stylesheet" href="plugins/adminlte/css/adminlte.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
283
-    <link rel="stylesheet" href="plugins/pace-progress/themes/corner-indicator.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
284
-    <link rel="stylesheet" href="plugins/select2/css/select2.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
285
-    <link rel="stylesheet" href="plugins/select2/theme/select2-bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
282
+    <link rel="stylesheet" href="plugins/adminlte/css/adminlte.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
283
+    <link rel="stylesheet" href="plugins/pace-progress/themes/corner-indicator.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
284
+    <link rel="stylesheet" href="plugins/select2/css/select2.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
285
+    <link rel="stylesheet" href="plugins/select2/theme/select2-bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
286 286
     <!-- Theme style -->
287
-    <link rel="stylesheet" href="includes/css/teampass.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
287
+    <link rel="stylesheet" href="includes/css/teampass.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
288 288
     <!-- Google Font: Source Sans Pro -->
289
-    <link rel="stylesheet" type="text/css" href="includes/fonts/fonts.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
289
+    <link rel="stylesheet" type="text/css" href="includes/fonts/fonts.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
290 290
     <!-- Altertify -->
291
-    <link rel="stylesheet" href="plugins/alertifyjs/css/alertify.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
292
-    <link rel="stylesheet" href="plugins/alertifyjs/css/themes/bootstrap.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
291
+    <link rel="stylesheet" href="plugins/alertifyjs/css/alertify.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
292
+    <link rel="stylesheet" href="plugins/alertifyjs/css/themes/bootstrap.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
293 293
     <!-- Toastr -->
294
-    <link rel="stylesheet" href="plugins/toastr/toastr.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
294
+    <link rel="stylesheet" href="plugins/toastr/toastr.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
295 295
     <!-- favicon -->
296
-    <link rel="shortcut icon" type="image/png" href="<?php echo $favicon;?>"/>
296
+    <link rel="shortcut icon" type="image/png" href="<?php echo $favicon; ?>"/>
297 297
     <!-- manifest (PWA) -->
298
-    <link rel="manifest" href="manifest.json?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
298
+    <link rel="manifest" href="manifest.json?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
299 299
     <!-- Custom style -->
300 300
     <?php
301
-    if (file_exists(__DIR__ . '/includes/css/custom.css') === true) {?>
302
-        <link rel="stylesheet" href="includes/css/custom.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
301
+    if (file_exists(__DIR__.'/includes/css/custom.css') === true) {?>
302
+        <link rel="stylesheet" href="includes/css/custom.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
303 303
     <?php
304 304
     } ?>
305 305
 </head>
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
                         <div class="dropdown show">
347 347
                             <a class="btn btn-primary dropdown-toggle" href="#" data-toggle="dropdown">
348 348
                                 <?php
349
-                                    echo $session_name . '&nbsp;' . $session_lastname; ?>
349
+                                    echo $session_name.'&nbsp;'.$session_lastname; ?>
350 350
                             </a>
351 351
 
352 352
                             <div class="dropdown-menu dropdown-menu-right">
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                                     </a>
371 371
                                 <?php
372 372
                                     } ?>
373
-                                <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : '';?>" href="#" data-name="generate-new_keys">
373
+                                <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : ''; ?>" href="#" data-name="generate-new_keys">
374 374
                                     <i class="fa-solid fa-spray-can-sparkles fa-fw mr-2"></i><?php echo $lang->get('generate_new_keys'); ?>
375 375
                                 </a>
376 376
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             <!-- Main Sidebar Container -->
405 405
             <aside class="main-sidebar sidebar-dark-primary elevation-4">
406 406
                 <!-- Brand Logo -->
407
-                <a href="<?php echo $cpassman_url . '/index.php?page=' . ((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link">
407
+                <a href="<?php echo $cpassman_url.'/index.php?page='.((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link">
408 408
                     <img src="includes/images/teampass-logo2-home.png" alt="Teampass Logo" class="brand-image">
409 409
                     <span class="brand-text font-weight-light"><?php echo TP_TOOL_NAME; ?></span>
410 410
                 </a>
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
                         <a href="#" data-name="items" class="nav-link', $get['page'] === 'items' ? ' active' : '', '">
423 423
                         <i class="nav-icon fa-solid fa-key"></i>
424 424
                         <p>
425
-                            ' . $lang->get('pw') . '
425
+                            ' . $lang->get('pw').'
426 426
                         </p>
427 427
                         </a>
428 428
                     </li>';
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                         <a href="#" data-name="import" class="nav-link', $get['page'] === 'import' ? ' active' : '', '">
436 436
                         <i class="nav-icon fa-solid fa-file-import"></i>
437 437
                         <p>
438
-                            ' . $lang->get('import') . '
438
+                            ' . $lang->get('import').'
439 439
                         </p>
440 440
                         </a>
441 441
                     </li>';
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                         <a href="#" data-name="export" class="nav-link', $get['page'] === 'export' ? ' active' : '', '">
457 457
                         <i class="nav-icon fa-solid fa-file-export"></i>
458 458
                         <p>
459
-                            ' . $lang->get('export') . '
459
+                            ' . $lang->get('export').'
460 460
                         </p>
461 461
                         </a>
462 462
                     </li>';
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
                         <a href="#" data-name="search" class="nav-link', $get['page'] === 'search' ? ' active' : '', '">
484 484
                         <i class="nav-icon fa-solid fa-search"></i>
485 485
                         <p>
486
-                            ' . $lang->get('find') . '
486
+                            ' . $lang->get('find').'
487 487
                         </p>
488 488
                         </a>
489 489
                     </li>';
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
                         <a href="#" data-name="favourites" class="nav-link', $get['page'] === 'favourites' ? ' active' : '', '">
500 500
                         <i class="nav-icon fa-solid fa-star"></i>
501 501
                         <p>
502
-                            ' . $lang->get('favorites') . '
502
+                            ' . $lang->get('favorites').'
503 503
                         </p>
504 504
                         </a>
505 505
                     </li>';
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
                         <a href="#" data-name="suggestion" class="nav-link', $get['page'] === 'suggestion' ? ' active' : '', '">
530 530
                         <i class="nav-icon fa-solid fa-lightbulb"></i>
531 531
                         <p>
532
-                            ' . $lang->get('suggestion_menu') . '
532
+                            ' . $lang->get('suggestion_menu').'
533 533
                         </p>
534 534
                         </a>
535 535
                     </li>';
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
                         <a href="#" data-name="admin" class="nav-link', $get['page'] === 'admin' ? ' active' : '', '">
543 543
                         <i class="nav-icon fa-solid fa-info"></i>
544 544
                         <p>
545
-                            ' . $lang->get('admin_main') . '
545
+                            ' . $lang->get('admin_main').'
546 546
                         </p>
547 547
                         </a>
548 548
                     </li>
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
                         <a href="#" class="nav-link">
551 551
                             <i class="nav-icon fa-solid fa-wrench"></i>
552 552
                             <p>
553
-                                ' . $lang->get('admin_settings') . '
553
+                                ' . $lang->get('admin_settings').'
554 554
                                 <i class="fa-solid fa-angle-left right"></i>
555 555
                             </p>
556 556
                         </a>
@@ -558,63 +558,63 @@  discard block
 block discarded – undo
558 558
                             <li class="nav-item">
559 559
                                 <a href="#" data-name="options" class="nav-link', $get['page'] === 'options' ? ' active' : '', '">
560 560
                                     <i class="fa-solid fa-check-double nav-icon"></i>
561
-                                    <p>' . $lang->get('options') . '</p>
561
+                                    <p>' . $lang->get('options').'</p>
562 562
                                 </a>
563 563
                             </li>
564 564
                             <li class="nav-item">
565 565
                                 <a href="#" data-name="2fa" class="nav-link', $get['page'] === '2fa' ? ' active' : '', '">
566 566
                                     <i class="fa-solid fa-qrcode nav-icon"></i>
567
-                                    <p>' . $lang->get('mfa_short') . '</p>
567
+                                    <p>' . $lang->get('mfa_short').'</p>
568 568
                                 </a>
569 569
                             </li>
570 570
                             <li class="nav-item">
571 571
                                 <a href="#" data-name="api" class="nav-link', $get['page'] === 'api' ? ' active' : '', '">
572 572
                                     <i class="fa-solid fa-cubes nav-icon"></i>
573
-                                    <p>' . $lang->get('api') . '</p>
573
+                                    <p>' . $lang->get('api').'</p>
574 574
                                 </a>
575 575
                             </li>
576 576
                             <li class="nav-item">
577 577
                                 <a href="#" data-name="backups" class="nav-link', $get['page'] === 'backups' ? ' active' : '', '">
578 578
                                     <i class="fa-solid fa-database nav-icon"></i>
579
-                                    <p>' . $lang->get('backups') . '</p>
579
+                                    <p>' . $lang->get('backups').'</p>
580 580
                                 </a>
581 581
                             </li>
582 582
                             <li class="nav-item">
583 583
                                 <a href="#" data-name="emails" class="nav-link', $get['page'] === 'emails' ? ' active' : '', '">
584 584
                                     <i class="fa-solid fa-envelope nav-icon"></i>
585
-                                    <p>' . $lang->get('emails') . '</p>
585
+                                    <p>' . $lang->get('emails').'</p>
586 586
                                 </a>
587 587
                             </li>
588 588
                             <li class="nav-item">
589 589
                                 <a href="#" data-name="fields" class="nav-link', $get['page'] === 'fields' ? ' active' : '', '">
590 590
                                     <i class="fa-solid fa-keyboard nav-icon"></i>
591
-                                    <p>' . $lang->get('fields') . '</p>
591
+                                    <p>' . $lang->get('fields').'</p>
592 592
                                 </a>
593 593
                             </li>
594 594
                             <li class="nav-item">
595 595
                                 <a href="#" data-name="ldap" class="nav-link', $get['page'] === 'ldap' ? ' active' : '', '">
596 596
                                     <i class="fa-solid fa-id-card nav-icon"></i>
597
-                                    <p>' . $lang->get('ldap') . '</p>
597
+                                    <p>' . $lang->get('ldap').'</p>
598 598
                                 </a>
599 599
                             </li>
600 600
 
601 601
                             <li class="nav-item">
602 602
                                 <a href="#" data-name="oauth" class="nav-link', $get['page'] === 'oauth' ? ' active' : '', '">
603 603
                                     <i class="fa-solid fa-plug nav-icon"></i>
604
-                                    <p>' . $lang->get('oauth') . '</p>
604
+                                    <p>' . $lang->get('oauth').'</p>
605 605
                                 </a>
606 606
                             </li>
607 607
                             
608 608
                             <li class="nav-item">
609 609
                                 <a href="#" data-name="uploads" class="nav-link', $get['page'] === 'uploads' ? ' active' : '', '">
610 610
                                     <i class="fa-solid fa-file-upload nav-icon"></i>
611
-                                    <p>' . $lang->get('uploads') . '</p>
611
+                                    <p>' . $lang->get('uploads').'</p>
612 612
                                 </a>
613 613
                             </li>
614 614
                             <li class="nav-item">
615 615
                                 <a href="#" data-name="statistics" class="nav-link', $get['page'] === 'statistics' ? ' active' : '', '">
616 616
                                     <i class="fa-solid fa-chart-bar nav-icon"></i>
617
-                                    <p>' . $lang->get('statistics') . '</p>
617
+                                    <p>' . $lang->get('statistics').'</p>
618 618
                                 </a>
619 619
                             </li>
620 620
                         </ul>
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
                     <li class="nav-item">
626 626
                         <a href="#" data-name="tasks" class="nav-link', $get['page'] === 'tasks' ? ' active' : '', '">
627 627
                         <i class="fa-solid fa-tasks nav-icon"></i>
628
-                        <p>' . $lang->get('tasks') . '</p>
628
+                        <p>' . $lang->get('tasks').'</p>
629 629
                         </a>
630 630
                     </li>';
631 631
         }
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
                         <a href="#" data-name="tools" class="nav-link', $get['page'] === 'tools' ? ' active' : '', '">
637 637
                         <i class="nav-icon fa-solid fa-person-drowning"></i>
638 638
                         <p>
639
-                            ' . $lang->get('tools') . '
639
+                            ' . $lang->get('tools').'
640 640
                         </p>
641 641
                         </a>
642 642
                     </li>';
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
                         <a href="#" data-name="import" class="nav-link', $get['page'] === 'import' ? ' active' : '', '">
647 647
                         <i class="nav-icon fa-solid fa-file-import"></i>
648 648
                         <p>
649
-                            ' . $lang->get('import') . '
649
+                            ' . $lang->get('import').'
650 650
                         </p>
651 651
                         </a>
652 652
                     </li>';
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
                         <a href="#" data-name="folders" class="nav-link', $get['page'] === 'folders' ? ' active' : '', '">
663 663
                         <i class="nav-icon fa-solid fa-folder-open"></i>
664 664
                         <p>
665
-                            ' . $lang->get('folders') . '
665
+                            ' . $lang->get('folders').'
666 666
                         </p>
667 667
                         </a>
668 668
                     </li>
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
                         <a href="#" data-name="roles" class="nav-link', $get['page'] === 'roles' ? ' active' : '', '">
671 671
                         <i class="nav-icon fa-solid fa-graduation-cap"></i>
672 672
                         <p>
673
-                            ' . $lang->get('roles') . '
673
+                            ' . $lang->get('roles').'
674 674
                         </p>
675 675
                         </a>
676 676
                     </li>
@@ -678,38 +678,38 @@  discard block
 block discarded – undo
678 678
                         <a href="#" data-name="users" class="nav-link', $get['page'] === 'users' ? ' active' : '', '">
679 679
                         <i class="nav-icon fa-solid fa-users"></i>
680 680
                         <p>
681
-                            ' . $lang->get('users') . '
681
+                            ' . $lang->get('users').'
682 682
                         </p>
683 683
                         </a>
684 684
                     </li>
685 685
                     <li class="nav-item has-treeview', $menuUtilities === true ? ' menu-open' : '', '">
686 686
                         <a href="#" class="nav-link">
687 687
                         <i class="nav-icon fa-solid fa-cubes"></i>
688
-                        <p>' . $lang->get('admin_views') . '<i class="fa-solid fa-angle-left right"></i></p>
688
+                        <p>' . $lang->get('admin_views').'<i class="fa-solid fa-angle-left right"></i></p>
689 689
                         </a>
690 690
                         <ul class="nav nav-treeview">
691 691
                             <li class="nav-item">
692 692
                                 <a href="#" data-name="utilities.renewal" class="nav-link', $get['page'] === 'utilities.renewal' ? ' active' : '', '">
693 693
                                 <i class="far fa-calendar-alt nav-icon"></i>
694
-                                <p>' . $lang->get('renewal') . '</p>
694
+                                <p>' . $lang->get('renewal').'</p>
695 695
                                 </a>
696 696
                             </li>
697 697
                             <li class="nav-item">
698 698
                                 <a href="#" data-name="utilities.deletion" class="nav-link', $get['page'] === 'utilities.deletion' ? ' active' : '', '">
699 699
                                 <i class="fa-solid fa-trash-alt nav-icon"></i>
700
-                                <p>' . $lang->get('deletion') . '</p>
700
+                                <p>' . $lang->get('deletion').'</p>
701 701
                                 </a>
702 702
                             </li>
703 703
                             <li class="nav-item">
704 704
                                 <a href="#" data-name="utilities.logs" class="nav-link', $get['page'] === 'utilities.logs' ? ' active' : '', '">
705 705
                                 <i class="fa-solid fa-history nav-icon"></i>
706
-                                <p>' . $lang->get('logs') . '</p>
706
+                                <p>' . $lang->get('logs').'</p>
707 707
                                 </a>
708 708
                             </li>
709 709
                             <li class="nav-item">
710 710
                                 <a href="#" data-name="utilities.database" class="nav-link', $get['page'] === 'utilities.database' ? ' active' : '', '">
711 711
                                 <i class="fa-solid fa-database nav-icon"></i>
712
-                                <p>' . $lang->get('database') . '</p>
712
+                                <p>' . $lang->get('database').'</p>
713 713
                                 </a>
714 714
                             </li>
715 715
                         </ul>
@@ -720,10 +720,10 @@  discard block
 block discarded – undo
720 720
                     <!-- /.sidebar-menu -->
721 721
                 <div class="menu-footer">
722 722
                     <div class="" id="sidebar-footer">
723
-                        <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo htmlspecialchars($lang->get('server_time') . ' ' .
724
-                            date($date_format, (int) $server['request_time']) . ' - ' .
723
+                        <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo htmlspecialchars($lang->get('server_time').' '.
724
+                            date($date_format, (int) $server['request_time']).' - '.
725 725
                             date($time_format, (int) $server['request_time']), ENT_QUOTES, 'UTF-8'); ?>"></i>
726
-                        <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online . ' ' . $lang->get('users_online'); ?>"></i>
726
+                        <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online.' '.$lang->get('users_online'); ?>"></i>
727 727
                         <a href="<?php echo DOCUMENTATION_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-book mr-2 infotip" title="<?php echo $lang->get('documentation_canal'); ?>"></i></a>
728 728
                         <a href="<?php echo HELP_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-life-ring mr-2 infotip" title="<?php echo $lang->get('admin_help'); ?>"></i></a>
729 729
                         <?php if ($session_user_admin === 1) : ?><i class="fa-solid fa-bug infotip pointer text-info" title="<?php echo $lang->get('bugs_page'); ?>" onclick="generateBugReport()"></i><?php endif; ?>
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
                                 </div>
875 875
                                 <div class="mt-3">                                    
876 876
                                     <label>
877
-                                        <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password');?></span>
877
+                                        <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password'); ?></span>
878 878
                                         <input type="checkbox" id="dialog-admin-change-user-password-do-show-password" class="pointer">
879 879
                                     </label>
880 880
                                 </div>
@@ -1041,34 +1041,34 @@  discard block
 block discarded – undo
1041 1041
                     if ($get['page'] === 'items') {
1042 1042
                         // SHow page with Items
1043 1043
                         if ((int) $session_user_admin !== 1) {
1044
-                            include $SETTINGS['cpassman_dir'] . '/pages/items.php';
1044
+                            include $SETTINGS['cpassman_dir'].'/pages/items.php';
1045 1045
                         } elseif ((int) $session_user_admin === 1) {
1046
-                            include $SETTINGS['cpassman_dir'] . '/pages/admin.php';
1046
+                            include $SETTINGS['cpassman_dir'].'/pages/admin.php';
1047 1047
                         } else {
1048 1048
                             $session->set('system-error_code', ERR_NOT_ALLOWED);
1049 1049
                             //not allowed page
1050
-                            include $SETTINGS['cpassman_dir'] . '/error.php';
1050
+                            include $SETTINGS['cpassman_dir'].'/error.php';
1051 1051
                         }
1052 1052
                     } elseif (in_array($get['page'], array_keys($mngPages)) === true) {
1053 1053
                         // Define if user is allowed to see management pages
1054 1054
                         if ($session_user_admin === 1) {
1055 1055
                             // deepcode ignore FileInclusion: $get['page'] is secured through usage of array_keys test bellow
1056
-                            include $SETTINGS['cpassman_dir'] . '/pages/' . basename($mngPages[$get['page']]);
1056
+                            include $SETTINGS['cpassman_dir'].'/pages/'.basename($mngPages[$get['page']]);
1057 1057
                         } elseif ($session_user_manager === 1 || $session_user_human_resources === 1) {
1058 1058
                             if ($get['page'] === 'manage_main' || $get['page'] === 'manage_settings'
1059 1059
                             ) {
1060 1060
                                 $session->set('system-error_code', ERR_NOT_ALLOWED);
1061 1061
                                 //not allowed page
1062
-                                include $SETTINGS['cpassman_dir'] . '/error.php';
1062
+                                include $SETTINGS['cpassman_dir'].'/error.php';
1063 1063
                             }
1064 1064
                         } else {
1065 1065
                             $session->set('system-error_code', ERR_NOT_ALLOWED);
1066 1066
                             //not allowed page
1067
-                            include $SETTINGS['cpassman_dir'] . '/error.php';
1067
+                            include $SETTINGS['cpassman_dir'].'/error.php';
1068 1068
                         }
1069
-                    } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'] . '/pages/' . $get['page'] . '.php') === true) {
1069
+                    } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'].'/pages/'.$get['page'].'.php') === true) {
1070 1070
                         // deepcode ignore FileInclusion: $get['page'] is tested against file_exists just below
1071
-                        include $SETTINGS['cpassman_dir'] . '/pages/' . basename($get['page'] . '.php');
1071
+                        include $SETTINGS['cpassman_dir'].'/pages/'.basename($get['page'].'.php');
1072 1072
                     } else {
1073 1073
                         $session->set('system-array_roles', ERR_NOT_EXIST);
1074 1074
                         //page doesn't exist
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
             <footer class="main-footer">
1098 1098
                 <!-- To the right -->
1099 1099
                 <div class="float-right d-none d-sm-inline">
1100
-                    <?php echo $lang->get('version_alone'); ?>&nbsp;<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>
1100
+                    <?php echo $lang->get('version_alone'); ?>&nbsp;<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>
1101 1101
                 </div>
1102 1102
                 <!-- Default to the left -->
1103 1103
                 <strong>Copyright &copy; <?php echo TP_COPYRIGHT; ?> <a href="<?php echo TEAMPASS_URL; ?>"><?php echo TP_TOOL_NAME; ?></a>.</strong> All rights reserved.
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
         echo '
1112 1112
 <input type="hidden" id="temps_restant" value="', $session->get('user-session_duration') ?? '', '" />';
1113 1113
 // display an item in the context of OTV link
1114
-} elseif ((null === $session->get('user-validite_pw')|| empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true)
1114
+} elseif ((null === $session->get('user-validite_pw') || empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true)
1115 1115
     && empty($get['otv']) === false
1116 1116
 ) {
1117 1117
     // case where one-shot viewer
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
                 FILTER_SANITIZE_URL
1131 1131
             )
1132 1132
         );
1133
-        include $SETTINGS['cpassman_dir'] . '/error.php';
1133
+        include $SETTINGS['cpassman_dir'].'/error.php';
1134 1134
     }
1135 1135
 } elseif (//(empty($session->get('user-id')) === false && $session->get('user-id') !== null) ||
1136 1136
         empty($session->get('user-id')) === true
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
     }
1156 1156
     
1157 1157
     // LOGIN form  
1158
-    include $SETTINGS['cpassman_dir'] . '/includes/core/login.php';
1158
+    include $SETTINGS['cpassman_dir'].'/includes/core/login.php';
1159 1159
     
1160 1160
 } else {
1161 1161
     // Clear session
@@ -1188,153 +1188,153 @@  discard block
 block discarded – undo
1188 1188
     <!-- REQUIRED SCRIPTS -->
1189 1189
 
1190 1190
     <!-- Font Awesome Icons -->
1191
-    <link href="plugins/fontawesome-free-6/css/fontawesome.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1192
-    <link href="plugins/fontawesome-free-6/css/solid.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1193
-    <link href="plugins/fontawesome-free-6/css/regular.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1194
-    <link href="plugins/fontawesome-free-6/css/brands.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1195
-    <link href="plugins/fontawesome-free-6/css/v5-font-face.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet" /> 
1191
+    <link href="plugins/fontawesome-free-6/css/fontawesome.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1192
+    <link href="plugins/fontawesome-free-6/css/solid.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1193
+    <link href="plugins/fontawesome-free-6/css/regular.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1194
+    <link href="plugins/fontawesome-free-6/css/brands.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1195
+    <link href="plugins/fontawesome-free-6/css/v5-font-face.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet" /> 
1196 1196
     <!-- jQuery -->
1197
-    <script src="plugins/jquery/jquery.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1198
-    <script src="plugins/jquery/jquery.cookie.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1197
+    <script src="plugins/jquery/jquery.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1198
+    <script src="plugins/jquery/jquery.cookie.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1199 1199
     <!-- jQuery UI -->
1200
-    <script src="plugins/jqueryUI/jquery-ui.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1201
-    <link rel="stylesheet" href="plugins/jqueryUI/jquery-ui.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1200
+    <script src="plugins/jqueryUI/jquery-ui.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1201
+    <link rel="stylesheet" href="plugins/jqueryUI/jquery-ui.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1202 1202
     <!-- Popper -->
1203
-    <script src="plugins/popper/umd/popper.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1203
+    <script src="plugins/popper/umd/popper.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1204 1204
     <!-- Bootstrap -->
1205
-    <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1205
+    <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1206 1206
     <!-- AdminLTE -->
1207
-    <script src="plugins/adminlte/js/adminlte.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1207
+    <script src="plugins/adminlte/js/adminlte.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1208 1208
     <!-- Altertify -->
1209 1209
     <!--<script type="text/javascript" src="plugins/alertifyjs/alertify.min.js"></script>-->
1210 1210
     <!-- Toastr -->
1211
-    <script type="text/javascript" src="plugins/toastr/toastr.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1211
+    <script type="text/javascript" src="plugins/toastr/toastr.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1212 1212
     <!-- STORE.JS -->
1213
-    <script type="text/javascript" src="plugins/store.js/dist/store.everything.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1213
+    <script type="text/javascript" src="plugins/store.js/dist/store.everything.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1214 1214
     <!-- cryptojs-aesphp -->
1215
-    <script type="text/javascript" src="includes/libraries/cryptojs/crypto-js.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1216
-    <script type="text/javascript" src="includes/libraries/cryptojs/encryption.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1215
+    <script type="text/javascript" src="includes/libraries/cryptojs/crypto-js.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1216
+    <script type="text/javascript" src="includes/libraries/cryptojs/encryption.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1217 1217
     <!-- pace -->
1218
-    <script type="text/javascript" data-pace-options='{ "ajax": true, "eventLag": false }' src="plugins/pace-progress/pace.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1218
+    <script type="text/javascript" data-pace-options='{ "ajax": true, "eventLag": false }' src="plugins/pace-progress/pace.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1219 1219
     <!-- select2 -->
1220
-    <script type="text/javascript" src="plugins/select2/js/select2.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1220
+    <script type="text/javascript" src="plugins/select2/js/select2.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1221 1221
     <!-- simplePassMeter -->
1222
-    <link rel="stylesheet" href="plugins/simplePassMeter/simplePassMeter.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
1223
-    <script type="text/javascript" src="plugins/simplePassMeter/simplePassMeter.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1222
+    <link rel="stylesheet" href="plugins/simplePassMeter/simplePassMeter.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
1223
+    <script type="text/javascript" src="plugins/simplePassMeter/simplePassMeter.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1224 1224
     <!-- platform -->
1225
-    <script type="text/javascript" src="plugins/platform/platform.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1225
+    <script type="text/javascript" src="plugins/platform/platform.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1226 1226
     <!-- radiobuttons -->
1227
-    <link rel="stylesheet" href="plugins/radioforbuttons/bootstrap-buttons.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
1228
-    <script type="text/javascript" src="plugins/radioforbuttons/jquery.radiosforbuttons.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1227
+    <link rel="stylesheet" href="plugins/radioforbuttons/bootstrap-buttons.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
1228
+    <script type="text/javascript" src="plugins/radioforbuttons/jquery.radiosforbuttons.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1229 1229
     <!-- ICHECK -->
1230 1230
     <!--<link rel="stylesheet" href="./plugins/icheck-material/icheck-material.min.css">-->
1231
-    <link rel="stylesheet" href="./plugins/icheck/skins/all.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1232
-    <script type="text/javascript" src="./plugins/icheck/icheck.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1231
+    <link rel="stylesheet" href="./plugins/icheck/skins/all.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1232
+    <script type="text/javascript" src="./plugins/icheck/icheck.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1233 1233
     <!-- bootstrap-add-clear -->
1234
-    <script type="text/javascript" src="plugins/bootstrap-add-clear/bootstrap-add-clear.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1234
+    <script type="text/javascript" src="plugins/bootstrap-add-clear/bootstrap-add-clear.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1235 1235
     <!-- DOMPurify -->
1236
-    <script type="text/javascript" src="plugins/DOMPurify/purify.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1236
+    <script type="text/javascript" src="plugins/DOMPurify/purify.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1237 1237
 
1238 1238
     <?php
1239 1239
     $get['page'] = $request->query->filter('page', null, FILTER_SANITIZE_SPECIAL_CHARS);
1240 1240
     if ($menuAdmin === true) {
1241 1241
         ?>
1242
-        <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1243
-        <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1244
-        <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1242
+        <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1243
+        <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1244
+        <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1245 1245
         <!-- InputMask -->
1246
-        <script src="./plugins/inputmask/jquery.inputmask.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1246
+        <script src="./plugins/inputmask/jquery.inputmask.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1247 1247
         <!-- Sortable -->
1248 1248
         <!--<script src="./plugins/sortable/jquery.sortable.js"></script>-->
1249 1249
         <!-- PLUPLOAD -->
1250
-        <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1250
+        <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1251 1251
         <!-- DataTables -->
1252
-        <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1253
-        <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1254
-        <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1255
-        <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1256
-        <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1257
-        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1258
-        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1259
-        <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1260
-        <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1261
-        <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1252
+        <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1253
+        <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1254
+        <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1255
+        <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1256
+        <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1257
+        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1258
+        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1259
+        <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1260
+        <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1261
+        <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1262 1262
     <?php
1263 1263
     } elseif (isset($get['page']) === true) {
1264 1264
         if (in_array($get['page'], ['items', 'import']) === true) {
1265 1265
             ?>
1266
-            <link rel="stylesheet" href="./plugins/jstree/themes/default/style.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1267
-            <link rel="stylesheet" href="./plugins/jstree/themes/default-dark/style.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1268
-            <script src="./plugins/jstree/jstree.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1266
+            <link rel="stylesheet" href="./plugins/jstree/themes/default/style.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1267
+            <link rel="stylesheet" href="./plugins/jstree/themes/default-dark/style.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1268
+            <script src="./plugins/jstree/jstree.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1269 1269
             <!-- countdownTimer -->
1270
-            <script src="./plugins/jquery.countdown360/jquery.countdown360.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1270
+            <script src="./plugins/jquery.countdown360/jquery.countdown360.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1271 1271
             <!-- SUMMERNOTE -->
1272
-            <link rel="stylesheet" href="./plugins/summernote/summernote-bs4.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1273
-            <script src="./plugins/summernote/summernote-bs4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1272
+            <link rel="stylesheet" href="./plugins/summernote/summernote-bs4.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1273
+            <script src="./plugins/summernote/summernote-bs4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1274 1274
             <!-- date-picker -->
1275
-            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1276
-            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1275
+            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1276
+            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1277 1277
             <!-- time-picker -->
1278
-            <link rel="stylesheet" href="./plugins/timepicker/bootstrap-timepicker.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1279
-            <script src="./plugins/timepicker/bootstrap-timepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1278
+            <link rel="stylesheet" href="./plugins/timepicker/bootstrap-timepicker.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1279
+            <script src="./plugins/timepicker/bootstrap-timepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1280 1280
             <!-- PLUPLOAD -->
1281
-            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1281
+            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1282 1282
             <!-- VALIDATE -->
1283
-            <script type="text/javascript" src="plugins/jquery-validation/jquery.validate.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1283
+            <script type="text/javascript" src="plugins/jquery-validation/jquery.validate.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1284 1284
             <!-- PWSTRENGHT -->
1285
-            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1286
-            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1285
+            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1286
+            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1287 1287
             <!-- TOGGLE -->
1288
-            <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1289
-            <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1290
-            <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1288
+            <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1289
+            <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1290
+            <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1291 1291
         <?php
1292 1292
         } elseif (in_array($get['page'], ['search', 'folders', 'users', 'roles', 'utilities.deletion', 'utilities.logs', 'utilities.database', 'utilities.renewal', 'tasks']) === true) {
1293 1293
             ?>
1294 1294
             <!-- DataTables -->
1295
-            <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1296
-            <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1297
-            <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1298
-            <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1299
-            <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1300
-            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1301
-            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1302
-            <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1303
-            <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1304
-            <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1295
+            <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1296
+            <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1297
+            <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1298
+            <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1299
+            <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1300
+            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1301
+            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1302
+            <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1303
+            <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1304
+            <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1305 1305
             <!-- dater picker -->
1306
-            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1307
-            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1306
+            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1307
+            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1308 1308
             <!-- daterange picker -->
1309
-            <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1310
-            <script src="./plugins/moment/moment.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1311
-            <script src="./plugins/daterangepicker/daterangepicker.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1309
+            <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1310
+            <script src="./plugins/moment/moment.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1311
+            <script src="./plugins/daterangepicker/daterangepicker.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1312 1312
             <!-- SlimScroll -->
1313
-            <script src="./plugins/slimScroll/jquery.slimscroll.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1313
+            <script src="./plugins/slimScroll/jquery.slimscroll.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1314 1314
             <!-- FastClick -->
1315
-            <script src="./plugins/fastclick/fastclick.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1315
+            <script src="./plugins/fastclick/fastclick.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1316 1316
         <?php
1317 1317
         } elseif ($get['page'] === 'profile') {
1318 1318
             ?>
1319 1319
             <!-- FILESAVER -->
1320
-            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1320
+            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1321 1321
             <!-- PLUPLOAD -->
1322
-            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1322
+            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1323 1323
         <?php
1324 1324
         } elseif ($get['page'] === 'export') {
1325 1325
             ?>
1326 1326
             <!-- FILESAVER -->
1327
-            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1327
+            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1328 1328
             <!-- PWSTRENGHT -->
1329
-            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1330
-            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1329
+            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1330
+            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1331 1331
         <?php
1332 1332
         }
1333 1333
     }
1334 1334
     ?>
1335 1335
     <!-- functions -->
1336
-    <script type="text/javascript" src="includes/js/functions.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1337
-    <script type="text/javascript" src="includes/js/CreateRandomString.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1336
+    <script type="text/javascript" src="includes/js/functions.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1337
+    <script type="text/javascript" src="includes/js/CreateRandomString.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1338 1338
     <input type="hidden" id="encryptClientServerStatus" value="<?php echo $SETTINGS['encryptClientServer'] ?? 1; ?>" />
1339 1339
 
1340 1340
     </body>
@@ -1376,7 +1376,7 @@  discard block
 block discarded – undo
1376 1376
     };
1377 1377
 </script>
1378 1378
 
1379
-<script type="text/javascript" src="includes/js/secure-clipboard-cleaner.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1379
+<script type="text/javascript" src="includes/js/secure-clipboard-cleaner.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1380 1380
 
1381 1381
 <script>
1382 1382
     $(document).ready(function() {
@@ -1435,65 +1435,65 @@  discard block
 block discarded – undo
1435 1435
 
1436 1436
 // Load links, css and javascripts
1437 1437
 if (isset($SETTINGS['cpassman_dir']) === true) {
1438
-    include_once $SETTINGS['cpassman_dir'] . '/includes/core/load.js.php';
1438
+    include_once $SETTINGS['cpassman_dir'].'/includes/core/load.js.php';
1439 1439
     if ($menuAdmin === true) {
1440
-        include_once $SETTINGS['cpassman_dir'] . '/pages/admin.js.php';
1440
+        include_once $SETTINGS['cpassman_dir'].'/pages/admin.js.php';
1441 1441
         if ($get['page'] === '2fa') {
1442
-            include_once $SETTINGS['cpassman_dir'] . '/pages/2fa.js.php';
1442
+            include_once $SETTINGS['cpassman_dir'].'/pages/2fa.js.php';
1443 1443
         } elseif ($get['page'] === 'api') {
1444
-            include_once $SETTINGS['cpassman_dir'] . '/pages/api.js.php';
1444
+            include_once $SETTINGS['cpassman_dir'].'/pages/api.js.php';
1445 1445
         } elseif ($get['page'] === 'backups') {
1446
-            include_once $SETTINGS['cpassman_dir'] . '/pages/backups.js.php';
1446
+            include_once $SETTINGS['cpassman_dir'].'/pages/backups.js.php';
1447 1447
         } elseif ($get['page'] === 'emails') {
1448
-            include_once $SETTINGS['cpassman_dir'] . '/pages/emails.js.php';
1448
+            include_once $SETTINGS['cpassman_dir'].'/pages/emails.js.php';
1449 1449
         } elseif ($get['page'] === 'ldap') {
1450
-            include_once $SETTINGS['cpassman_dir'] . '/pages/ldap.js.php';
1450
+            include_once $SETTINGS['cpassman_dir'].'/pages/ldap.js.php';
1451 1451
         } elseif ($get['page'] === 'uploads') {
1452
-            include_once $SETTINGS['cpassman_dir'] . '/pages/uploads.js.php';
1452
+            include_once $SETTINGS['cpassman_dir'].'/pages/uploads.js.php';
1453 1453
         } elseif ($get['page'] === 'fields') {
1454
-            include_once $SETTINGS['cpassman_dir'] . '/pages/fields.js.php';
1454
+            include_once $SETTINGS['cpassman_dir'].'/pages/fields.js.php';
1455 1455
         } elseif ($get['page'] === 'options') {
1456
-            include_once $SETTINGS['cpassman_dir'] . '/pages/options.js.php';
1456
+            include_once $SETTINGS['cpassman_dir'].'/pages/options.js.php';
1457 1457
         } elseif ($get['page'] === 'statistics') {
1458
-            include_once $SETTINGS['cpassman_dir'] . '/pages/statistics.js.php';
1458
+            include_once $SETTINGS['cpassman_dir'].'/pages/statistics.js.php';
1459 1459
         } elseif ($get['page'] === 'tasks') {
1460
-            include_once $SETTINGS['cpassman_dir'] . '/pages/tasks.js.php';
1460
+            include_once $SETTINGS['cpassman_dir'].'/pages/tasks.js.php';
1461 1461
         } elseif ($get['page'] === 'oauth') {
1462
-            include_once $SETTINGS['cpassman_dir'] . '/pages/oauth.js.php';        
1462
+            include_once $SETTINGS['cpassman_dir'].'/pages/oauth.js.php';        
1463 1463
         } elseif ($get['page'] === 'tools') {
1464
-            include_once $SETTINGS['cpassman_dir'] . '/pages/tools.js.php';
1464
+            include_once $SETTINGS['cpassman_dir'].'/pages/tools.js.php';
1465 1465
         }
1466 1466
     } elseif (isset($get['page']) === true && $get['page'] !== '') {
1467 1467
         if ($get['page'] === 'items') {
1468
-            include_once $SETTINGS['cpassman_dir'] . '/pages/items.js.php';
1468
+            include_once $SETTINGS['cpassman_dir'].'/pages/items.js.php';
1469 1469
         } elseif ($get['page'] === 'import') {
1470
-            include_once $SETTINGS['cpassman_dir'] . '/pages/import.js.php';
1470
+            include_once $SETTINGS['cpassman_dir'].'/pages/import.js.php';
1471 1471
         } elseif ($get['page'] === 'export') {
1472
-            include_once $SETTINGS['cpassman_dir'] . '/pages/export.js.php';
1472
+            include_once $SETTINGS['cpassman_dir'].'/pages/export.js.php';
1473 1473
         } elseif ($get['page'] === 'offline') {
1474
-            include_once $SETTINGS['cpassman_dir'] . '/pages/offline.js.php';
1474
+            include_once $SETTINGS['cpassman_dir'].'/pages/offline.js.php';
1475 1475
         } elseif ($get['page'] === 'search') {
1476
-            include_once $SETTINGS['cpassman_dir'] . '/pages/search.js.php';
1476
+            include_once $SETTINGS['cpassman_dir'].'/pages/search.js.php';
1477 1477
         } elseif ($get['page'] === 'profile') {
1478
-            include_once $SETTINGS['cpassman_dir'] . '/pages/profile.js.php';
1478
+            include_once $SETTINGS['cpassman_dir'].'/pages/profile.js.php';
1479 1479
         } elseif ($get['page'] === 'favourites') {
1480
-            include_once $SETTINGS['cpassman_dir'] . '/pages/favorites.js.php';
1480
+            include_once $SETTINGS['cpassman_dir'].'/pages/favorites.js.php';
1481 1481
         } elseif ($get['page'] === 'folders') {
1482
-            include_once $SETTINGS['cpassman_dir'] . '/pages/folders.js.php';
1482
+            include_once $SETTINGS['cpassman_dir'].'/pages/folders.js.php';
1483 1483
         } elseif ($get['page'] === 'users') {
1484
-            include_once $SETTINGS['cpassman_dir'] . '/pages/users.js.php';
1484
+            include_once $SETTINGS['cpassman_dir'].'/pages/users.js.php';
1485 1485
         } elseif ($get['page'] === 'roles') {
1486
-            include_once $SETTINGS['cpassman_dir'] . '/pages/roles.js.php';
1486
+            include_once $SETTINGS['cpassman_dir'].'/pages/roles.js.php';
1487 1487
         } elseif ($get['page'] === 'utilities.deletion') {
1488
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.deletion.js.php';
1488
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.deletion.js.php';
1489 1489
         } elseif ($get['page'] === 'utilities.logs') {
1490
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.logs.js.php';
1490
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.logs.js.php';
1491 1491
         } elseif ($get['page'] === 'utilities.database') {
1492
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.database.js.php';
1492
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.database.js.php';
1493 1493
         } elseif ($get['page'] === 'utilities.renewal') {
1494
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.renewal.js.php';
1494
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.renewal.js.php';
1495 1495
         }
1496 1496
     } else {
1497
-        include_once $SETTINGS['cpassman_dir'] . '/includes/core/login.js.php';
1497
+        include_once $SETTINGS['cpassman_dir'].'/includes/core/login.js.php';
1498 1498
     }
1499 1499
 }
Please login to merge, or discard this patch.
pages/oauth.js.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 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
 ?>
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                     if (data[i].selected_role === 1) {
227 227
                         selected_role = data[i].id;
228 228
                     }
229
-                    html_admin_by += '<option value="' + data[i].id + '"><?php echo $lang->get('managers_of') . ' '; ?>' + data[i].title + '</option>';
229
+                    html_admin_by += '<option value="' + data[i].id + '"><?php echo $lang->get('managers_of').' '; ?>' + data[i].title + '</option>';
230 230
                     html_roles += '<option value="' + data[i].id + '">' + data[i].title + '</option>';
231 231
                 }
232 232
                 $('#oauth_new_user_is_administrated_by')
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             }).fail(function(error) {
256 256
                 toastr.remove();
257 257
                 toastr.error(
258
-                    '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + error,
258
+                    '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + error,
259 259
                     '', {
260 260
                         closeButton: true,
261 261
                         positionClass: 'toast-bottom-right'
Please login to merge, or discard this patch.
sources/admin.queries.php 1 patch
Spacing   +133 added lines, -133 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('admin') === 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
 
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
             break;
134 134
         }
135 135
 
136
-        require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
136
+        require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
137 137
         $return = '';
138 138
 
139 139
         //Get all tables
140 140
         $tables = array();
141 141
         $result = DB::query('SHOW TABLES');
142 142
         foreach ($result as $row) {
143
-            $tables[] = $row['Tables_in_' . DB_NAME];
143
+            $tables[] = $row['Tables_in_'.DB_NAME];
144 144
         }
145 145
 
146 146
         //cycle through
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             if (defined('DB_PREFIX') || substr_count($table, DB_PREFIX) > 0) {
149 149
                 $table = (is_string($table) ? $table : strval($table));
150 150
                 // Do query
151
-                $result = DB::query('SELECT * FROM ' . $table);
151
+                $result = DB::query('SELECT * FROM '.$table);
152 152
                 DB::query(
153 153
                     'SELECT *
154 154
                     FROM INFORMATION_SCHEMA.COLUMNS
@@ -160,20 +160,20 @@  discard block
 block discarded – undo
160 160
                 $numFields = DB::count();
161 161
 
162 162
                 // prepare a drop table
163
-                $return .= 'DROP TABLE ' . $table . ';';
164
-                $row2 = DB::queryFirstRow('SHOW CREATE TABLE ' . $table);
165
-                $return .= "\n\n" . strval($row2['Create Table']) . ";\n\n";
163
+                $return .= 'DROP TABLE '.$table.';';
164
+                $row2 = DB::queryFirstRow('SHOW CREATE TABLE '.$table);
165
+                $return .= "\n\n".strval($row2['Create Table']).";\n\n";
166 166
 
167 167
                 //prepare all fields and datas
168 168
                 for ($i = 0; $i < $numFields; ++$i) {
169 169
                     if (is_object($result)) {
170 170
                         while ($row = $result->fetch_row()) {
171
-                            $return .= 'INSERT INTO ' . $table . ' VALUES(';
171
+                            $return .= 'INSERT INTO '.$table.' VALUES(';
172 172
                             for ($j = 0; $j < $numFields; ++$j) {
173 173
                                 $row[$j] = addslashes($row[$j]);
174 174
                                 $row[$j] = preg_replace("/\n/", '\\n', $row[$j]);
175 175
                                 if (isset($row[$j])) {
176
-                                    $return .= '"' . $row[$j] . '"';
176
+                                    $return .= '"'.$row[$j].'"';
177 177
                                 } else {
178 178
                                     $return .= 'NULL';
179 179
                                 }
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
             $token = GenerateCryptKey(20, false, true, true, false, true);
195 195
 
196 196
             //save file
197
-            $filename = time() . '-' . $token . '.sql';
198
-            $handle = fopen($SETTINGS['path_to_files_folder'] . '/' . $filename, 'w+');
197
+            $filename = time().'-'.$token.'.sql';
198
+            $handle = fopen($SETTINGS['path_to_files_folder'].'/'.$filename, 'w+');
199 199
             if ($handle !== false) {
200 200
                 //write file
201 201
                 fwrite($handle, $return);
@@ -207,16 +207,16 @@  discard block
 block discarded – undo
207 207
                 // Encrypt the file
208 208
                 prepareFileWithDefuse(
209 209
                     'encrypt',
210
-                    $SETTINGS['path_to_files_folder'] . '/' . $filename,
211
-                    $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $filename,
210
+                    $SETTINGS['path_to_files_folder'].'/'.$filename,
211
+                    $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$filename,
212 212
                     $post_option
213 213
                 );
214 214
 
215 215
                 // Do clean
216
-                unlink($SETTINGS['path_to_files_folder'] . '/' . $filename);
216
+                unlink($SETTINGS['path_to_files_folder'].'/'.$filename);
217 217
                 rename(
218
-                    $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $filename,
219
-                    $SETTINGS['path_to_files_folder'] . '/' . $filename
218
+                    $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$filename,
219
+                    $SETTINGS['path_to_files_folder'].'/'.$filename
220 220
                 );
221 221
             }
222 222
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             //update LOG
227 227
             logEvents($SETTINGS, 'admin_action', 'dataBase backup', (string) $session->get('user-id'), $session->get('user-login'));
228 228
 
229
-            echo '[{"result":"db_backup" , "href":"sources/downloadFile.php?name=' . urlencode($filename) . '&sub=files&file=' . $filename . '&type=sql&key=' . $session->get('key') . '&key_tmp=' . $session->get('user-key_tmp') . '&pathIsFiles=1"}]';
229
+            echo '[{"result":"db_backup" , "href":"sources/downloadFile.php?name='.urlencode($filename).'&sub=files&file='.$filename.'&type=sql&key='.$session->get('key').'&key_tmp='.$session->get('user-key_tmp').'&pathIsFiles=1"}]';
230 230
         }
231 231
         break;
232 232
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             );
256 256
             break;
257 257
         }
258
-        include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
258
+        include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
259 259
 
260 260
         $dataPost = explode('&', $post_option);
261 261
         $file = htmlspecialchars($dataPost[0]);
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         // Get filename from database
265 265
         $data = DB::queryFirstRow(
266 266
             'SELECT valeur
267
-            FROM ' . prefixTable('misc') . '
267
+            FROM ' . prefixTable('misc').'
268 268
             WHERE increment_id = %i',
269 269
             $file
270 270
         );
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
             // Decrypt the file
284 284
             $ret = prepareFileWithDefuse(
285 285
                 'decrypt',
286
-                $SETTINGS['path_to_files_folder'] . '/' . $file,
287
-                $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $file,
286
+                $SETTINGS['path_to_files_folder'].'/'.$file,
287
+                $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$file,
288 288
                 $key
289 289
             );
290 290
 
@@ -295,10 +295,10 @@  discard block
 block discarded – undo
295 295
             }
296 296
 
297 297
             // Do clean
298
-            fileDelete($SETTINGS['path_to_files_folder'] . '/' . $file, $SETTINGS);
299
-            $file = $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $file;
298
+            fileDelete($SETTINGS['path_to_files_folder'].'/'.$file, $SETTINGS);
299
+            $file = $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$file;
300 300
         } else {
301
-            $file = $SETTINGS['path_to_files_folder'] . '/' . $file;
301
+            $file = $SETTINGS['path_to_files_folder'].'/'.$file;
302 302
         }
303 303
 
304 304
         //read sql file
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         fclose($handle);
316 316
 
317 317
         //delete file
318
-        unlink($SETTINGS['path_to_files_folder'] . '/' . $file);
318
+        unlink($SETTINGS['path_to_files_folder'].'/'.$file);
319 319
 
320 320
         //Show done
321 321
         echo '[{"result":"db_restore" , "message":""}]';
@@ -354,8 +354,8 @@  discard block
 block discarded – undo
354 354
                 $tablename = (is_string($tablename) ? $tablename : strval($tablename));
355 355
                 if (substr_count($tablename, DB_PREFIX) > 0) {
356 356
                     // launch optimization quieries
357
-                    DB::query('ANALYZE TABLE `' . $tablename . '`');
358
-                    DB::query('OPTIMIZE TABLE `' . $tablename . '`');
357
+                    DB::query('ANALYZE TABLE `'.$tablename.'`');
358
+                    DB::query('OPTIMIZE TABLE `'.$tablename.'`');
359 359
                 }
360 360
             }
361 361
         }
@@ -363,12 +363,12 @@  discard block
 block discarded – undo
363 363
         //Clean up LOG_ITEMS table
364 364
         $rows = DB::query(
365 365
             'SELECT id
366
-            FROM ' . prefixTable('items') . '
366
+            FROM ' . prefixTable('items').'
367 367
             ORDER BY id ASC'
368 368
         );
369 369
         foreach ($rows as $item) {
370 370
             DB::query(
371
-                'SELECT * FROM ' . prefixTable('log_items') . ' WHERE id_item = %i AND action = %s',
371
+                'SELECT * FROM '.prefixTable('log_items').' WHERE id_item = %i AND action = %s',
372 372
                 $item['id'],
373 373
                 'at_creation'
374 374
             );
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             if ($counter === 0) {
377 377
                 //Create new at_creation entry
378 378
                 $rowTmp = DB::queryFirstRow(
379
-                    'SELECT date, id_user FROM ' . prefixTable('log_items') . ' WHERE id_item=%i ORDER BY date ASC',
379
+                    'SELECT date, id_user FROM '.prefixTable('log_items').' WHERE id_item=%i ORDER BY date ASC',
380 380
                     $item['id']
381 381
                 );
382 382
                 DB::insert(
@@ -406,8 +406,8 @@  discard block
 block discarded – undo
406 406
         echo prepareExchangedData(
407 407
             array(
408 408
                 'error' => false,
409
-                'message' => $lang->get('last_execution') . ' ' .
410
-                    date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) time()) .
409
+                'message' => $lang->get('last_execution').' '.
410
+                    date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) time()).
411 411
                     '<i class="fas fa-check text-success ml-2"></i>',
412 412
             ),
413 413
             'encode'
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
             break;
444 444
         }
445 445
 
446
-        require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
446
+        require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
447 447
         updateCacheTable('reload', NULL);
448 448
 
449 449
         // Log
@@ -459,8 +459,8 @@  discard block
 block discarded – undo
459 459
         echo prepareExchangedData(
460 460
             [
461 461
                 'error' => false,
462
-                'message' => $lang->get('last_execution') . ' ' .
463
-                    date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) time()) .
462
+                'message' => $lang->get('last_execution').' '.
463
+                    date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) time()).
464 464
                     '<i class="fas fa-check text-success mr-2"></i>',
465 465
             ],
466 466
             'encode'
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         $session->set('user-reencrypt_old_salt', file_get_contents(SECUREPATH.'/'.SECUREFILE));
503 503
 
504 504
         // generate new saltkey
505
-        $old_sk_filename = SECUREPATH.'/'.SECUREFILE . date('Y_m_d', mktime(0, 0, 0, (int) date('m'), (int) date('d'), (int) date('y'))) . '.' . time();
505
+        $old_sk_filename = SECUREPATH.'/'.SECUREFILE.date('Y_m_d', mktime(0, 0, 0, (int) date('m'), (int) date('d'), (int) date('y'))).'.'.time();
506 506
         copy(
507 507
             SECUREPATH.'/'.SECUREFILE,
508 508
             $old_sk_filename
@@ -531,13 +531,13 @@  discard block
 block discarded – undo
531 531
         logEvents($SETTINGS, 'system', 'change_salt_key', (string) $session->get('user-id'), $session->get('user-login'));
532 532
 
533 533
         // get number of items to change
534
-        DB::query('SELECT id FROM ' . prefixTable('items') . ' WHERE perso = %i', 0);
534
+        DB::query('SELECT id FROM '.prefixTable('items').' WHERE perso = %i', 0);
535 535
         $nb_of_items = DB::count();
536 536
 
537 537
         // create backup table
538
-        DB::query('DROP TABLE IF EXISTS ' . prefixTable('sk_reencrypt_backup'));
538
+        DB::query('DROP TABLE IF EXISTS '.prefixTable('sk_reencrypt_backup'));
539 539
         DB::query(
540
-            'CREATE TABLE `' . prefixTable('sk_reencrypt_backup') . '` (
540
+            'CREATE TABLE `'.prefixTable('sk_reencrypt_backup').'` (
541 541
             `id` int(12) NOT null AUTO_INCREMENT,
542 542
             `current_table` varchar(100) NOT NULL,
543 543
             `current_field` varchar(500) NOT NULL,
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
         );
566 566
 
567 567
         // delete previous backup files
568
-        $files = glob($SETTINGS['path_to_upload_folder'] . '/*'); // get all file names
568
+        $files = glob($SETTINGS['path_to_upload_folder'].'/*'); // get all file names
569 569
         foreach ($files as $file) { // iterate files
570 570
             if (is_file($file)) {
571 571
                 $file_parts = pathinfo($file);
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
                 echo prepareExchangedData(
653 653
                     array(
654 654
                         'error' => true,
655
-                        'message' => 'Input `' . $objects[0] . '` is not allowed',
655
+                        'message' => 'Input `'.$objects[0].'` is not allowed',
656 656
                         'nbOfItems' => '',
657 657
                         'nextAction' => '',
658 658
                     ),
@@ -665,9 +665,9 @@  discard block
 block discarded – undo
665 665
                 //change all encrypted data in Items (passwords)
666 666
                 $rows = DB::query(
667 667
                     'SELECT id, pw, pw_iv
668
-                    FROM ' . prefixTable('items') . '
668
+                    FROM ' . prefixTable('items').'
669 669
                     WHERE perso = %s
670
-                    LIMIT ' . $post_start . ', ' . $post_length,
670
+                    LIMIT ' . $post_start.', '.$post_length,
671 671
                     '0'
672 672
                 );
673 673
                 foreach ($rows as $record) {
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
                             'current_field' => 'pw',
680 680
                             'value_id' => $record['id'],
681 681
                             'value' => $record['pw'],
682
-                            'current_sql' => 'UPDATE ' . prefixTable('items') . " SET pw = '" . $record['pw'] . "' WHERE id = '" . $record['id'] . "';",
682
+                            'current_sql' => 'UPDATE '.prefixTable('items')." SET pw = '".$record['pw']."' WHERE id = '".$record['id']."';",
683 683
                             'value2' => 'none',
684 684
                             'result' => 'none',
685 685
                         )
@@ -728,9 +728,9 @@  discard block
 block discarded – undo
728 728
                 //change all encrypted data in Logs (passwords)
729 729
                 $rows = DB::query(
730 730
                     'SELECT raison, increment_id
731
-                    FROM ' . prefixTable('log_items') . "
731
+                    FROM ' . prefixTable('log_items')."
732 732
                     WHERE action = %s AND raison LIKE 'at_pw :%'
733
-                    LIMIT " . $post_start . ', ' . $post_length,
733
+                    LIMIT " . $post_start.', '.$post_length,
734 734
                     'at_modification'
735 735
                 );
736 736
                 foreach ($rows as $record) {
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
                             'current_field' => 'raison',
743 743
                             'value_id' => $record['increment_id'],
744 744
                             'value' => $record['raison'],
745
-                            'current_sql' => 'UPDATE ' . prefixTable('log_items') . " SET raison = '" . $record['raison'] . "' WHERE increment_id = '" . $record['increment_id'] . "';",
745
+                            'current_sql' => 'UPDATE '.prefixTable('log_items')." SET raison = '".$record['raison']."' WHERE increment_id = '".$record['increment_id']."';",
746 746
                             'value2' => 'none',
747 747
                             'result' => 'none',
748 748
                         )
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
                         DB::update(
771 771
                             prefixTable('log_items'),
772 772
                             array(
773
-                                'raison' => 'at_pw :' . $encrypt['string'],
773
+                                'raison' => 'at_pw :'.$encrypt['string'],
774 774
                                 'encryption_type' => 'defuse',
775 775
                             ),
776 776
                             'increment_id = %i',
@@ -795,8 +795,8 @@  discard block
 block discarded – undo
795 795
                 //change all encrypted data in CATEGORIES (passwords)
796 796
                 $rows = DB::query(
797 797
                     'SELECT id, data
798
-                    FROM ' . prefixTable('categories_items') . '
799
-                    LIMIT ' . $post_start . ', ' . $post_length
798
+                    FROM ' . prefixTable('categories_items').'
799
+                    LIMIT ' . $post_start.', '.$post_length
800 800
                 );
801 801
                 foreach ($rows as $record) {
802 802
                     // backup data
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
                             'current_field' => 'data',
808 808
                             'value_id' => $record['id'],
809 809
                             'value' => $record['data'],
810
-                            'current_sql' => 'UPDATE ' . prefixTable('categories_items') . " SET data = '" . $record['data'] . "' WHERE id = '" . $record['id'] . "';",
810
+                            'current_sql' => 'UPDATE '.prefixTable('categories_items')." SET data = '".$record['data']."' WHERE id = '".$record['id']."';",
811 811
                             'value2' => 'none',
812 812
                             'result' => 'none',
813 813
                         )
@@ -855,9 +855,9 @@  discard block
 block discarded – undo
855 855
                 // Change all encrypted data in FILES (passwords)
856 856
                 $rows = DB::query(
857 857
                     'SELECT id, file, status
858
-                    FROM ' . prefixTable('files') . "
858
+                    FROM ' . prefixTable('files')."
859 859
                     WHERE status = 'encrypted'
860
-                    LIMIT " . $post_start . ', ' . $post_length
860
+                    LIMIT " . $post_start.', '.$post_length
861 861
                 );
862 862
                 foreach ($rows as $record) {
863 863
                     // backup data
@@ -875,20 +875,20 @@  discard block
 block discarded – undo
875 875
                     );
876 876
                     $newID = DB::insertId();
877 877
 
878
-                    if (file_exists($SETTINGS['path_to_upload_folder'] . '/' . $record['file'])) {
878
+                    if (file_exists($SETTINGS['path_to_upload_folder'].'/'.$record['file'])) {
879 879
                         // make a copy of file
880 880
                         if (!copy(
881
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['file'],
882
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['file'] . '.copy'
881
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['file'],
882
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['file'].'.copy'
883 883
                         )) {
884 884
                             $error = 'Copy not possible';
885 885
                             exit;
886 886
                         } else {
887 887
                             // prepare a bck of file (that will not be deleted)
888
-                            $backup_filename = $record['file'] . '.bck-change-sk.' . time();
888
+                            $backup_filename = $record['file'].'.bck-change-sk.'.time();
889 889
                             copy(
890
-                                $SETTINGS['path_to_upload_folder'] . '/' . $record['file'],
891
-                                $SETTINGS['path_to_upload_folder'] . '/' . $backup_filename
890
+                                $SETTINGS['path_to_upload_folder'].'/'.$record['file'],
891
+                                $SETTINGS['path_to_upload_folder'].'/'.$backup_filename
892 892
                             );
893 893
                         }
894 894
 
@@ -896,22 +896,22 @@  discard block
 block discarded – undo
896 896
                         // STEP1 - Do decryption
897 897
                         prepareFileWithDefuse(
898 898
                             'decrypt',
899
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['file'],
900
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['file'] . '_encrypted'
899
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['file'],
900
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['file'].'_encrypted'
901 901
                         );
902 902
 
903 903
                         // Do cleanup of files
904
-                        unlink($SETTINGS['path_to_upload_folder'] . '/' . $record['file']);
904
+                        unlink($SETTINGS['path_to_upload_folder'].'/'.$record['file']);
905 905
 
906 906
                         // STEP2 - Do encryption
907 907
                         prepareFileWithDefuse(
908 908
                             'encryp',
909
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['file'] . '_encrypted',
910
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['file']
909
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['file'].'_encrypted',
910
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['file']
911 911
                         );
912 912
 
913 913
                         // Do cleanup of files
914
-                        unlink($SETTINGS['path_to_upload_folder'] . '/' . $record['file'] . '_encrypted');
914
+                        unlink($SETTINGS['path_to_upload_folder'].'/'.$record['file'].'_encrypted');
915 915
 
916 916
                         // Update backup table
917 917
                         DB::update(
@@ -937,13 +937,13 @@  discard block
 block discarded – undo
937 937
                 // do some things for new object
938 938
                 if (isset($objects[0])) {
939 939
                     if ($objects[0] === 'logs') {
940
-                        DB::query('SELECT increment_id FROM ' . prefixTable('log_items') . " WHERE action = %s AND raison LIKE 'at_pw :%'", 'at_modification');
940
+                        DB::query('SELECT increment_id FROM '.prefixTable('log_items')." WHERE action = %s AND raison LIKE 'at_pw :%'", 'at_modification');
941 941
                     } elseif ($objects[0] === 'files') {
942
-                        DB::query('SELECT id FROM ' . prefixTable('files'));
942
+                        DB::query('SELECT id FROM '.prefixTable('files'));
943 943
                     } elseif ($objects[0] === 'categories') {
944
-                        DB::query('SELECT id FROM ' . prefixTable('categories_items'));
944
+                        DB::query('SELECT id FROM '.prefixTable('categories_items'));
945 945
                     } elseif ($objects[0] === 'custfields') {
946
-                        DB::query('SELECT raison FROM ' . prefixTable('log_items') . " WHERE action = %s AND raison LIKE 'at_pw :%'", 'at_modification');
946
+                        DB::query('SELECT raison FROM '.prefixTable('log_items')." WHERE action = %s AND raison LIKE 'at_pw :%'", 'at_modification');
947 947
                     }
948 948
                     $nb_of_items = DB::count();
949 949
                 } else {
@@ -1063,12 +1063,12 @@  discard block
 block discarded – undo
1063 1063
                 );
1064 1064
             } elseif ($record['current_table'] === 'files') {
1065 1065
                 // restore backup file
1066
-                if (file_exists($SETTINGS['path_to_upload_folder'] . '/' . $record['value'])) {
1067
-                    unlink($SETTINGS['path_to_upload_folder'] . '/' . $record['value']);
1068
-                    if (file_exists($SETTINGS['path_to_upload_folder'] . '/' . $record['value2'])) {
1066
+                if (file_exists($SETTINGS['path_to_upload_folder'].'/'.$record['value'])) {
1067
+                    unlink($SETTINGS['path_to_upload_folder'].'/'.$record['value']);
1068
+                    if (file_exists($SETTINGS['path_to_upload_folder'].'/'.$record['value2'])) {
1069 1069
                         rename(
1070
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['value2'],
1071
-                            $SETTINGS['path_to_upload_folder'] . '/' . $record['value']
1070
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['value2'],
1071
+                            $SETTINGS['path_to_upload_folder'].'/'.$record['value']
1072 1072
                         );
1073 1073
                     }
1074 1074
                 }
@@ -1087,7 +1087,7 @@  discard block
 block discarded – undo
1087 1087
         }
1088 1088
 
1089 1089
         // drop table
1090
-        DB::query('DROP TABLE IF EXISTS ' . prefixTable('sk_reencrypt_backup'));
1090
+        DB::query('DROP TABLE IF EXISTS '.prefixTable('sk_reencrypt_backup'));
1091 1091
 
1092 1092
         // Send back
1093 1093
         echo prepareExchangedData(
@@ -1130,17 +1130,17 @@  discard block
 block discarded – undo
1130 1130
         // delete files
1131 1131
         $rows = DB::query(
1132 1132
             'SELECT value, value2
1133
-            FROM ' . prefixTable('sk_reencrypt_backup') . "
1133
+            FROM ' . prefixTable('sk_reencrypt_backup')."
1134 1134
             WHERE current_table = 'files'"
1135 1135
         );
1136 1136
         foreach ($rows as $record) {
1137
-            if (file_exists($SETTINGS['path_to_upload_folder'] . '/' . $record['value2'])) {
1138
-                unlink($SETTINGS['path_to_upload_folder'] . '/' . $record['value2']);
1137
+            if (file_exists($SETTINGS['path_to_upload_folder'].'/'.$record['value2'])) {
1138
+                unlink($SETTINGS['path_to_upload_folder'].'/'.$record['value2']);
1139 1139
             }
1140 1140
         }
1141 1141
 
1142 1142
         // drop table
1143
-        DB::query('DROP TABLE IF EXISTS ' . prefixTable('sk_reencrypt_backup'));
1143
+        DB::query('DROP TABLE IF EXISTS '.prefixTable('sk_reencrypt_backup'));
1144 1144
 
1145 1145
         echo '[{"status":"done"}]';
1146 1146
         break;
@@ -1171,7 +1171,7 @@  discard block
 block discarded – undo
1171 1171
                 'encode'
1172 1172
             );
1173 1173
         } else {
1174
-            require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
1174
+            require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
1175 1175
 
1176 1176
             //send email
1177 1177
             $emailSettings = new EmailSettings($SETTINGS);
@@ -1209,13 +1209,13 @@  discard block
 block discarded – undo
1209 1209
             break;
1210 1210
         }
1211 1211
 
1212
-        include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
1212
+        include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
1213 1213
         $emailSettings = new EmailSettings($SETTINGS);
1214 1214
         $emailService = new EmailService();
1215 1215
 
1216 1216
         $rows = DB::query(
1217 1217
             'SELECT *
1218
-            FROM ' . prefixTable('emails') . '
1218
+            FROM ' . prefixTable('emails').'
1219 1219
             WHERE status = %s OR status = %s',
1220 1220
             'not_sent',
1221 1221
             ''
@@ -1301,13 +1301,13 @@  discard block
 block discarded – undo
1301 1301
             break;
1302 1302
         }
1303 1303
 
1304
-        include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
1304
+        include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
1305 1305
 
1306 1306
         // Instatiate email settings and service
1307 1307
         $emailSettings = new EmailSettings($SETTINGS);
1308 1308
         $emailService = new EmailService();
1309 1309
 
1310
-        $rows = DB::query('SELECT * FROM ' . prefixTable('emails') . ' WHERE status = %s OR status = %s', 'not_sent', '');
1310
+        $rows = DB::query('SELECT * FROM '.prefixTable('emails').' WHERE status = %s OR status = %s', 'not_sent', '');
1311 1311
         foreach ($rows as $record) {
1312 1312
             //send email
1313 1313
             $email = $emailService->sendMail(
@@ -1376,7 +1376,7 @@  discard block
 block discarded – undo
1376 1376
             break;
1377 1377
         }
1378 1378
 
1379
-        require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
1379
+        require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
1380 1380
 
1381 1381
         // init
1382 1382
         $filesList = array();
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
                 FROM ' . prefixTable('files')
1390 1390
             );
1391 1391
             foreach ($rows as $record) {
1392
-                if (is_file($SETTINGS['path_to_upload_folder'] . '/' . $record['file'])) {
1392
+                if (is_file($SETTINGS['path_to_upload_folder'].'/'.$record['file'])) {
1393 1393
                     $addFile = false;
1394 1394
                     if (($post_option === 'attachments-decrypt' && $record['status'] === 'encrypted')
1395 1395
                         || ($post_option === 'attachments-encrypt' && $record['status'] === 'clear')
@@ -1454,8 +1454,8 @@  discard block
 block discarded – undo
1454 1454
         $post_list = filter_var_array($post_list, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
1455 1455
         $post_counter = filter_var($post_counter, FILTER_SANITIZE_NUMBER_INT);
1456 1456
 
1457
-        include $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
1458
-        include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
1457
+        include $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
1458
+        include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
1459 1459
 
1460 1460
         $cpt = 0;
1461 1461
         $continu = true;
@@ -1468,33 +1468,33 @@  discard block
 block discarded – undo
1468 1468
                 // Get file name
1469 1469
                 $file_info = DB::queryFirstRow(
1470 1470
                     'SELECT file
1471
-                    FROM ' . prefixTable('files') . '
1471
+                    FROM ' . prefixTable('files').'
1472 1472
                     WHERE id = %i',
1473 1473
                     $file
1474 1474
                 );
1475 1475
 
1476 1476
                 // skip file is Coherancey not respected
1477
-                if (is_file($SETTINGS['path_to_upload_folder'] . '/' . $file_info['file'])) {
1477
+                if (is_file($SETTINGS['path_to_upload_folder'].'/'.$file_info['file'])) {
1478 1478
                     // Case where we want to decrypt
1479 1479
                     if ($post_option === 'decrypt') {
1480 1480
                         prepareFileWithDefuse(
1481 1481
                             'decrypt',
1482
-                            $SETTINGS['path_to_upload_folder'] . '/' . $file_info['file'],
1483
-                            $SETTINGS['path_to_upload_folder'] . '/defuse_temp_' . $file_info['file'],
1482
+                            $SETTINGS['path_to_upload_folder'].'/'.$file_info['file'],
1483
+                            $SETTINGS['path_to_upload_folder'].'/defuse_temp_'.$file_info['file'],
1484 1484
                         );
1485 1485
                         // Case where we want to encrypt
1486 1486
                     } elseif ($post_option === 'encrypt') {
1487 1487
                         prepareFileWithDefuse(
1488 1488
                             'encrypt',
1489
-                            $SETTINGS['path_to_upload_folder'] . '/' . $file_info['file'],
1490
-                            $SETTINGS['path_to_upload_folder'] . '/defuse_temp_' . $file_info['file'],
1489
+                            $SETTINGS['path_to_upload_folder'].'/'.$file_info['file'],
1490
+                            $SETTINGS['path_to_upload_folder'].'/defuse_temp_'.$file_info['file'],
1491 1491
                         );
1492 1492
                     }
1493 1493
                     // Do file cleanup
1494
-                    fileDelete($SETTINGS['path_to_upload_folder'] . '/' . $file_info['file'], $SETTINGS);
1494
+                    fileDelete($SETTINGS['path_to_upload_folder'].'/'.$file_info['file'], $SETTINGS);
1495 1495
                     rename(
1496
-                        $SETTINGS['path_to_upload_folder'] . '/defuse_temp_' . $file_info['file'],
1497
-                        $SETTINGS['path_to_upload_folder'] . '/' . $file_info['file']
1496
+                        $SETTINGS['path_to_upload_folder'].'/defuse_temp_'.$file_info['file'],
1497
+                        $SETTINGS['path_to_upload_folder'].'/'.$file_info['file']
1498 1498
                     );
1499 1499
 
1500 1500
                     // store in DB
@@ -1529,8 +1529,8 @@  discard block
 block discarded – undo
1529 1529
                 $post_option === 'attachments-decrypt' ? 'clear' : 'encrypted'
1530 1530
             );
1531 1531
 
1532
-            $message = $lang->get('last_execution') . ' ' .
1533
-                date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) time()) .
1532
+            $message = $lang->get('last_execution').' '.
1533
+                date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) time()).
1534 1534
                 '<i class="fas fa-check text-success ml-2 mr-3"></i>';
1535 1535
         }
1536 1536
 
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
             $post_id = filter_var($dataReceived['id'], FILTER_SANITIZE_NUMBER_INT);
1625 1625
 
1626 1626
             DB::query(
1627
-                'DELETE FROM ' . prefixTable('api') . ' WHERE increment_id = %i',
1627
+                'DELETE FROM '.prefixTable('api').' WHERE increment_id = %i',
1628 1628
                 $post_id
1629 1629
             );
1630 1630
         }
@@ -1719,7 +1719,7 @@  discard block
 block discarded – undo
1719 1719
             // Delete existing key
1720 1720
         } elseif (null !== $post_action && $post_action === 'delete') {
1721 1721
             $post_id = filter_var($dataReceived['id'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);
1722
-            DB::query('DELETE FROM ' . prefixTable('api') . ' WHERE increment_id=%i', $post_id);
1722
+            DB::query('DELETE FROM '.prefixTable('api').' WHERE increment_id=%i', $post_id);
1723 1723
         }
1724 1724
 
1725 1725
         echo prepareExchangedData(
@@ -1734,7 +1734,7 @@  discard block
 block discarded – undo
1734 1734
 
1735 1735
     case 'save_api_status':
1736 1736
         // Do query
1737
-        DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'api');
1737
+        DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'api');
1738 1738
         $counter = DB::count();
1739 1739
         if ($counter === 0) {
1740 1740
             DB::insert(
@@ -1763,7 +1763,7 @@  discard block
 block discarded – undo
1763 1763
 
1764 1764
     case 'run_duo_config_check':
1765 1765
         //Libraries call
1766
-        require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
1766
+        require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
1767 1767
         // Check KEY
1768 1768
         if ($post_key !== $session->get('key')) {
1769 1769
             echo prepareExchangedData(
@@ -1869,7 +1869,7 @@  discard block
 block discarded – undo
1869 1869
         } else {
1870 1870
             $tmp = 1;
1871 1871
         }
1872
-        DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'google_authentication');
1872
+        DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'google_authentication');
1873 1873
         $counter = DB::count();
1874 1874
         if ($counter === 0) {
1875 1875
             DB::insert(
@@ -1897,7 +1897,7 @@  discard block
 block discarded – undo
1897 1897
 
1898 1898
         // ga_website_name
1899 1899
         if (is_null($dataReceived['ga_website_name']) === false) {
1900
-            DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'ga_website_name');
1900
+            DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'ga_website_name');
1901 1901
             $counter = DB::count();
1902 1902
             if ($counter === 0) {
1903 1903
                 DB::insert(
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
         }
1928 1928
 
1929 1929
         // send data
1930
-        echo '[{"result" : "' . addslashes($lang['done']) . '" , "error" : ""}]';
1930
+        echo '[{"result" : "'.addslashes($lang['done']).'" , "error" : ""}]';
1931 1931
         break;
1932 1932
 
1933 1933
     case 'save_agses_options':
@@ -1950,7 +1950,7 @@  discard block
 block discarded – undo
1950 1950
 
1951 1951
         // agses_hosted_url
1952 1952
         if (!is_null($dataReceived['agses_hosted_url'])) {
1953
-            DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'agses_hosted_url');
1953
+            DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'agses_hosted_url');
1954 1954
             $counter = DB::count();
1955 1955
             if ($counter === 0) {
1956 1956
                 DB::insert(
@@ -1981,7 +1981,7 @@  discard block
 block discarded – undo
1981 1981
 
1982 1982
         // agses_hosted_id
1983 1983
         if (!is_null($dataReceived['agses_hosted_id'])) {
1984
-            DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'agses_hosted_id');
1984
+            DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'agses_hosted_id');
1985 1985
             $counter = DB::count();
1986 1986
             if ($counter === 0) {
1987 1987
                 DB::insert(
@@ -2012,7 +2012,7 @@  discard block
 block discarded – undo
2012 2012
 
2013 2013
         // agses_hosted_apikey
2014 2014
         if (!is_null($dataReceived['agses_hosted_apikey'])) {
2015
-            DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'agses_hosted_apikey');
2015
+            DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'agses_hosted_apikey');
2016 2016
             $counter = DB::count();
2017 2017
             if ($counter === 0) {
2018 2018
                 DB::insert(
@@ -2042,7 +2042,7 @@  discard block
 block discarded – undo
2042 2042
         }
2043 2043
 
2044 2044
         // send data
2045
-        echo '[{"result" : "' . addslashes($lang['done']) . '" , "error" : ""}]';
2045
+        echo '[{"result" : "'.addslashes($lang['done']).'" , "error" : ""}]';
2046 2046
         break;
2047 2047
 
2048 2048
     case 'save_option_change':
@@ -2082,7 +2082,7 @@  discard block
 block discarded – undo
2082 2082
 
2083 2083
         // Check if setting is already in DB. If NO then insert, if YES then update.
2084 2084
         $data = DB::query(
2085
-            'SELECT * FROM ' . prefixTable('misc') . '
2085
+            'SELECT * FROM '.prefixTable('misc').'
2086 2086
             WHERE type = %s AND intitule = %s',
2087 2087
             'admin',
2088 2088
             $post_field
@@ -2105,7 +2105,7 @@  discard block
 block discarded – undo
2105 2105
                     array(
2106 2106
                         'valeur' => time(),
2107 2107
                         'type' => 'admin',
2108
-                        'intitule' => $post_field . '_time',
2108
+                        'intitule' => $post_field.'_time',
2109 2109
                         'updated_at' => time(),
2110 2110
                     )
2111 2111
                 );
@@ -2127,10 +2127,10 @@  discard block
 block discarded – undo
2127 2127
             if ($post_field === 'send_stats') {
2128 2128
                 // Check if previous time exists, if not them insert this value in DB
2129 2129
                 DB::query(
2130
-                    'SELECT * FROM ' . prefixTable('misc') . '
2130
+                    'SELECT * FROM '.prefixTable('misc').'
2131 2131
                     WHERE type = %s AND intitule = %s',
2132 2132
                     'admin',
2133
-                    $post_field . '_time'
2133
+                    $post_field.'_time'
2134 2134
                 );
2135 2135
                 $counter = DB::count();
2136 2136
                 if ($counter === 0) {
@@ -2139,7 +2139,7 @@  discard block
 block discarded – undo
2139 2139
                         array(
2140 2140
                             'valeur' => 0,
2141 2141
                             'type' => 'admin',
2142
-                            'intitule' => $post_field . '_time',
2142
+                            'intitule' => $post_field.'_time',
2143 2143
                             'created_at' => time(),
2144 2144
                         )
2145 2145
                     );
@@ -2161,13 +2161,13 @@  discard block
 block discarded – undo
2161 2161
         // special Cases
2162 2162
         if ($post_field === 'cpassman_url') {
2163 2163
             // update also jsUrl for CSFP protection
2164
-            $jsUrl = $post_value . '/includes/libraries/csrfp/js/csrfprotector.js';
2164
+            $jsUrl = $post_value.'/includes/libraries/csrfp/js/csrfprotector.js';
2165 2165
             $csrfp_file = '../includes/libraries/csrfp/libs/csrfp.config.php';
2166 2166
             $data = file_get_contents($csrfp_file);
2167 2167
             $posJsUrl = strpos($data, '"jsUrl" => "');
2168 2168
             $posEndLine = strpos($data, '",', $posJsUrl);
2169 2169
             $line = substr($data, $posJsUrl, ($posEndLine - $posJsUrl + 2));
2170
-            $newdata = str_replace($line, '"jsUrl" => "' . filter_var($jsUrl, FILTER_SANITIZE_FULL_SPECIAL_CHARS) . '",', $data);
2170
+            $newdata = str_replace($line, '"jsUrl" => "'.filter_var($jsUrl, FILTER_SANITIZE_FULL_SPECIAL_CHARS).'",', $data);
2171 2171
             file_put_contents($csrfp_file, $newdata);
2172 2172
         } elseif ($post_field === 'restricted_to_input' && (int) $post_value === 0) {
2173 2173
             DB::update(
@@ -2192,7 +2192,7 @@  discard block
 block discarded – undo
2192 2192
         echo prepareExchangedData(
2193 2193
             array(
2194 2194
                 'error' => false,
2195
-                'misc' => $counter . ' ; ' . $SETTINGS[$post_field],
2195
+                'misc' => $counter.' ; '.$SETTINGS[$post_field],
2196 2196
                 'message' => empty($post_translate) === false ? $lang->get($post_translate) : '',
2197 2197
             ),
2198 2198
             'encode'
@@ -2235,7 +2235,7 @@  discard block
 block discarded – undo
2235 2235
 
2236 2236
         // send statistics
2237 2237
         if (null !== $post_status) {
2238
-            DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'send_stats');
2238
+            DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'send_stats');
2239 2239
             $counter = DB::count();
2240 2240
             if ($counter === 0) {
2241 2241
                 DB::insert(
@@ -2266,7 +2266,7 @@  discard block
 block discarded – undo
2266 2266
 
2267 2267
         // send statistics items
2268 2268
         if (null !== $post_list) {
2269
-            DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', 'admin', 'send_statistics_items');
2269
+            DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', 'admin', 'send_statistics_items');
2270 2270
             $counter = DB::count();
2271 2271
             if ($counter === 0) {
2272 2272
                 DB::insert(
@@ -2312,7 +2312,7 @@  discard block
 block discarded – undo
2312 2312
             break;
2313 2313
         }
2314 2314
 
2315
-        if (DB::query("SHOW TABLES LIKE '" . prefixTable('sk_reencrypt_backup') . "'")) {
2315
+        if (DB::query("SHOW TABLES LIKE '".prefixTable('sk_reencrypt_backup')."'")) {
2316 2316
             if (DB::count() === 1) {
2317 2317
                 echo 1;
2318 2318
             } else {
@@ -2350,7 +2350,7 @@  discard block
 block discarded – undo
2350 2350
 
2351 2351
         $rows = DB::query(
2352 2352
             'SELECT id, title
2353
-                FROM ' . prefixTable('roles_title') . '
2353
+                FROM ' . prefixTable('roles_title').'
2354 2354
                 ORDER BY title ASC'
2355 2355
         );
2356 2356
         foreach ($rows as $record) {
@@ -2473,7 +2473,7 @@  discard block
 block discarded – undo
2473 2473
 
2474 2474
         $ignoredFiles = DB::queryFirstField(
2475 2475
             'SELECT valeur 
2476
-            FROM ' . prefixTable('misc') . ' 
2476
+            FROM ' . prefixTable('misc').' 
2477 2477
             WHERE type = %s AND intitule = %s',
2478 2478
             'admin',
2479 2479
             'ignored_unknown_files'
@@ -2516,7 +2516,7 @@  discard block
 block discarded – undo
2516 2516
         // Get ignored unknown files
2517 2517
         $existingData = DB::queryFirstRow(
2518 2518
             'SELECT valeur 
2519
-            FROM ' . prefixTable('misc') . ' 
2519
+            FROM ' . prefixTable('misc').' 
2520 2520
             WHERE type = %s AND intitule = %s',
2521 2521
             'admin',
2522 2522
             'ignored_unknown_files'
@@ -2573,7 +2573,7 @@  discard block
 block discarded – undo
2573 2573
         // Get the list of files to delete
2574 2574
         $filesToDelete = DB::queryFirstField(
2575 2575
             'SELECT valeur 
2576
-            FROM ' . prefixTable('misc') . ' 
2576
+            FROM ' . prefixTable('misc').' 
2577 2577
             WHERE type = %s AND intitule = %s',
2578 2578
             'admin',
2579 2579
             'unknown_files'
@@ -2620,7 +2620,7 @@  discard block
 block discarded – undo
2620 2620
     $lang = new Language($session->get('user-language') ?? 'english');
2621 2621
 
2622 2622
     $results = [];
2623
-    $fullPath = __DIR__ . '/../';
2623
+    $fullPath = __DIR__.'/../';
2624 2624
     
2625 2625
     foreach ($files as $file) {
2626 2626
         // Normalize path separators for cross-platform compatibility
@@ -2669,7 +2669,7 @@  discard block
 block discarded – undo
2669 2669
         }
2670 2670
         
2671 2671
         // Try to delete the file
2672
-        $deleteResult = '';//@unlink($normalizedPath);
2672
+        $deleteResult = ''; //@unlink($normalizedPath);
2673 2673
         
2674 2674
         if ($deleteResult) {
2675 2675
             $results[$normalizedPath] = [
@@ -2699,7 +2699,7 @@  discard block
 block discarded – undo
2699 2699
  */
2700 2700
 function filesIntegrityCheck($baseDir): array
2701 2701
 {
2702
-    $referenceFile = __DIR__ . '/../files_reference.txt';
2702
+    $referenceFile = __DIR__.'/../files_reference.txt';
2703 2703
 
2704 2704
     $unknownFiles = findUnknownFiles($baseDir, $referenceFile);
2705 2705
 
@@ -2737,7 +2737,7 @@  discard block
 block discarded – undo
2737 2737
                 $dir,
2738 2738
                 FilesystemIterator::SKIP_DOTS
2739 2739
             ),
2740
-            function ($current, $key, $iterator) {
2740
+            function($current, $key, $iterator) {
2741 2741
                 // Ignore hidden files and folders
2742 2742
                 if ($current->getFilename()[0] === '.') {
2743 2743
                     return false;
@@ -2751,7 +2751,7 @@  discard block
 block discarded – undo
2751 2751
     foreach ($iterator as $file) {
2752 2752
         try {
2753 2753
             if ($file->isFile()) {
2754
-                $relativePath = str_replace($dir . DIRECTORY_SEPARATOR, '', $file->getPathname());
2754
+                $relativePath = str_replace($dir.DIRECTORY_SEPARATOR, '', $file->getPathname());
2755 2755
                 $relativePath = str_replace('\\', '/', $relativePath); // Normalisation Windows/Linux
2756 2756
 
2757 2757
                 // Split relatif path into parts
@@ -2817,7 +2817,7 @@  discard block
 block discarded – undo
2817 2817
     // Get ignored files
2818 2818
     $ignoredFiles = DB::queryFirstField(
2819 2819
         'SELECT valeur 
2820
-        FROM ' . prefixTable('misc') . ' 
2820
+        FROM ' . prefixTable('misc').' 
2821 2821
         WHERE type = %s AND intitule = %s',
2822 2822
         'admin',
2823 2823
         'ignored_unknown_files'
@@ -2836,7 +2836,7 @@  discard block
 block discarded – undo
2836 2836
 function tablesIntegrityCheck(): array
2837 2837
 {
2838 2838
     // Get integrity tables file
2839
-    $integrityTablesFile = TEAMPASS_ROOT_PATH . '/includes/tables_integrity.json';
2839
+    $integrityTablesFile = TEAMPASS_ROOT_PATH.'/includes/tables_integrity.json';
2840 2840
     if (file_exists($integrityTablesFile) === false) {
2841 2841
         return [
2842 2842
             'error' => true,
@@ -2854,7 +2854,7 @@  discard block
 block discarded – undo
2854 2854
     // Get all tables
2855 2855
     $tables = [];
2856 2856
     foreach (DB::queryFirstColumn("SHOW TABLES") as $table) {
2857
-        $tables[] = str_replace(DB_PREFIX, "", $table);;
2857
+        $tables[] = str_replace(DB_PREFIX, "", $table); ;
2858 2858
     }
2859 2859
     // Prepare the integrity check
2860 2860
     $tablesInError = [];
Please login to merge, or discard this patch.
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.
sources/folders.class.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
         $parentComplexity = $this->checkComplexityLevel($parentFolderData, $complexity, $parent_id);
93 93
         if (isset($parentComplexity['error']) && $parentComplexity['error'] === true) {
94
-            return $this->errorResponse($this->lang->get('error_folder_complexity_lower_than_top_folder') . " [<b>{$this->settings['TP_PW_COMPLEXITY'][$parentComplexity['valeur']][1]}</b>]");
94
+            return $this->errorResponse($this->lang->get('error_folder_complexity_lower_than_top_folder')." [<b>{$this->settings['TP_PW_COMPLEXITY'][$parentComplexity['valeur']][1]}</b>]");
95 95
         }
96 96
 
97 97
         return $this->createFolder($params, array_merge($parentFolderData, $parentComplexity), $options);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         ) {
145 145
             DB::query(
146 146
                 'SELECT *
147
-                FROM ' . prefixTable('nested_tree') . '
147
+                FROM ' . prefixTable('nested_tree').'
148 148
                 WHERE title = %s AND personal_folder = 0',
149 149
                 $title
150 150
             );
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         //check if parent folder is personal
169 169
         $data = DB::queryFirstRow(
170 170
             'SELECT personal_folder, bloquer_creation, bloquer_modification
171
-            FROM ' . prefixTable('nested_tree') . '
171
+            FROM ' . prefixTable('nested_tree').'
172 172
             WHERE id = %i',
173 173
             $parent_id
174 174
         );
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             // get complexity level for this folder
208 208
             $data = DB::queryFirstRow(
209 209
                 'SELECT valeur
210
-                FROM ' . prefixTable('misc') . '
210
+                FROM ' . prefixTable('misc').'
211 211
                 WHERE intitule = %i AND type = %s',
212 212
                 $parent_id,
213 213
                 'complex'
@@ -278,11 +278,11 @@  discard block
 block discarded – undo
278 278
      */
279 279
     private function canCreateFolder($isPersonal, $user_is_admin, $user_is_manager, $user_can_manage_all_users, $user_can_create_root_folder)
280 280
     {
281
-        return (int)$isPersonal === 1 ||
282
-            (int)$user_is_admin === 1 ||
283
-            ((int)$user_is_manager === 1 || (int)$user_can_manage_all_users === 1) ||
281
+        return (int) $isPersonal === 1 ||
282
+            (int) $user_is_admin === 1 ||
283
+            ((int) $user_is_manager === 1 || (int) $user_can_manage_all_users === 1) ||
284 284
             ($this->settings['enable_user_can_create_folders'] ?? false) ||
285
-            ((int)$user_can_create_root_folder === 1);
285
+            ((int) $user_can_create_root_folder === 1);
286 286
     }
287 287
 
288 288
     /**
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
         $path = '';
363 363
         $tree_path = $tree->getPath(0, false);
364 364
         foreach ($tree_path as $fld) {
365
-            $path .= empty($path) ? $fld->title : '/' . $fld->title;
365
+            $path .= empty($path) ? $fld->title : '/'.$fld->title;
366 366
         }
367 367
 
368 368
         $new_json = [
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 
379 379
         $cache_tree = DB::queryFirstRow(
380 380
             'SELECT increment_id, folders, visible_folders 
381
-            FROM ' . prefixTable('cache_tree') . ' 
381
+            FROM ' . prefixTable('cache_tree').' 
382 382
             WHERE user_id = %i', 
383 383
             (int) $user_id
384 384
         );
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     private function manageFolderPermissions($parent_id, $newId, $user_roles, $access_rights, $user_is_admin)
420 420
     {
421 421
         if ($parent_id !== 0 && $this->settings['subfolder_rights_as_parent'] ?? false) {
422
-            $rows = DB::query('SELECT role_id, type FROM ' . prefixTable('roles_values') . ' WHERE folder_id = %i', $parent_id);
422
+            $rows = DB::query('SELECT role_id, type FROM '.prefixTable('roles_values').' WHERE folder_id = %i', $parent_id);
423 423
             foreach ($rows as $record) {
424 424
                 DB::insert(prefixTable('roles_values'), [
425 425
                     'role_id' => $record['role_id'],
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
                     'type' => $record['type'],
428 428
                 ]);
429 429
             }
430
-        } elseif ((int)$user_is_admin !== 1) {
430
+        } elseif ((int) $user_is_admin !== 1) {
431 431
             foreach (array_unique(explode(';', $user_roles)) as $role) {
432 432
                 if (!empty($role)) {
433 433
                     DB::insert(prefixTable('roles_values'), [
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     private function copyCustomFieldsCategories($parent_id, $newId)
447 447
     {
448
-        $rows = DB::query('SELECT id_category FROM ' . prefixTable('categories_folders') . ' WHERE id_folder = %i', $parent_id);
448
+        $rows = DB::query('SELECT id_category FROM '.prefixTable('categories_folders').' WHERE id_folder = %i', $parent_id);
449 449
         foreach ($rows as $record) {
450 450
             DB::insert(prefixTable('categories_folders'), [
451 451
                 'id_category' => $record['id_category'],
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
             // Search for existing job
471 471
             $count = DB::queryFirstRow(
472 472
                 'SELECT COUNT(*) AS count
473
-                FROM ' . prefixTable('background_tasks') . '
473
+                FROM ' . prefixTable('background_tasks').'
474 474
                 WHERE is_in_progress = %i AND process_type = %s AND arguments = %s',
475 475
                 0,
476 476
                 'user_build_cache_tree',
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
         return [
505 505
             'error' => true,
506 506
             'message' => $message,
507
-            'newId' => '' . $newIdSuffix,
507
+            'newId' => ''.$newIdSuffix,
508 508
         ];
509 509
     }
510 510
 }
Please login to merge, or discard this patch.
sources/main.functions.php 1 patch
Spacing   +164 added lines, -166 removed lines patch added patch discarded remove patch
@@ -134,19 +134,19 @@  discard block
 block discarded – undo
134 134
             $text = Crypto::decrypt($message, $key);
135 135
         }
136 136
     } catch (CryptoException\WrongKeyOrModifiedCiphertextException $ex) {
137
-        error_log('TEAMPASS-Error-Wrong key or modified ciphertext: ' . $ex->getMessage());
137
+        error_log('TEAMPASS-Error-Wrong key or modified ciphertext: '.$ex->getMessage());
138 138
         $err = 'wrong_key_or_modified_ciphertext';
139 139
     } catch (CryptoException\BadFormatException $ex) {
140
-        error_log('TEAMPASS-Error-Bad format exception: ' . $ex->getMessage());
140
+        error_log('TEAMPASS-Error-Bad format exception: '.$ex->getMessage());
141 141
         $err = 'bad_format';
142 142
     } catch (CryptoException\EnvironmentIsBrokenException $ex) {
143
-        error_log('TEAMPASS-Error-Environment: ' . $ex->getMessage());
143
+        error_log('TEAMPASS-Error-Environment: '.$ex->getMessage());
144 144
         $err = 'environment_error';
145 145
     } catch (CryptoException\IOException $ex) {
146
-        error_log('TEAMPASS-Error-IO: ' . $ex->getMessage());
146
+        error_log('TEAMPASS-Error-IO: '.$ex->getMessage());
147 147
         $err = 'io_error';
148 148
     } catch (Exception $ex) {
149
-        error_log('TEAMPASS-Error-Unexpected exception: ' . $ex->getMessage());
149
+        error_log('TEAMPASS-Error-Unexpected exception: '.$ex->getMessage());
150 150
         $err = 'unexpected_error';
151 151
     }
152 152
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
  */
232 232
 function trimElement($chaine, string $element): string
233 233
 {
234
-    if (! empty($chaine)) {
234
+    if (!empty($chaine)) {
235 235
         if (is_array($chaine) === true) {
236 236
             $chaine = implode(';', $chaine);
237 237
         }
@@ -279,8 +279,8 @@  discard block
 block discarded – undo
279 279
  */
280 280
 function db_error_handler(array $params): void
281 281
 {
282
-    echo 'Error: ' . $params['error'] . "<br>\n";
283
-    echo 'Query: ' . $params['query'] . "<br>\n";
282
+    echo 'Error: '.$params['error']."<br>\n";
283
+    echo 'Query: '.$params['query']."<br>\n";
284 284
     throw new Exception('Error - Query', 1);
285 285
 }
286 286
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
     $session->set('user-forbiden_personal_folders', []);
359 359
     
360 360
     // Get list of Folders
361
-    $rows = DB::query('SELECT id FROM ' . prefixTable('nested_tree') . ' WHERE personal_folder = %i', 0);
361
+    $rows = DB::query('SELECT id FROM '.prefixTable('nested_tree').' WHERE personal_folder = %i', 0);
362 362
     foreach ($rows as $record) {
363 363
         array_push($groupesVisibles, $record['id']);
364 364
     }
@@ -368,20 +368,20 @@  discard block
 block discarded – undo
368 368
     // get complete list of ROLES
369 369
     $tmp = explode(';', $idFonctions);
370 370
     $rows = DB::query(
371
-        'SELECT * FROM ' . prefixTable('roles_title') . '
371
+        'SELECT * FROM '.prefixTable('roles_title').'
372 372
         ORDER BY title ASC'
373 373
     );
374 374
     foreach ($rows as $record) {
375
-        if (! empty($record['id']) && ! in_array($record['id'], $tmp)) {
375
+        if (!empty($record['id']) && !in_array($record['id'], $tmp)) {
376 376
             array_push($tmp, $record['id']);
377 377
         }
378 378
     }
379 379
     $session->set('user-roles', implode(';', $tmp));
380 380
     $session->set('user-admin', 1);
381 381
     // Check if admin has created Folders and Roles
382
-    DB::query('SELECT * FROM ' . prefixTable('nested_tree') . '');
382
+    DB::query('SELECT * FROM '.prefixTable('nested_tree').'');
383 383
     $session->set('user-nb_folders', DB::count());
384
-    DB::query('SELECT * FROM ' . prefixTable('roles_title'));
384
+    DB::query('SELECT * FROM '.prefixTable('roles_title'));
385 385
     $session->set('user-nb_roles', DB::count());
386 386
 
387 387
     return true;
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
     // Does this user is allowed to see other items
465 465
     $inc = 0;
466 466
     $rows = DB::query(
467
-        'SELECT id, id_tree FROM ' . prefixTable('items') . '
467
+        'SELECT id, id_tree FROM '.prefixTable('items').'
468 468
             WHERE restricted_to LIKE %ss AND inactif = %s'.
469 469
             (count($allowedFolders) > 0 ? ' AND id_tree NOT IN ('.implode(',', $allowedFolders).')' : ''),
470 470
         $globalsUserId,
@@ -481,8 +481,8 @@  discard block
 block discarded – undo
481 481
     // Check for the users roles if some specific rights exist on items
482 482
     $rows = DB::query(
483 483
         'SELECT i.id_tree, r.item_id
484
-        FROM ' . prefixTable('items') . ' as i
485
-        INNER JOIN ' . prefixTable('restriction_to_roles') . ' as r ON (r.item_id=i.id)
484
+        FROM ' . prefixTable('items').' as i
485
+        INNER JOIN ' . prefixTable('restriction_to_roles').' as r ON (r.item_id=i.id)
486 486
         WHERE i.id_tree <> "" '.
487 487
         (count($userRoles) > 0 ? 'AND r.role_id IN %li ' : '').
488 488
         'ORDER BY i.id_tree ASC',
@@ -536,18 +536,18 @@  discard block
 block discarded – undo
536 536
         ), SORT_NUMERIC)
537 537
     );
538 538
     // Folders and Roles numbers
539
-    DB::queryFirstRow('SELECT id FROM ' . prefixTable('nested_tree') . '');
540
-    DB::queryFirstRow('SELECT id FROM ' . prefixTable('nested_tree') . '');
539
+    DB::queryFirstRow('SELECT id FROM '.prefixTable('nested_tree').'');
540
+    DB::queryFirstRow('SELECT id FROM '.prefixTable('nested_tree').'');
541 541
     $session->set('user-nb_folders', DB::count());
542
-    DB::queryFirstRow('SELECT id FROM ' . prefixTable('roles_title'));
543
-    DB::queryFirstRow('SELECT id FROM ' . prefixTable('roles_title'));
542
+    DB::queryFirstRow('SELECT id FROM '.prefixTable('roles_title'));
543
+    DB::queryFirstRow('SELECT id FROM '.prefixTable('roles_title'));
544 544
     $session->set('user-nb_roles', DB::count());
545 545
     // check if change proposals on User's items
546 546
     if (isset($SETTINGS['enable_suggestion']) === true && (int) $SETTINGS['enable_suggestion'] === 1) {
547 547
         $countNewItems = DB::query(
548 548
             'SELECT COUNT(*)
549
-            FROM ' . prefixTable('items_change') . ' AS c
550
-            LEFT JOIN ' . prefixTable('log_items') . ' AS i ON (c.item_id = i.id_item)
549
+            FROM ' . prefixTable('items_change').' AS c
550
+            LEFT JOIN ' . prefixTable('log_items').' AS i ON (c.item_id = i.id_item)
551 551
             WHERE i.action = %s AND i.id_user = %i',
552 552
             'at_creation',
553 553
             $globalsUserId
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 {
575 575
     $rows = DB::query(
576 576
         'SELECT *
577
-        FROM ' . prefixTable('roles_values') . '
577
+        FROM ' . prefixTable('roles_values').'
578 578
         WHERE type IN %ls'.(count($userRoles) > 0 ? ' AND role_id IN %li' : ''),
579 579
         ['W', 'ND', 'NE', 'NDNE', 'R'],
580 580
         $userRoles,
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
     ) {
642 642
         $persoFld = DB::queryFirstRow(
643 643
             'SELECT id
644
-            FROM ' . prefixTable('nested_tree') . '
644
+            FROM ' . prefixTable('nested_tree').'
645 645
             WHERE title = %s AND personal_folder = %i'.
646 646
             (count($allowedFolders) > 0 ? ' AND id NOT IN ('.implode(',', $allowedFolders).')' : ''),
647 647
             $globalsUserId,
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
     }
675 675
     $persoFlds = DB::query(
676 676
         'SELECT id
677
-        FROM ' . prefixTable('nested_tree') . '
677
+        FROM ' . prefixTable('nested_tree').'
678 678
         WHERE %l',
679 679
         $where
680 680
     );
@@ -742,12 +742,12 @@  discard block
 block discarded – undo
742 742
     //Load Tree
743 743
     $tree = new NestedTree(prefixTable('nested_tree'), 'id', 'parent_id', 'title');
744 744
     // truncate table
745
-    DB::query('TRUNCATE TABLE ' . prefixTable('cache'));
745
+    DB::query('TRUNCATE TABLE '.prefixTable('cache'));
746 746
     // reload date
747 747
     $rows = DB::query(
748 748
         'SELECT *
749
-        FROM ' . prefixTable('items') . ' as i
750
-        INNER JOIN ' . prefixTable('log_items') . ' as l ON (l.id_item = i.id)
749
+        FROM ' . prefixTable('items').' as i
750
+        INNER JOIN ' . prefixTable('log_items').' as l ON (l.id_item = i.id)
751 751
         AND l.action = %s
752 752
         AND i.inactif = %i',
753 753
         'at_creation',
@@ -759,18 +759,18 @@  discard block
 block discarded – undo
759 759
             $tags = '';
760 760
             $itemTags = DB::query(
761 761
                 'SELECT tag
762
-                FROM ' . prefixTable('tags') . '
762
+                FROM ' . prefixTable('tags').'
763 763
                 WHERE item_id = %i AND tag != ""',
764 764
                 $record['id']
765 765
             );
766 766
             foreach ($itemTags as $itemTag) {
767
-                $tags .= $itemTag['tag'] . ' ';
767
+                $tags .= $itemTag['tag'].' ';
768 768
             }
769 769
 
770 770
             // Get renewal period
771 771
             $resNT = DB::queryFirstRow(
772 772
                 'SELECT renewal_period
773
-                FROM ' . prefixTable('nested_tree') . '
773
+                FROM ' . prefixTable('nested_tree').'
774 774
                 WHERE id = %i',
775 775
                 $record['id_tree']
776 776
             );
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
                     // Is this a User id?
784 784
                     $user = DB::queryFirstRow(
785 785
                         'SELECT id, login
786
-                        FROM ' . prefixTable('users') . '
786
+                        FROM ' . prefixTable('users').'
787 787
                         WHERE id = %i',
788 788
                         $elem->title
789 789
                     );
@@ -801,11 +801,11 @@  discard block
 block discarded – undo
801 801
                     'id' => $record['id'],
802 802
                     'label' => $record['label'],
803 803
                     'description' => $record['description'] ?? '',
804
-                    'url' => isset($record['url']) && ! empty($record['url']) ? $record['url'] : '0',
804
+                    'url' => isset($record['url']) && !empty($record['url']) ? $record['url'] : '0',
805 805
                     'tags' => $tags,
806 806
                     'id_tree' => $record['id_tree'],
807 807
                     'perso' => $record['perso'],
808
-                    'restricted_to' => isset($record['restricted_to']) && ! empty($record['restricted_to']) ? $record['restricted_to'] : '0',
808
+                    'restricted_to' => isset($record['restricted_to']) && !empty($record['restricted_to']) ? $record['restricted_to'] : '0',
809 809
                     'login' => $record['login'] ?? '',
810 810
                     'folder' => implode(' » ', $folder),
811 811
                     'author' => $record['id_user'],
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
     // get new value from db
835 835
     $data = DB::queryFirstRow(
836 836
         'SELECT label, description, id_tree, perso, restricted_to, login, url
837
-        FROM ' . prefixTable('items') . '
837
+        FROM ' . prefixTable('items').'
838 838
         WHERE id=%i',
839 839
         $ident
840 840
     );
@@ -842,12 +842,12 @@  discard block
 block discarded – undo
842 842
     $tags = '';
843 843
     $itemTags = DB::query(
844 844
         'SELECT tag
845
-            FROM ' . prefixTable('tags') . '
845
+            FROM ' . prefixTable('tags').'
846 846
             WHERE item_id = %i AND tag != ""',
847 847
         $ident
848 848
     );
849 849
     foreach ($itemTags as $itemTag) {
850
-        $tags .= $itemTag['tag'] . ' ';
850
+        $tags .= $itemTag['tag'].' ';
851 851
     }
852 852
     // form id_tree to full foldername
853 853
     $folder = [];
@@ -858,7 +858,7 @@  discard block
 block discarded – undo
858 858
             // Is this a User id?
859 859
             $user = DB::queryFirstRow(
860 860
                 'SELECT id, login
861
-                FROM ' . prefixTable('users') . '
861
+                FROM ' . prefixTable('users').'
862 862
                 WHERE id = %i',
863 863
                 $elem->title
864 864
             );
@@ -876,10 +876,10 @@  discard block
 block discarded – undo
876 876
             'label' => $data['label'],
877 877
             'description' => $data['description'],
878 878
             'tags' => $tags,
879
-            'url' => isset($data['url']) && ! empty($data['url']) ? $data['url'] : '0',
879
+            'url' => isset($data['url']) && !empty($data['url']) ? $data['url'] : '0',
880 880
             'id_tree' => $data['id_tree'],
881 881
             'perso' => $data['perso'],
882
-            'restricted_to' => isset($data['restricted_to']) && ! empty($data['restricted_to']) ? $data['restricted_to'] : '0',
882
+            'restricted_to' => isset($data['restricted_to']) && !empty($data['restricted_to']) ? $data['restricted_to'] : '0',
883 883
             'login' => $data['login'] ?? '',
884 884
             'folder' => implode(' » ', $folder),
885 885
             'author' => $session->get('user-id'),
@@ -909,8 +909,8 @@  discard block
 block discarded – undo
909 909
     // get new value from db
910 910
     $data = DB::queryFirstRow(
911 911
         'SELECT i.label, i.description, i.id_tree as id_tree, i.perso, i.restricted_to, i.id, i.login, i.url, l.date
912
-        FROM ' . prefixTable('items') . ' as i
913
-        INNER JOIN ' . prefixTable('log_items') . ' as l ON (l.id_item = i.id)
912
+        FROM ' . prefixTable('items').' as i
913
+        INNER JOIN ' . prefixTable('log_items').' as l ON (l.id_item = i.id)
914 914
         WHERE i.id = %i
915 915
         AND l.action = %s',
916 916
         $ident,
@@ -920,12 +920,12 @@  discard block
 block discarded – undo
920 920
     $tags = '';
921 921
     $itemTags = DB::query(
922 922
         'SELECT tag
923
-            FROM ' . prefixTable('tags') . '
923
+            FROM ' . prefixTable('tags').'
924 924
             WHERE item_id = %i AND tag != ""',
925 925
         $ident
926 926
     );
927 927
     foreach ($itemTags as $itemTag) {
928
-        $tags .= $itemTag['tag'] . ' ';
928
+        $tags .= $itemTag['tag'].' ';
929 929
     }
930 930
     // form id_tree to full foldername
931 931
     $folder = [];
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
             // Is this a User id?
937 937
             $user = DB::queryFirstRow(
938 938
                 'SELECT id, login
939
-                FROM ' . prefixTable('users') . '
939
+                FROM ' . prefixTable('users').'
940 940
                 WHERE id = %i',
941 941
                 $elem->title
942 942
             );
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
             'label' => $data['label'],
956 956
             'description' => $data['description'],
957 957
             'tags' => empty($tags) === false ? $tags : 'None',
958
-            'url' => isset($data['url']) && ! empty($data['url']) ? $data['url'] : '0',
958
+            'url' => isset($data['url']) && !empty($data['url']) ? $data['url'] : '0',
959 959
             'id_tree' => $data['id_tree'],
960 960
             'perso' => isset($data['perso']) && empty($data['perso']) === false && $data['perso'] !== 'None' ? $data['perso'] : '0',
961 961
             'restricted_to' => isset($data['restricted_to']) && empty($data['restricted_to']) === false ? $data['restricted_to'] : '0',
@@ -977,53 +977,53 @@  discard block
 block discarded – undo
977 977
 function getStatisticsData(array $SETTINGS): array
978 978
 {
979 979
     DB::query(
980
-        'SELECT id FROM ' . prefixTable('nested_tree') . ' WHERE personal_folder = %i',
980
+        'SELECT id FROM '.prefixTable('nested_tree').' WHERE personal_folder = %i',
981 981
         0
982 982
     );
983 983
     $counter_folders = DB::count();
984 984
     DB::query(
985
-        'SELECT id FROM ' . prefixTable('nested_tree') . ' WHERE personal_folder = %i',
985
+        'SELECT id FROM '.prefixTable('nested_tree').' WHERE personal_folder = %i',
986 986
         1
987 987
     );
988 988
     $counter_folders_perso = DB::count();
989 989
     DB::query(
990
-        'SELECT id FROM ' . prefixTable('items') . ' WHERE perso = %i',
990
+        'SELECT id FROM '.prefixTable('items').' WHERE perso = %i',
991 991
         0
992 992
     );
993 993
     $counter_items = DB::count();
994 994
         DB::query(
995
-        'SELECT id FROM ' . prefixTable('items') . ' WHERE perso = %i',
995
+        'SELECT id FROM '.prefixTable('items').' WHERE perso = %i',
996 996
         1
997 997
     );
998 998
     $counter_items_perso = DB::count();
999 999
         DB::query(
1000
-        'SELECT id FROM ' . prefixTable('users') . ' WHERE login NOT IN (%s, %s, %s)',
1000
+        'SELECT id FROM '.prefixTable('users').' WHERE login NOT IN (%s, %s, %s)',
1001 1001
         'OTV', 'TP', 'API'
1002 1002
     );
1003 1003
     $counter_users = DB::count();
1004 1004
         DB::query(
1005
-        'SELECT id FROM ' . prefixTable('users') . ' WHERE admin = %i',
1005
+        'SELECT id FROM '.prefixTable('users').' WHERE admin = %i',
1006 1006
         1
1007 1007
     );
1008 1008
     $admins = DB::count();
1009 1009
     DB::query(
1010
-        'SELECT id FROM ' . prefixTable('users') . ' WHERE gestionnaire = %i',
1010
+        'SELECT id FROM '.prefixTable('users').' WHERE gestionnaire = %i',
1011 1011
         1
1012 1012
     );
1013 1013
     $managers = DB::count();
1014 1014
     DB::query(
1015
-        'SELECT id FROM ' . prefixTable('users') . ' WHERE read_only = %i',
1015
+        'SELECT id FROM '.prefixTable('users').' WHERE read_only = %i',
1016 1016
         1
1017 1017
     );
1018 1018
     $readOnly = DB::count();
1019 1019
     // list the languages
1020 1020
     $usedLang = [];
1021 1021
     $tp_languages = DB::query(
1022
-        'SELECT name FROM ' . prefixTable('languages')
1022
+        'SELECT name FROM '.prefixTable('languages')
1023 1023
     );
1024 1024
     foreach ($tp_languages as $tp_language) {
1025 1025
         DB::query(
1026
-            'SELECT * FROM ' . prefixTable('users') . ' WHERE user_language = %s',
1026
+            'SELECT * FROM '.prefixTable('users').' WHERE user_language = %s',
1027 1027
             $tp_language['name']
1028 1028
         );
1029 1029
         $usedLang[$tp_language['name']] = round((DB::count() * 100 / $counter_users), 0);
@@ -1032,12 +1032,12 @@  discard block
 block discarded – undo
1032 1032
     // get list of ips
1033 1033
     $usedIp = [];
1034 1034
     $tp_ips = DB::query(
1035
-        'SELECT user_ip FROM ' . prefixTable('users')
1035
+        'SELECT user_ip FROM '.prefixTable('users')
1036 1036
     );
1037 1037
     foreach ($tp_ips as $ip) {
1038 1038
         if (array_key_exists($ip['user_ip'], $usedIp)) {
1039 1039
             $usedIp[$ip['user_ip']] += $usedIp[$ip['user_ip']];
1040
-        } elseif (! empty($ip['user_ip']) && $ip['user_ip'] !== 'none') {
1040
+        } elseif (!empty($ip['user_ip']) && $ip['user_ip'] !== 'none') {
1041 1041
             $usedIp[$ip['user_ip']] = 1;
1042 1042
         }
1043 1043
     }
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
         <table width="600" cellpadding="0" cellspacing="0" border="0" class="container" bgcolor="#ffffff" style="border-spacing: 0; border-bottom: 1px solid #e0e0e0; box-shadow: 0 0 3px #ddd; color: #434343; font-family: Helvetica, Verdana, sans-serif;">
1133 1133
         <tr><td class="container-padding" bgcolor="#ffffff" style="border-collapse: collapse; border-left: 1px solid #e0e0e0; background-color: #ffffff; padding-left: 30px; padding-right: 30px;">
1134 1134
         <br><div style="float:right;">' .
1135
-        $textMail .
1135
+        $textMail.
1136 1136
         '<br><br></td></tr></table>
1137 1137
     </td></tr></table>
1138 1138
     <br></body></html>';
@@ -1213,7 +1213,7 @@  discard block
 block discarded – undo
1213 1213
 {
1214 1214
     array_walk_recursive(
1215 1215
         $array,
1216
-        static function (&$item): void {
1216
+        static function(&$item): void {
1217 1217
             if (mb_detect_encoding((string) $item, 'utf-8', true) === false) {
1218 1218
                 $item = mb_convert_encoding($item, 'ISO-8859-1', 'UTF-8');
1219 1219
             }
@@ -1324,7 +1324,7 @@  discard block
 block discarded – undo
1324 1324
  */
1325 1325
 function prefixTable(string $table): string
1326 1326
 {
1327
-    $safeTable = htmlspecialchars(DB_PREFIX . $table);
1327
+    $safeTable = htmlspecialchars(DB_PREFIX.$table);
1328 1328
     return $safeTable;
1329 1329
 }
1330 1330
 
@@ -1441,7 +1441,7 @@  discard block
 block discarded – undo
1441 1441
 function send_syslog($message, $host, $port, $component = 'teampass'): void
1442 1442
 {
1443 1443
     $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
1444
-    $syslog_message = '<123>' . date('M d H:i:s ') . $component . ': ' . $message;
1444
+    $syslog_message = '<123>'.date('M d H:i:s ').$component.': '.$message;
1445 1445
     socket_sendto($sock, (string) $syslog_message, strlen($syslog_message), 0, (string) $host, (int) $port);
1446 1446
     socket_close($sock);
1447 1447
 }
@@ -1488,14 +1488,14 @@  discard block
 block discarded – undo
1488 1488
     if (isset($SETTINGS['syslog_enable']) === true && (int) $SETTINGS['syslog_enable'] === 1) {
1489 1489
         if ($type === 'user_mngt') {
1490 1490
             send_syslog(
1491
-                'action=' . str_replace('at_', '', $label) . ' attribute=user user=' . $who . ' userid="' . $login . '" change="' . $field_1 . '" ',
1491
+                'action='.str_replace('at_', '', $label).' attribute=user user='.$who.' userid="'.$login.'" change="'.$field_1.'" ',
1492 1492
                 $SETTINGS['syslog_host'],
1493 1493
                 $SETTINGS['syslog_port'],
1494 1494
                 'teampass'
1495 1495
             );
1496 1496
         } else {
1497 1497
             send_syslog(
1498
-                'action=' . $type . ' attribute=' . $label . ' user=' . $who . ' userid="' . $login . '" ',
1498
+                'action='.$type.' attribute='.$label.' user='.$who.' userid="'.$login.'" ',
1499 1499
                 $SETTINGS['syslog_host'],
1500 1500
                 $SETTINGS['syslog_port'],
1501 1501
                 'teampass'
@@ -1570,7 +1570,7 @@  discard block
 block discarded – undo
1570 1570
         if (empty($item_label) === true) {
1571 1571
             $dataItem = DB::queryFirstRow(
1572 1572
                 'SELECT id, id_tree, label
1573
-                FROM ' . prefixTable('items') . '
1573
+                FROM ' . prefixTable('items').'
1574 1574
                 WHERE id = %i',
1575 1575
                 $item_id
1576 1576
             );
@@ -1578,11 +1578,11 @@  discard block
 block discarded – undo
1578 1578
         }
1579 1579
 
1580 1580
         send_syslog(
1581
-            'action=' . str_replace('at_', '', $action) .
1582
-                ' attribute=' . str_replace('at_', '', $attribute[0]) .
1583
-                ' itemno=' . $item_id .
1584
-                ' user=' . (is_null($login) === true ? '' : addslashes((string) $login)) .
1585
-                ' itemname="' . addslashes($item_label) . '"',
1581
+            'action='.str_replace('at_', '', $action).
1582
+                ' attribute='.str_replace('at_', '', $attribute[0]).
1583
+                ' itemno='.$item_id.
1584
+                ' user='.(is_null($login) === true ? '' : addslashes((string) $login)).
1585
+                ' itemname="'.addslashes($item_label).'"',
1586 1586
             $SETTINGS['syslog_host'],
1587 1587
             $SETTINGS['syslog_port'],
1588 1588
             'teampass'
@@ -1613,8 +1613,8 @@  discard block
 block discarded – undo
1613 1613
     // send email to user that what to be notified
1614 1614
     $notification = DB::queryFirstField(
1615 1615
         'SELECT email
1616
-        FROM ' . prefixTable('notification') . ' AS n
1617
-        INNER JOIN ' . prefixTable('users') . ' AS u ON (n.user_id = u.id)
1616
+        FROM ' . prefixTable('notification').' AS n
1617
+        INNER JOIN ' . prefixTable('users').' AS u ON (n.user_id = u.id)
1618 1618
         WHERE n.item_id = %i AND n.user_id != %i',
1619 1619
         $item_id,
1620 1620
         $globalsUserId
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
         // Get list of changes
1626 1626
         $htmlChanges = '<ul>';
1627 1627
         foreach ($changes as $change) {
1628
-            $htmlChanges .= '<li>' . $change . '</li>';
1628
+            $htmlChanges .= '<li>'.$change.'</li>';
1629 1629
         }
1630 1630
         $htmlChanges .= '</ul>';
1631 1631
         // send email
@@ -1662,15 +1662,15 @@  discard block
 block discarded – undo
1662 1662
     $path = '';
1663 1663
     foreach ($arbo as $elem) {
1664 1664
         if (empty($path) === true) {
1665
-            $path = htmlspecialchars(stripslashes(htmlspecialchars_decode($elem->title, ENT_QUOTES)), ENT_QUOTES) . ' ';
1665
+            $path = htmlspecialchars(stripslashes(htmlspecialchars_decode($elem->title, ENT_QUOTES)), ENT_QUOTES).' ';
1666 1666
         } else {
1667
-            $path .= '&#8594; ' . htmlspecialchars(stripslashes(htmlspecialchars_decode($elem->title, ENT_QUOTES)), ENT_QUOTES);
1667
+            $path .= '&#8594; '.htmlspecialchars(stripslashes(htmlspecialchars_decode($elem->title, ENT_QUOTES)), ENT_QUOTES);
1668 1668
         }
1669 1669
     }
1670 1670
 
1671 1671
     // Build text to show user
1672 1672
     if (empty($label) === false) {
1673
-        return empty($path) === true ? addslashes($label) : addslashes($label) . ' (' . $path . ')';
1673
+        return empty($path) === true ? addslashes($label) : addslashes($label).' ('.$path.')';
1674 1674
     }
1675 1675
     return empty($path) === true ? '' : $path;
1676 1676
 }
@@ -1726,7 +1726,7 @@  discard block
 block discarded – undo
1726 1726
 {
1727 1727
     // Perform a copy if the file exists
1728 1728
     if (file_exists($configFilePath)) {
1729
-        $backupFilePath = $configFilePath . '.' . date('Y_m_d_His', time());
1729
+        $backupFilePath = $configFilePath.'.'.date('Y_m_d_His', time());
1730 1730
         if (!copy($configFilePath, $backupFilePath)) {
1731 1731
             return "ERROR: Could not copy file '$configFilePath'";
1732 1732
         }
@@ -1734,10 +1734,10 @@  discard block
 block discarded – undo
1734 1734
 
1735 1735
     // Regenerate the config file
1736 1736
     $data = ["<?php\n", "global \$SETTINGS;\n", "\$SETTINGS = array (\n"];
1737
-    $rows = DB::query('SELECT * FROM ' . prefixTable('misc') . ' WHERE type=%s', 'admin');
1737
+    $rows = DB::query('SELECT * FROM '.prefixTable('misc').' WHERE type=%s', 'admin');
1738 1738
     foreach ($rows as $record) {
1739 1739
         $value = getEncryptedValue($record['valeur'], $record['is_encrypted']);
1740
-        $data[] = "    '{$record['intitule']}' => '". htmlspecialchars_decode($value, ENT_COMPAT) . "',\n";
1740
+        $data[] = "    '{$record['intitule']}' => '".htmlspecialchars_decode($value, ENT_COMPAT)."',\n";
1741 1741
     }
1742 1742
     $data[] = ");\n";
1743 1743
     $data = array_unique($data);
@@ -1782,7 +1782,7 @@  discard block
 block discarded – undo
1782 1782
 {
1783 1783
     global $SETTINGS;
1784 1784
     /* LOAD CPASSMAN SETTINGS */
1785
-    if (! isset($SETTINGS['loaded']) || $SETTINGS['loaded'] !== 1) {
1785
+    if (!isset($SETTINGS['loaded']) || $SETTINGS['loaded'] !== 1) {
1786 1786
         $SETTINGS = [];
1787 1787
         $SETTINGS['duplicate_folder'] = 0;
1788 1788
         //by default, this is set to 0;
@@ -1792,7 +1792,7 @@  discard block
 block discarded – undo
1792 1792
         //by default, this value is set to 5;
1793 1793
         $settings = [];
1794 1794
         $rows = DB::query(
1795
-            'SELECT * FROM ' . prefixTable('misc') . ' WHERE type=%s_type OR type=%s_type2',
1795
+            'SELECT * FROM '.prefixTable('misc').' WHERE type=%s_type OR type=%s_type2',
1796 1796
             [
1797 1797
                 'type' => 'admin',
1798 1798
                 'type2' => 'settings',
@@ -1824,7 +1824,7 @@  discard block
 block discarded – undo
1824 1824
     $source_cf = [];
1825 1825
     $rows = DB::query(
1826 1826
         'SELECT id_category
1827
-            FROM ' . prefixTable('categories_folders') . '
1827
+            FROM ' . prefixTable('categories_folders').'
1828 1828
             WHERE id_folder = %i',
1829 1829
         $source_id
1830 1830
     );
@@ -1835,7 +1835,7 @@  discard block
 block discarded – undo
1835 1835
     $target_cf = [];
1836 1836
     $rows = DB::query(
1837 1837
         'SELECT id_category
1838
-            FROM ' . prefixTable('categories_folders') . '
1838
+            FROM ' . prefixTable('categories_folders').'
1839 1839
             WHERE id_folder = %i',
1840 1840
         $target_id
1841 1841
     );
@@ -1930,10 +1930,10 @@  discard block
 block discarded – undo
1930 1930
     } catch (CryptoException\WrongKeyOrModifiedCiphertextException $ex) {
1931 1931
         $err = 'wrong_key';
1932 1932
     } catch (CryptoException\EnvironmentIsBrokenException $ex) {
1933
-        error_log('TEAMPASS-Error-Environment: ' . $ex->getMessage());
1933
+        error_log('TEAMPASS-Error-Environment: '.$ex->getMessage());
1934 1934
         $err = 'environment_error';
1935 1935
     } catch (CryptoException\IOException $ex) {
1936
-        error_log('TEAMPASS-Error-General: ' . $ex->getMessage());
1936
+        error_log('TEAMPASS-Error-General: '.$ex->getMessage());
1937 1937
         $err = 'general_error';
1938 1938
     }
1939 1939
 
@@ -1966,10 +1966,10 @@  discard block
 block discarded – undo
1966 1966
     } catch (CryptoException\WrongKeyOrModifiedCiphertextException $ex) {
1967 1967
         $err = 'wrong_key';
1968 1968
     } catch (CryptoException\EnvironmentIsBrokenException $ex) {
1969
-        error_log('TEAMPASS-Error-Environment: ' . $ex->getMessage());
1969
+        error_log('TEAMPASS-Error-Environment: '.$ex->getMessage());
1970 1970
         $err = 'environment_error';
1971 1971
     } catch (CryptoException\IOException $ex) {
1972
-        error_log('TEAMPASS-Error-General: ' . $ex->getMessage());
1972
+        error_log('TEAMPASS-Error-General: '.$ex->getMessage());
1973 1973
         $err = 'general_error';
1974 1974
     }
1975 1975
 
@@ -2055,7 +2055,7 @@  discard block
 block discarded – undo
2055 2055
 ) {
2056 2056
     // Check if the path exists
2057 2057
     $path = basename($path);
2058
-    if (! file_exists($path)) {
2058
+    if (!file_exists($path)) {
2059 2059
         return false;
2060 2060
     }
2061 2061
 
@@ -2108,7 +2108,7 @@  discard block
 block discarded – undo
2108 2108
     // Load item data
2109 2109
     $data = DB::queryFirstRow(
2110 2110
         'SELECT id_tree
2111
-        FROM ' . prefixTable('items') . '
2111
+        FROM ' . prefixTable('items').'
2112 2112
         WHERE id = %i',
2113 2113
         $item_id
2114 2114
     );
@@ -2171,7 +2171,7 @@  discard block
 block discarded – undo
2171 2171
         }
2172 2172
         $host .= substr(explode(".", $email[1])[0], -1, 1);
2173 2173
     }
2174
-    $email = $name . "@" . $host . "." . explode(".", $email[1])[1];
2174
+    $email = $name."@".$host.".".explode(".", $email[1])[1];
2175 2175
     return $email;
2176 2176
 }
2177 2177
 
@@ -2202,11 +2202,11 @@  discard block
 block discarded – undo
2202 2202
 function formatSizeUnits(int $bytes): string
2203 2203
 {
2204 2204
     if ($bytes >= 1073741824) {
2205
-        $bytes = number_format($bytes / 1073741824, 2) . ' GB';
2205
+        $bytes = number_format($bytes / 1073741824, 2).' GB';
2206 2206
     } elseif ($bytes >= 1048576) {
2207
-        $bytes = number_format($bytes / 1048576, 2) . ' MB';
2207
+        $bytes = number_format($bytes / 1048576, 2).' MB';
2208 2208
     } elseif ($bytes >= 1024) {
2209
-        $bytes = number_format($bytes / 1024, 2) . ' KB';
2209
+        $bytes = number_format($bytes / 1024, 2).' KB';
2210 2210
     } elseif ($bytes > 1) {
2211 2211
         $bytes .= ' bytes';
2212 2212
     } elseif ($bytes === 1) {
@@ -2455,7 +2455,7 @@  discard block
 block discarded – undo
2455 2455
     $cipher->enableContinuousBuffer();
2456 2456
 
2457 2457
     // Encrypt the file content
2458
-    $filePath = filter_var($fileInPath . '/' . $fileInName, FILTER_SANITIZE_URL);
2458
+    $filePath = filter_var($fileInPath.'/'.$fileInName, FILTER_SANITIZE_URL);
2459 2459
     $fileContent = file_get_contents($filePath);
2460 2460
     $plaintext = $fileContent;
2461 2461
     $ciphertext = $cipher->encrypt($plaintext);
@@ -2463,9 +2463,9 @@  discard block
 block discarded – undo
2463 2463
     // Save new file
2464 2464
     // deepcode ignore InsecureHash: is simply used to get a unique name
2465 2465
     $hash = uniqid('', true);
2466
-    $fileOut = $fileInPath . '/' . TP_FILE_PREFIX . $hash;
2466
+    $fileOut = $fileInPath.'/'.TP_FILE_PREFIX.$hash;
2467 2467
     file_put_contents($fileOut, $ciphertext);
2468
-    unlink($fileInPath . '/' . $fileInName);
2468
+    unlink($fileInPath.'/'.$fileInName);
2469 2469
     return [
2470 2470
         'fileHash' => base64_encode($hash),
2471 2471
         'objectKey' => base64_encode($objectKey),
@@ -2481,9 +2481,9 @@  discard block
 block discarded – undo
2481 2481
  *
2482 2482
  * @return string|array
2483 2483
  */
2484
-function decryptFile(string $fileName, string $filePath, string $key): string|array
2484
+function decryptFile(string $fileName, string $filePath, string $key): string | array
2485 2485
 {
2486
-    if (! defined('FILE_BUFFER_SIZE')) {
2486
+    if (!defined('FILE_BUFFER_SIZE')) {
2487 2487
         define('FILE_BUFFER_SIZE', 128 * 1024);
2488 2488
     }
2489 2489
     
@@ -2500,7 +2500,7 @@  discard block
 block discarded – undo
2500 2500
     $cipher->enableContinuousBuffer();
2501 2501
     $cipher->disablePadding();
2502 2502
     // Get file content
2503
-    $safeFilePath = realpath($filePath . '/' . TP_FILE_PREFIX . $safeFileName);
2503
+    $safeFilePath = realpath($filePath.'/'.TP_FILE_PREFIX.$safeFileName);
2504 2504
     if ($safeFilePath !== false && file_exists($safeFilePath)) {
2505 2505
         $ciphertext = file_get_contents(filter_var($safeFilePath, FILTER_SANITIZE_URL));
2506 2506
     } else {
@@ -2596,7 +2596,7 @@  discard block
 block discarded – undo
2596 2596
         // Only create the sharekey for a user
2597 2597
         $user = DB::queryFirstRow(
2598 2598
             'SELECT public_key
2599
-            FROM ' . prefixTable('users') . '
2599
+            FROM ' . prefixTable('users').'
2600 2600
             WHERE id = %i
2601 2601
             AND public_key != ""',
2602 2602
             $userId
@@ -2637,7 +2637,7 @@  discard block
 block discarded – undo
2637 2637
         }
2638 2638
         $users = DB::query(
2639 2639
             'SELECT id, public_key
2640
-            FROM ' . prefixTable('users') . '
2640
+            FROM ' . prefixTable('users').'
2641 2641
             WHERE id NOT IN %li
2642 2642
             AND public_key != ""',
2643 2643
             $user_ids
@@ -2646,7 +2646,7 @@  discard block
 block discarded – undo
2646 2646
         foreach ($users as $user) {
2647 2647
             // Insert in DB the new object key for this item by user
2648 2648
             if (count($objectKeyArray) === 0) {
2649
-                if (WIP === true) error_log('TEAMPASS Debug - storeUsersShareKey case1 - ' . $object_name . ' - ' . $post_object_id . ' - ' . $user['id'] . ' - ' . $objectKey);
2649
+                if (WIP === true) error_log('TEAMPASS Debug - storeUsersShareKey case1 - '.$object_name.' - '.$post_object_id.' - '.$user['id'].' - '.$objectKey);
2650 2650
                 DB::insert(
2651 2651
                     $object_name,
2652 2652
                     [
@@ -2660,7 +2660,7 @@  discard block
 block discarded – undo
2660 2660
                 );
2661 2661
             } else {
2662 2662
                 foreach ($objectKeyArray as $object) {
2663
-                    if (WIP === true) error_log('TEAMPASS Debug - storeUsersShareKey case2 - ' . $object_name . ' - ' . $object['objectId'] . ' - ' . $user['id'] . ' - ' . $object['objectKey']);
2663
+                    if (WIP === true) error_log('TEAMPASS Debug - storeUsersShareKey case2 - '.$object_name.' - '.$object['objectId'].' - '.$user['id'].' - '.$object['objectKey']);
2664 2664
                     DB::insert(
2665 2665
                         $object_name,
2666 2666
                         [
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
 function isBase64(string $str): bool
2689 2689
 {
2690 2690
     $str = (string) trim($str);
2691
-    if (! isset($str[0])) {
2691
+    if (!isset($str[0])) {
2692 2692
         return false;
2693 2693
     }
2694 2694
 
@@ -2762,7 +2762,7 @@  discard block
 block discarded – undo
2762 2762
     } catch (\LdapRecord\Auth\BindException $e) {
2763 2763
         $error = $e->getDetailedError();
2764 2764
         if ($error && defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) {
2765
-            error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage(). " - ".$error->getDiagnosticMessage());
2765
+            error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage()." - ".$error->getDiagnosticMessage());
2766 2766
         }
2767 2767
         // deepcode ignore ServerLeak: No important data is sent
2768 2768
         echo 'An error occurred.';
@@ -2779,7 +2779,7 @@  discard block
 block discarded – undo
2779 2779
     } catch (\LdapRecord\Auth\BindException $e) {
2780 2780
         $error = $e->getDetailedError();
2781 2781
         if ($error && defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) {
2782
-            error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage(). " - ".$error->getDiagnosticMessage());
2782
+            error_log('TEAMPASS Error - LDAP - '.$error->getErrorCode()." - ".$error->getErrorMessage()." - ".$error->getDiagnosticMessage());
2783 2783
         }
2784 2784
         // deepcode ignore ServerLeak: No important data is sent
2785 2785
         echo 'An error occurred.';
@@ -2806,7 +2806,7 @@  discard block
 block discarded – undo
2806 2806
     // expect if personal item
2807 2807
     DB::delete(
2808 2808
         prefixTable('sharekeys_items'),
2809
-        'user_id = %i AND object_id NOT IN (SELECT i.id FROM ' . prefixTable('items') . ' AS i WHERE i.perso = 1)',
2809
+        'user_id = %i AND object_id NOT IN (SELECT i.id FROM '.prefixTable('items').' AS i WHERE i.perso = 1)',
2810 2810
         $userId
2811 2811
     );
2812 2812
     // Remove all item sharekeys files
@@ -2814,8 +2814,8 @@  discard block
 block discarded – undo
2814 2814
         prefixTable('sharekeys_files'),
2815 2815
         'user_id = %i AND object_id NOT IN (
2816 2816
             SELECT f.id 
2817
-            FROM ' . prefixTable('items') . ' AS i 
2818
-            INNER JOIN ' . prefixTable('files') . ' AS f ON f.id_item = i.id
2817
+            FROM ' . prefixTable('items').' AS i 
2818
+            INNER JOIN ' . prefixTable('files').' AS f ON f.id_item = i.id
2819 2819
             WHERE i.perso = 1
2820 2820
         )',
2821 2821
         $userId
@@ -2825,8 +2825,8 @@  discard block
 block discarded – undo
2825 2825
         prefixTable('sharekeys_fields'),
2826 2826
         'user_id = %i AND object_id NOT IN (
2827 2827
             SELECT c.id 
2828
-            FROM ' . prefixTable('items') . ' AS i 
2829
-            INNER JOIN ' . prefixTable('categories_items') . ' AS c ON c.item_id = i.id
2828
+            FROM ' . prefixTable('items').' AS i 
2829
+            INNER JOIN ' . prefixTable('categories_items').' AS c ON c.item_id = i.id
2830 2830
             WHERE i.perso = 1
2831 2831
         )',
2832 2832
         $userId
@@ -2834,13 +2834,13 @@  discard block
 block discarded – undo
2834 2834
     // Remove all item sharekeys logs
2835 2835
     DB::delete(
2836 2836
         prefixTable('sharekeys_logs'),
2837
-        'user_id = %i AND object_id NOT IN (SELECT i.id FROM ' . prefixTable('items') . ' AS i WHERE i.perso = 1)',
2837
+        'user_id = %i AND object_id NOT IN (SELECT i.id FROM '.prefixTable('items').' AS i WHERE i.perso = 1)',
2838 2838
         $userId
2839 2839
     );
2840 2840
     // Remove all item sharekeys suggestions
2841 2841
     DB::delete(
2842 2842
         prefixTable('sharekeys_suggestions'),
2843
-        'user_id = %i AND object_id NOT IN (SELECT i.id FROM ' . prefixTable('items') . ' AS i WHERE i.perso = 1)',
2843
+        'user_id = %i AND object_id NOT IN (SELECT i.id FROM '.prefixTable('items').' AS i WHERE i.perso = 1)',
2844 2844
         $userId
2845 2845
     );
2846 2846
     return false;
@@ -2861,7 +2861,7 @@  discard block
 block discarded – undo
2861 2861
         foreach (DateTimeZone::listIdentifiers() as $timezone) {
2862 2862
             $now->setTimezone(new DateTimeZone($timezone));
2863 2863
             $offsets[] = $offset = $now->getOffset();
2864
-            $timezones[$timezone] = '(' . format_GMT_offset($offset) . ') ' . format_timezone_name($timezone);
2864
+            $timezones[$timezone] = '('.format_GMT_offset($offset).') '.format_timezone_name($timezone);
2865 2865
         }
2866 2866
 
2867 2867
         array_multisort($offsets, $timezones);
@@ -2881,7 +2881,7 @@  discard block
 block discarded – undo
2881 2881
 {
2882 2882
     $hours = intval($offset / 3600);
2883 2883
     $minutes = abs(intval($offset % 3600 / 60));
2884
-    return 'GMT' . ($offset ? sprintf('%+03d:%02d', $hours, $minutes) : '');
2884
+    return 'GMT'.($offset ? sprintf('%+03d:%02d', $hours, $minutes) : '');
2885 2885
 }
2886 2886
 
2887 2887
 /**
@@ -2980,8 +2980,7 @@  discard block
 block discarded – undo
2980 2980
 {
2981 2981
     if (isset($array[$key]) === true
2982 2982
         && (is_int($value) === true ?
2983
-            (int) $array[$key] === $value :
2984
-            (string) $array[$key] === $value)
2983
+            (int) $array[$key] === $value : (string) $array[$key] === $value)
2985 2984
     ) {
2986 2985
         return true;
2987 2986
     }
@@ -3003,8 +3002,7 @@  discard block
 block discarded – undo
3003 3002
 {
3004 3003
     if (isset($var) === false
3005 3004
         || (is_int($value) === true ?
3006
-            (int) $var === $value :
3007
-            (string) $var === $value)
3005
+            (int) $var === $value : (string) $var === $value)
3008 3006
     ) {
3009 3007
         return true;
3010 3008
     }
@@ -3055,7 +3053,7 @@  discard block
 block discarded – undo
3055 3053
  */
3056 3054
 function isSetArrayOfValues(array $arrayOfValues): bool
3057 3055
 {
3058
-    foreach($arrayOfValues as $value) {
3056
+    foreach ($arrayOfValues as $value) {
3059 3057
         if (isset($value) === false) {
3060 3058
             return false;
3061 3059
         }
@@ -3077,7 +3075,7 @@  discard block
 block discarded – undo
3077 3075
     /*PHP8 - integer|string*/$value
3078 3076
 ) : bool
3079 3077
 {
3080
-    foreach($arrayOfVars as $variable) {
3078
+    foreach ($arrayOfVars as $variable) {
3081 3079
         if ($variable !== $value) {
3082 3080
             return false;
3083 3081
         }
@@ -3097,7 +3095,7 @@  discard block
 block discarded – undo
3097 3095
     /*PHP8 - integer|string*/$value
3098 3096
 ) : bool
3099 3097
 {
3100
-    foreach($arrayOfVars as $variable) {
3098
+    foreach ($arrayOfVars as $variable) {
3101 3099
         if ($variable === $value) {
3102 3100
             return true;
3103 3101
         }
@@ -3111,7 +3109,7 @@  discard block
 block discarded – undo
3111 3109
  * @param string|int|null $value
3112 3110
  * @return boolean
3113 3111
  */
3114
-function isValueSetNullEmpty(string|int|null $value) : bool
3112
+function isValueSetNullEmpty(string | int | null $value) : bool
3115 3113
 {
3116 3114
     if (is_null($value) === true || empty($value) === true) {
3117 3115
         return true;
@@ -3166,7 +3164,7 @@  discard block
 block discarded – undo
3166 3164
  * @param array     $filters
3167 3165
  * @return array|string
3168 3166
  */
3169
-function dataSanitizer(array $data, array $filters): array|string
3167
+function dataSanitizer(array $data, array $filters): array | string
3170 3168
 {
3171 3169
     // Load Sanitizer library
3172 3170
     $sanitizer = new Sanitizer($data, $filters);
@@ -3195,7 +3193,7 @@  discard block
 block discarded – undo
3195 3193
     // Exists ?
3196 3194
     $userCacheId = DB::queryFirstRow(
3197 3195
         'SELECT increment_id
3198
-        FROM ' . prefixTable('cache_tree') . '
3196
+        FROM ' . prefixTable('cache_tree').'
3199 3197
         WHERE user_id = %i',
3200 3198
         $user_id
3201 3199
     );
@@ -3246,7 +3244,7 @@  discard block
 block discarded – undo
3246 3244
  */
3247 3245
 function pourcentage(float $nombre, float $total, float $pourcentage): float
3248 3246
 { 
3249
-    $resultat = ($nombre/$total) * $pourcentage;
3247
+    $resultat = ($nombre / $total) * $pourcentage;
3250 3248
     return round($resultat);
3251 3249
 }
3252 3250
 
@@ -3276,7 +3274,7 @@  discard block
 block discarded – undo
3276 3274
 
3277 3275
     // Get last folder update
3278 3276
     $lastFolderChange = DB::queryFirstRow(
3279
-        'SELECT valeur FROM ' . prefixTable('misc') . '
3277
+        'SELECT valeur FROM '.prefixTable('misc').'
3280 3278
         WHERE type = %s AND intitule = %s',
3281 3279
         'timestamp',
3282 3280
         'last_folder_change'
@@ -3307,7 +3305,7 @@  discard block
 block discarded – undo
3307 3305
     // Does this user has a tree cache
3308 3306
     $userCacheTree = DB::queryFirstRow(
3309 3307
         'SELECT '.$fieldName.'
3310
-        FROM ' . prefixTable('cache_tree') . '
3308
+        FROM ' . prefixTable('cache_tree').'
3311 3309
         WHERE user_id = %i',
3312 3310
         $session->get('user-id')
3313 3311
     );
@@ -3350,7 +3348,7 @@  discard block
 block discarded – undo
3350 3348
     if (count($folderIds) === 0) {
3351 3349
         $folderIds = DB::queryFirstColumn(
3352 3350
             'SELECT id
3353
-            FROM ' . prefixTable('nested_tree') . '
3351
+            FROM ' . prefixTable('nested_tree').'
3354 3352
             WHERE personal_folder=%i',
3355 3353
             0
3356 3354
         );
@@ -3367,8 +3365,8 @@  discard block
 block discarded – undo
3367 3365
         $rows_tmp = DB::query(
3368 3366
             'SELECT c.id, c.title, c.level, c.type, c.masked, c.order, c.encrypted_data, c.role_visibility, c.is_mandatory,
3369 3367
             f.id_category AS category_id
3370
-            FROM ' . prefixTable('categories_folders') . ' AS f
3371
-            INNER JOIN ' . prefixTable('categories') . ' AS c ON (f.id_category = c.parent_id)
3368
+            FROM ' . prefixTable('categories_folders').' AS f
3369
+            INNER JOIN ' . prefixTable('categories').' AS c ON (f.id_category = c.parent_id)
3372 3370
             WHERE id_folder=%i',
3373 3371
             $folder
3374 3372
         );
@@ -3394,7 +3392,7 @@  discard block
 block discarded – undo
3394 3392
         $valTemp = '';
3395 3393
         $data = DB::queryFirstRow(
3396 3394
             'SELECT valeur
3397
-            FROM ' . prefixTable('misc') . '
3395
+            FROM ' . prefixTable('misc').'
3398 3396
             WHERE type = %s AND intitule=%i',
3399 3397
             'complex',
3400 3398
             $folder
@@ -3411,14 +3409,14 @@  discard block
 block discarded – undo
3411 3409
         $valTemp = '';
3412 3410
         $rows_tmp = DB::query(
3413 3411
             'SELECT t.title
3414
-            FROM ' . prefixTable('roles_values') . ' as v
3415
-            INNER JOIN ' . prefixTable('roles_title') . ' as t ON (v.role_id = t.id)
3412
+            FROM ' . prefixTable('roles_values').' as v
3413
+            INNER JOIN ' . prefixTable('roles_title').' as t ON (v.role_id = t.id)
3416 3414
             WHERE v.folder_id = %i
3417 3415
             GROUP BY title',
3418 3416
             $folder
3419 3417
         );
3420 3418
         foreach ($rows_tmp as $record) {
3421
-            $valTemp .= (empty($valTemp) === true ? '' : ' - ') . $record['title'];
3419
+            $valTemp .= (empty($valTemp) === true ? '' : ' - ').$record['title'];
3422 3420
         }
3423 3421
         $arr_data['visibilityRoles'] = $valTemp;
3424 3422
 
@@ -3451,7 +3449,7 @@  discard block
 block discarded – undo
3451 3449
         // loop on users and check if user has this role
3452 3450
         $rows = DB::query(
3453 3451
             'SELECT id, fonction_id
3454
-            FROM ' . prefixTable('users') . '
3452
+            FROM ' . prefixTable('users').'
3455 3453
             WHERE id != %i AND admin = 0 AND fonction_id IS NOT NULL AND fonction_id != ""',
3456 3454
             $session->get('user-id')
3457 3455
         );
@@ -3483,7 +3481,7 @@  discard block
 block discarded – undo
3483 3481
 
3484 3482
     $val = DB::queryFirstRow(
3485 3483
         'SELECT *
3486
-        FROM ' . prefixTable('users') . '
3484
+        FROM ' . prefixTable('users').'
3487 3485
         WHERE id = %i',
3488 3486
         $userId
3489 3487
     );
@@ -3499,12 +3497,12 @@  discard block
 block discarded – undo
3499 3497
 function upgradeRequired(): bool
3500 3498
 {
3501 3499
     // Get settings.php
3502
-    include_once __DIR__. '/../includes/config/settings.php';
3500
+    include_once __DIR__.'/../includes/config/settings.php';
3503 3501
 
3504 3502
     // Get timestamp in DB
3505 3503
     $val = DB::queryFirstRow(
3506 3504
         'SELECT valeur
3507
-        FROM ' . prefixTable('misc') . '
3505
+        FROM ' . prefixTable('misc').'
3508 3506
         WHERE type = %s AND intitule = %s',
3509 3507
         'admin',
3510 3508
         'upgrade_timestamp'
@@ -3555,7 +3553,7 @@  discard block
 block discarded – undo
3555 3553
     // prepapre background tasks for item keys generation        
3556 3554
     $userTP = DB::queryFirstRow(
3557 3555
         'SELECT pw, public_key, private_key
3558
-        FROM ' . prefixTable('users') . '
3556
+        FROM ' . prefixTable('users').'
3559 3557
         WHERE id = %i',
3560 3558
         TP_USER_ID
3561 3559
     );
@@ -3616,7 +3614,7 @@  discard block
 block discarded – undo
3616 3614
     }
3617 3615
 
3618 3616
     // Generate new keys
3619
-    if ($user_self_change === true && empty($recovery_public_key) === false && empty($recovery_private_key) === false){
3617
+    if ($user_self_change === true && empty($recovery_public_key) === false && empty($recovery_private_key) === false) {
3620 3618
         $userKeys = [
3621 3619
             'public_key' => $recovery_public_key,
3622 3620
             'private_key_clear' => $recovery_private_key,
@@ -3659,8 +3657,8 @@  discard block
 block discarded – undo
3659 3657
             'process_type' => 'create_user_keys',
3660 3658
             'arguments' => json_encode([
3661 3659
                 'new_user_id' => (int) $userId,
3662
-                'new_user_pwd' => cryption($passwordClear, '','encrypt')['string'],
3663
-                'new_user_code' => cryption(empty($encryptionKey) === true ? uniqidReal(20) : $encryptionKey, '','encrypt')['string'],
3660
+                'new_user_pwd' => cryption($passwordClear, '', 'encrypt')['string'],
3661
+                'new_user_code' => cryption(empty($encryptionKey) === true ? uniqidReal(20) : $encryptionKey, '', 'encrypt')['string'],
3664 3662
                 'owner_id' => (int) TP_USER_ID,
3665 3663
                 'creator_pwd' => $userTP['pw'],
3666 3664
                 'send_email' => $sendEmailToUser === true ? 1 : 0,
@@ -3731,19 +3729,19 @@  discard block
 block discarded – undo
3731 3729
 
3732 3730
     // Prepare the subtask queries
3733 3731
     $queries = [
3734
-        'step20' => 'SELECT * FROM ' . prefixTable('items'),
3732
+        'step20' => 'SELECT * FROM '.prefixTable('items'),
3735 3733
 
3736
-        'step30' => 'SELECT * FROM ' . prefixTable('log_items') . 
3734
+        'step30' => 'SELECT * FROM '.prefixTable('log_items'). 
3737 3735
                     ' WHERE raison LIKE "at_pw :%" AND encryption_type = "teampass_aes"',
3738 3736
 
3739
-        'step40' => 'SELECT * FROM ' . prefixTable('categories_items') . 
3737
+        'step40' => 'SELECT * FROM '.prefixTable('categories_items'). 
3740 3738
                     ' WHERE encryption_type = "teampass_aes"',
3741 3739
 
3742
-        'step50' => 'SELECT * FROM ' . prefixTable('suggestion'),
3740
+        'step50' => 'SELECT * FROM '.prefixTable('suggestion'),
3743 3741
 
3744
-        'step60' => 'SELECT * FROM ' . prefixTable('files') . ' AS f
3745
-                        INNER JOIN ' . prefixTable('items') . ' AS i ON i.id = f.id_item
3746
-                        WHERE f.status = "' . TP_ENCRYPTION_NAME . '"'
3742
+        'step60' => 'SELECT * FROM '.prefixTable('files').' AS f
3743
+                        INNER JOIN ' . prefixTable('items').' AS i ON i.id = f.id_item
3744
+                        WHERE f.status = "' . TP_ENCRYPTION_NAME.'"'
3747 3745
     ];
3748 3746
 
3749 3747
     // Perform loop on $queries to create sub-tasks
@@ -3933,7 +3931,7 @@  discard block
 block discarded – undo
3933 3931
  */
3934 3932
 function createTaskForItem(
3935 3933
     string $processType,
3936
-    string|array $taskName,
3934
+    string | array $taskName,
3937 3935
     int $itemId,
3938 3936
     int $userId,
3939 3937
     string $objectKey,
@@ -3957,7 +3955,7 @@  discard block
 block discarded – undo
3957 3955
                 'object_key' => $objectKey,
3958 3956
                 'author' => (int) $userId,
3959 3957
             ]),
3960
-            'item_id' => (int) $parentId !== -1 ?  $parentId : null,
3958
+            'item_id' => (int) $parentId !== -1 ? $parentId : null,
3961 3959
         )
3962 3960
     );
3963 3961
     $processId = DB::insertId();
@@ -3967,7 +3965,7 @@  discard block
 block discarded – undo
3967 3965
     if (is_array($taskName) === false) {
3968 3966
         $taskName = [$taskName];
3969 3967
     }
3970
-    foreach($taskName as $task) {
3968
+    foreach ($taskName as $task) {
3971 3969
         if (WIP === true) error_log('createTaskForItem - task: '.$task);
3972 3970
         switch ($task) {
3973 3971
             case 'item_password':
@@ -4064,7 +4062,7 @@  discard block
 block discarded – undo
4064 4062
  * @param integer $user_id
4065 4063
  * @return void
4066 4064
  */
4067
-function purgeUnnecessaryKeys(bool $allUsers = true, int $user_id=0)
4065
+function purgeUnnecessaryKeys(bool $allUsers = true, int $user_id = 0)
4068 4066
 {
4069 4067
     if ($allUsers === true) {
4070 4068
         // Load class DB
@@ -4074,7 +4072,7 @@  discard block
 block discarded – undo
4074 4072
 
4075 4073
         $users = DB::query(
4076 4074
             'SELECT id
4077
-            FROM ' . prefixTable('users') . '
4075
+            FROM ' . prefixTable('users').'
4078 4076
             WHERE id NOT IN ('.OTV_USER_ID.', '.TP_USER_ID.', '.SSH_USER_ID.', '.API_USER_ID.')
4079 4077
             ORDER BY login ASC'
4080 4078
         );
@@ -4092,7 +4090,7 @@  discard block
 block discarded – undo
4092 4090
  * @param integer $user_id
4093 4091
  * @return void
4094 4092
  */
4095
-function purgeUnnecessaryKeysForUser(int $user_id=0)
4093
+function purgeUnnecessaryKeysForUser(int $user_id = 0)
4096 4094
 {
4097 4095
     if ($user_id === 0) {
4098 4096
         return;
@@ -4103,8 +4101,8 @@  discard block
 block discarded – undo
4103 4101
 
4104 4102
     $personalItems = DB::queryFirstColumn(
4105 4103
         'SELECT id
4106
-        FROM ' . prefixTable('items') . ' AS i
4107
-        INNER JOIN ' . prefixTable('log_items') . ' AS li ON li.id_item = i.id
4104
+        FROM ' . prefixTable('items').' AS i
4105
+        INNER JOIN ' . prefixTable('log_items').' AS li ON li.id_item = i.id
4108 4106
         WHERE i.perso = 1 AND li.action = "at_creation" AND li.id_user IN (%i, '.TP_USER_ID.')',
4109 4107
         $user_id
4110 4108
     );
@@ -4153,7 +4151,7 @@  discard block
 block discarded – undo
4153 4151
     // Check if user exists
4154 4152
     $userInfo = DB::queryFirstRow(
4155 4153
         'SELECT login
4156
-        FROM ' . prefixTable('users') . '
4154
+        FROM ' . prefixTable('users').'
4157 4155
         WHERE id = %i',
4158 4156
         $userId
4159 4157
     );
@@ -4162,7 +4160,7 @@  discard block
 block discarded – undo
4162 4160
         $now = (int) time();
4163 4161
         // Prepare file content
4164 4162
         $export_value = file_get_contents(__DIR__."/../includes/core/teampass_ascii.txt")."\n".
4165
-            "Generation date: ".date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], $now)."\n\n".
4163
+            "Generation date: ".date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], $now)."\n\n".
4166 4164
             "RECOVERY KEYS - Not to be shared - To be store safely\n\n".
4167 4165
             "Public Key:\n".$session->get('user-public_key')."\n\n".
4168 4166
             "Private Key:\n".$session->get('user-private_key')."\n\n";
@@ -4185,7 +4183,7 @@  discard block
 block discarded – undo
4185 4183
         return prepareExchangedData(
4186 4184
             array(
4187 4185
                 'error' => false,
4188
-                'datetime' => date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], $now),
4186
+                'datetime' => date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], $now),
4189 4187
                 'timestamp' => $now,
4190 4188
                 'content' => base64_encode($export_value),
4191 4189
                 'login' => $userInfo['login'],
@@ -4211,8 +4209,8 @@  discard block
 block discarded – undo
4211 4209
  */
4212 4210
 function loadClasses(string $className = ''): void
4213 4211
 {
4214
-    require_once __DIR__. '/../includes/config/include.php';
4215
-    require_once __DIR__. '/../includes/config/settings.php';
4212
+    require_once __DIR__.'/../includes/config/include.php';
4213
+    require_once __DIR__.'/../includes/config/settings.php';
4216 4214
     require_once __DIR__.'/../vendor/autoload.php';
4217 4215
 
4218 4216
     if (defined('DB_PASSWD_CLEAR') === false) {
@@ -4425,7 +4423,7 @@  discard block
 block discarded – undo
4425 4423
 
4426 4424
     // Get current user hash
4427 4425
     $userHash = DB::queryFirstRow(
4428
-        "SELECT pw FROM " . prefixtable('users') . " WHERE id = %d;",
4426
+        "SELECT pw FROM ".prefixtable('users')." WHERE id = %d;",
4429 4427
         $session->get('user-id')
4430 4428
     )['pw'];
4431 4429
 
@@ -4473,11 +4471,11 @@  discard block
 block discarded – undo
4473 4471
         }
4474 4472
         
4475 4473
         // Alternative: serialize ou json selon le contexte
4476
-        return get_class($value) . (method_exists($value, 'getId') ? '#' . $value->getId() : '');
4474
+        return get_class($value).(method_exists($value, 'getId') ? '#'.$value->getId() : '');
4477 4475
     }
4478 4476
     
4479 4477
     if (is_resource($value)) {
4480
-        return 'Resource#' . get_resource_id($value) . ' of type ' . get_resource_type($value);
4478
+        return 'Resource#'.get_resource_id($value).' of type '.get_resource_type($value);
4481 4479
     }
4482 4480
     
4483 4481
     // Cas par défaut
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.