Passed
Pull Request — master (#4502)
by
unknown
06:25
created
sources/upload.files.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 ) {
77 77
     // Not allowed page
78 78
     $session->set('system-error_code', ERR_NOT_ALLOWED);
79
-    include $SETTINGS['cpassman_dir'] . '/error.php';
79
+    include $SETTINGS['cpassman_dir'].'/error.php';
80 80
     exit;
81 81
 }
82 82
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     } else {
131 131
         // check if token is expired
132 132
         $data = DB::queryFirstRow(
133
-            'SELECT end_timestamp FROM ' . prefixTable('tokens') . ' WHERE user_id = %i AND token = %s',
133
+            'SELECT end_timestamp FROM '.prefixTable('tokens').' WHERE user_id = %i AND token = %s',
134 134
             $session->get('user-id'),
135 135
             $post_user_token
136 136
         );
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 // HTTP headers for no cache etc
156 156
 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
157
-header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
157
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
158 158
 header('Cache-Control: no-store, no-cache, must-revalidate');
159 159
 header('Cache-Control: post-check=0, pre-check=0', false);
160 160
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     }
167 167
 
168 168
     // Set directory used to store file
169
-    $targetDir = realpath($SETTINGS['cpassman_dir'] . '/includes/avatars');
169
+    $targetDir = realpath($SETTINGS['cpassman_dir'].'/includes/avatars');
170 170
 } else {
171 171
     $targetDir = realpath($SETTINGS['path_to_files_folder']);
172 172
 }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     $file_name = preg_replace('/[^a-zA-Z0-9-_\.]/', '', strtolower(basename($file->getClientOriginalName())));
220 220
     
221 221
     if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) {
222
-        error_log('Invalid file name: ' . $file_name . '.');
222
+        error_log('Invalid file name: '.$file_name.'.');
223 223
         echo handleUploadError('Invalid file name provided.');
224 224
         return false;
225 225
     }
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
             $ext = strtolower($ext);
234 234
         } else {
235 235
             // Case where the file extension is not a string
236
-            error_log('Invalid file name: ' . $file_name . '.');
236
+            error_log('Invalid file name: '.$file_name.'.');
237 237
             echo handleUploadError('Invalid file extension.');
238 238
             return false;
239 239
         }
240 240
     } else {
241 241
         // Case where the file name is not a string
242
-        error_log('Invalid file name: ' . $file_name . '.');
242
+        error_log('Invalid file name: '.$file_name.'.');
243 243
         echo handleUploadError('Invalid file.');
244 244
         return false;
245 245
     }
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
     // Validate against a list of allowed extensions
248 248
     $allowed_extensions = explode(
249 249
         ',',
250
-        $SETTINGS['upload_docext'] . ',' . $SETTINGS['upload_imagesext'] .
251
-            ',' . $SETTINGS['upload_pkgext'] . ',' . $SETTINGS['upload_otherext']
250
+        $SETTINGS['upload_docext'].','.$SETTINGS['upload_imagesext'].
251
+            ','.$SETTINGS['upload_pkgext'].','.$SETTINGS['upload_otherext']
252 252
     );
253 253
     if (
254 254
         !in_array($ext, $allowed_extensions) 
@@ -267,25 +267,25 @@  discard block
 block discarded – undo
267 267
 
268 268
 // is destination folder writable
269 269
 if (is_writable($SETTINGS['path_to_files_folder']) === false) {
270
-    echo handleUploadError('Not enough permissions on folder ' . $SETTINGS['path_to_files_folder'] . '.');
270
+    echo handleUploadError('Not enough permissions on folder '.$SETTINGS['path_to_files_folder'].'.');
271 271
     return false;
272 272
 }
273 273
 
274 274
 // Make sure the fileName is unique but only if chunking is disabled
275
-if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
275
+if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) {
276 276
     // $ext is guaranteed to be a string due to prior checks
277 277
     $fileNameA = substr($fileName, 0, strlen(/** @scrutinizer ignore-type */$ext));
278 278
     $fileNameB = substr($fileName, strlen(/** @scrutinizer ignore-type */$ext));
279 279
 
280 280
     $count = 1;
281
-    while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) {
281
+    while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) {
282 282
         ++$count;
283 283
     }
284 284
 
285
-    $fileName = $fileNameA . '_' . $count . $fileNameB;
285
+    $fileName = $fileNameA.'_'.$count.$fileNameB;
286 286
 }
287 287
 
288
-$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName;
288
+$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName;
289 289
 
290 290
 // Create target dir
291 291
 if (!file_exists($targetDir)) {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 // Remove old temp files
300 300
 if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) {
301 301
     while (($fileClean = readdir($dir)) !== false) {
302
-        $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $fileClean;
302
+        $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$fileClean;
303 303
 
304 304
         // Remove temp file if it is older than the max age and is not the current file
305 305
         if (
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
     closedir($dir);
315 315
 } else {
316
-    echo handleUploadError('Not enough permissions on folder ' . $SETTINGS['path_to_files_folder'] . '.');
316
+    echo handleUploadError('Not enough permissions on folder '.$SETTINGS['path_to_files_folder'].'.');
317 317
     return false;
318 318
 }
319 319
 
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
                 // Safe destination folder
355 355
                 $uploadDir = realpath($SETTINGS['path_to_upload_folder']);
356
-                $destinationPath = $uploadDir . DIRECTORY_SEPARATOR . $fileName;
356
+                $destinationPath = $uploadDir.DIRECTORY_SEPARATOR.$fileName;
357 357
                 
358 358
                 if (move_uploaded_file($tmpFilePath, $destinationPath)) {
359 359
                     // Open the moved file in read mode
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             return false;
395 395
         }
396 396
     } else {
397
-        echo handleUploadError('Failed to move uploaded file to ' . $SETTINGS['path_to_files_folder'] . '.');
397
+        echo handleUploadError('Failed to move uploaded file to '.$SETTINGS['path_to_files_folder'].'.');
398 398
         return false;
399 399
     }
400 400
 } else {
@@ -410,14 +410,14 @@  discard block
 block discarded – undo
410 410
                 fwrite($out, $buff);
411 411
             }
412 412
         } else {
413
-            echo handleUploadError('Failed to open input stream ' . $SETTINGS['path_to_files_folder'] . '.');
413
+            echo handleUploadError('Failed to open input stream '.$SETTINGS['path_to_files_folder'].'.');
414 414
             return false;
415 415
         }
416 416
 
417 417
         fclose($in);
418 418
         fclose($out);
419 419
     } else {
420
-        echo handleUploadError('Failed to open output stream ' . $SETTINGS['path_to_files_folder'] . '.');
420
+        echo handleUploadError('Failed to open output stream '.$SETTINGS['path_to_files_folder'].'.');
421 421
         return false;
422 422
     }
423 423
 }
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 ) {
451 451
     rename(
452 452
         $filePath,
453
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
453
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
454 454
     );
455 455
 
456 456
     // Add in DB
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 ) {
480 480
     rename(
481 481
         $filePath,
482
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
482
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
483 483
     );
484 484
 
485 485
     // Add in DB
@@ -512,13 +512,13 @@  discard block
 block discarded – undo
512 512
     // rename the file
513 513
     rename(
514 514
         $filePath,
515
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext
515
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext
516 516
     );
517 517
 
518 518
     // make thumbnail
519 519
     $ret = makeThumbnail(
520
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext,
521
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '_thumb' . '.' . $ext,
520
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext,
521
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'_thumb'.'.'.$ext,
522 522
         40
523 523
     );
524 524
 
@@ -530,21 +530,21 @@  discard block
 block discarded – undo
530 530
     }
531 531
 
532 532
     // get current avatar and delete it
533
-    $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM ' . prefixTable('users') . ' WHERE id=%i', $session->get('user-id'));
534
-    fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar'], $SETTINGS);
535
-    fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar_thumb'], $SETTINGS);
533
+    $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM '.prefixTable('users').' WHERE id=%i', $session->get('user-id'));
534
+    fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar'], $SETTINGS);
535
+    fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar_thumb'], $SETTINGS);
536 536
 
537 537
     // store in DB the new avatar
538 538
     DB::query(
539
-        'UPDATE ' . prefixTable('users') . "
540
-        SET avatar='" . $newFileName . '.' . $ext . "', avatar_thumb='" . $newFileName . '_thumb' . '.' . $ext . "'
539
+        'UPDATE '.prefixTable('users')."
540
+        SET avatar='" . $newFileName.'.'.$ext."', avatar_thumb='".$newFileName.'_thumb'.'.'.$ext."'
541 541
         WHERE id=%i",
542 542
         $session->get('user-id')
543 543
     );
544 544
 
545 545
     // store in session
546
-    $session->set('user-avatar', $newFileName . '.' . $ext);
547
-    $session->set('user-avatar_thumb', $newFileName . '_thumb' . '.' . $ext);
546
+    $session->set('user-avatar', $newFileName.'.'.$ext);
547
+    $session->set('user-avatar_thumb', $newFileName.'_thumb'.'.'.$ext);
548 548
 
549 549
     // return info
550 550
     echo prepareExchangedData(
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 ) {
564 564
     rename(
565 565
         $filePath,
566
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
566
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
567 567
     );
568 568
 
569 569
     // Add in DB
Please login to merge, or discard this patch.
pages/profile.js.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('profile') === false) {
74 74
     // Not allowed page
75 75
     $session->set('system-error_code', ERR_NOT_ALLOWED);
76
-    include $SETTINGS['cpassman_dir'] . '/error.php';
76
+    include $SETTINGS['cpassman_dir'].'/error.php';
77 77
     exit;
78 78
 }
79 79
 ?>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     })
98 98
 
99 99
     // Select user properties
100
-    $('#profile-user-language option[value=<?php echo $session->get('user-language');?>').attr('selected','selected');
100
+    $('#profile-user-language option[value=<?php echo $session->get('user-language'); ?>').attr('selected','selected');
101 101
 
102 102
 
103 103
     // AVATAR IMPORT
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
                     // reload page in case of language change
297 297
                     if ($('#profile-user-language').val()
298
-                        && $('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language');?>') {
298
+                        && $('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language'); ?>') {
299 299
                         // prepare reload
300 300
                         $(this).delay(3000).queue(function() {
301 301
                             document.location.href = "index.php?page=profile";
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                         // Inform user
307 307
                         toastr.remove();
308 308
                         toastr.info(
309
-                            '<?php echo $lang->get('alert_page_will_reload') . ' ... ' . $lang->get('please_wait'); ?>',
309
+                            '<?php echo $lang->get('alert_page_will_reload').' ... '.$lang->get('please_wait'); ?>',
310 310
                             '', {
311 311
                                 timeOut: 3000,
312 312
                                 progressBar: true
@@ -410,27 +410,27 @@  discard block
 block discarded – undo
410 410
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
411 411
         "ratings": [
412 412
             {
413
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
413
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
414 414
                 "className": "meterWarn",
415 415
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
416 416
             },
417 417
             {
418
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
418
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
419 419
                 "className": "meterWarn",
420 420
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
421 421
             },
422 422
             {
423
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
423
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
424 424
                 "className": "meterGood",
425 425
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
426 426
             },
427 427
             {
428
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
428
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
429 429
                 "className": "meterGood",
430 430
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
431 431
             },
432 432
             {
433
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
433
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
434 434
                 "className": "meterExcel",
435 435
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
436 436
             }
@@ -523,27 +523,27 @@  discard block
 block discarded – undo
523 523
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
524 524
         "ratings": [
525 525
             {
526
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
526
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
527 527
                 "className": "meterWarn",
528 528
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
529 529
             },
530 530
             {
531
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
531
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
532 532
                 "className": "meterWarn",
533 533
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
534 534
             },
535 535
             {
536
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
536
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
537 537
                 "className": "meterGood",
538 538
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
539 539
             },
540 540
             {
541
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
541
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
542 542
                 "className": "meterGood",
543 543
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
544 544
             },
545 545
             {
546
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
546
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
547 547
                 "className": "meterExcel",
548 548
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
549 549
             }
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
         }
560 560
     });
561 561
 
562
-    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
562
+    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
563 563
 
564 564
     $("#open-dialog-keys-download").on('click', function(event) {
565 565
         event.preventDefault();
Please login to merge, or discard this patch.
pages/profile.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('profile') === false) {
68 68
     // Not allowed page
69 69
     $session->set('system-error_code', ERR_NOT_ALLOWED);
70
-    include $SETTINGS['cpassman_dir'] . '/error.php';
70
+    include $SETTINGS['cpassman_dir'].'/error.php';
71 71
     exit;
72 72
 }
73 73
 
@@ -100,49 +100,49 @@  discard block
 block discarded – undo
100 100
 $zones = timezone_list();
101 101
 // prepare list of languages
102 102
 $languages = DB::query(
103
-    'SELECT label, name FROM ' . prefixTable('languages') . ' ORDER BY label ASC'
103
+    'SELECT label, name FROM '.prefixTable('languages').' ORDER BY label ASC'
104 104
 );
105 105
 
106 106
 // Do some stats
107 107
 $userItemsNumber = DB::queryFirstField(
108 108
     'SELECT COUNT(id_item) as count
109
-    FROM ' . prefixTable('log_items') . '
109
+    FROM ' . prefixTable('log_items').'
110 110
     WHERE action = "at_creation" AND  id_user = %i',
111 111
     $session->get('user-id')
112 112
 );
113 113
 
114 114
 $userModificationNumber = DB::queryFirstField(
115 115
     'SELECT COUNT(id_item) as count
116
-    FROM ' . prefixTable('log_items') . '
116
+    FROM ' . prefixTable('log_items').'
117 117
     WHERE action = "at_modification" AND  id_user = %i',
118 118
     $session->get('user-id')
119 119
 );
120 120
 
121 121
 $userSeenItemsNumber = DB::queryFirstField(
122 122
     'SELECT COUNT(id_item) as count
123
-    FROM ' . prefixTable('log_items') . '
123
+    FROM ' . prefixTable('log_items').'
124 124
     WHERE action = "at_shown" AND  id_user = %i',
125 125
     $session->get('user-id')
126 126
 );
127 127
 
128 128
 $userSeenPasswordsNumber = DB::queryFirstField(
129 129
     'SELECT COUNT(id_item)
130
-    FROM ' . prefixTable('log_items') . '
130
+    FROM ' . prefixTable('log_items').'
131 131
     WHERE action = "at_password_shown" AND  id_user = %i',
132 132
     $session->get('user-id')
133 133
 );
134 134
 
135 135
 $userInfo = DB::queryFirstRow(
136 136
     'SELECT avatar, last_pw_change
137
-    FROM ' . prefixTable('users') . ' 
137
+    FROM ' . prefixTable('users').' 
138 138
     WHERE id = %i',
139 139
     $session->get('user-id')
140 140
 );
141 141
 
142 142
 if (empty($userInfo['avatar']) === true) {
143
-    $avatar = $SETTINGS['cpassman_url'] . '/includes/images/photo.jpg';
143
+    $avatar = $SETTINGS['cpassman_url'].'/includes/images/photo.jpg';
144 144
 } else {
145
-    $avatar = $SETTINGS['cpassman_url'] . '/includes/avatars/' . $userInfo['avatar'];
145
+    $avatar = $SETTINGS['cpassman_url'].'/includes/avatars/'.$userInfo['avatar'];
146 146
 }
147 147
 
148 148
 // Get Groups name
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 foreach ($session->get('user-roles_array') as $role) {
151 151
     $tmp = DB::queryFirstRow(
152 152
         'SELECT title 
153
-        FROM ' . prefixTable('roles_title') . ' 
153
+        FROM ' . prefixTable('roles_title').' 
154 154
         WHERE id = %i',
155 155
         $role
156 156
     );
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                         <h3 id="profile-username" class="text-center">
197 197
                             <?php
198 198
                             if (null !== $session->get('user-name') && empty($session->get('user-name')) === false) {
199
-                                echo $session->get('user-name') . ' ' . $session->get('user-lastname');
199
+                                echo $session->get('user-name').' '.$session->get('user-lastname');
200 200
                             } else {
201 201
                                 echo $session->get('user-login');
202 202
                             }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                                             } else {
265 265
                                                 echo date('d/m/Y', (int) $session->get('user-last_connection'));
266 266
                                             }
267
-                                            echo ' ' . $lang->get('at') . ' ';
267
+                                            echo ' '.$lang->get('at').' ';
268 268
                                             if (isset($SETTINGS['time_format']) === true) {
269 269
                                                 echo date($SETTINGS['time_format'], (int) $session->get('user-last_connection'));
270 270
                                             } else {
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
                                         </a>
275 275
                                     </li>
276 276
                                     <?php
277
-                                    if (null !== $session->get('user-last_pw_change') && ! empty($session->get('user-last_pw_change') === true)) {
277
+                                    if (null !== $session->get('user-last_pw_change') && !empty($session->get('user-last_pw_change') === true)) {
278 278
                                         // Handle last password change string
279 279
                                         if ($session->has('user-last_pw_change') && null !== $session->get('user-last_pw_change')) {
280 280
                                             if (isset($SETTINGS['date_format']) === true) {
@@ -294,12 +294,12 @@  discard block
 block discarded – undo
294 294
                                         ) {
295 295
                                             $numDaysBeforePwExpiration = '';
296 296
                                         } else {
297
-                                            $numDaysBeforePwExpiration = $LANG['index_pw_expiration'] . ' ' . $session->get('user-num_days_before_exp') . ' ' . $LANG['days'] . '.';
297
+                                            $numDaysBeforePwExpiration = $LANG['index_pw_expiration'].' '.$session->get('user-num_days_before_exp').' '.$LANG['days'].'.';
298 298
                                         }
299 299
                                         echo '
300 300
                                     <li class="list-group-item">
301
-                                        <b><i class="fas fa-calendar-alt fa-fw fa-lg mr-2"></i>' . $lang->get('index_last_pw_change') . '</b>
302
-                                        <a class="float-right">' . $last_pw_change . ' ' . $numDaysBeforePwExpiration . '</a>
301
+                                        <b><i class="fas fa-calendar-alt fa-fw fa-lg mr-2"></i>' . $lang->get('index_last_pw_change').'</b>
302
+                                        <a class="float-right">' . $last_pw_change.' '.$numDaysBeforePwExpiration.'</a>
303 303
                                     </li>';
304 304
                                     }
305 305
                                     ?>
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
                                     if (isset($SETTINGS['api']) === true && (int) $SETTINGS['api'] === 1) {
320 320
                                         echo '
321 321
                                     <li class="list-group-item">
322
-                                        <b><i class="fas fa-paper-plane fa-fw fa-lg mr-2"></i>' . $lang->get('user_profile_api_key') . '</b>
322
+                                        <b><i class="fas fa-paper-plane fa-fw fa-lg mr-2"></i>' . $lang->get('user_profile_api_key').'</b>
323 323
                                         <button class="btn btn-sm btn-primary float-right" id="copy-api-key"><i class="fa-regular fa-copy  pointer"></i></button>
324 324
                                         <a class="float-right mr-2" id="profile-user-api-token">',
325 325
                                             null !== $session->get('user-api_key') ? $session->get('user-api_key') : '',
@@ -337,12 +337,12 @@  discard block
 block discarded – undo
337 337
                                         <?php
338 338
                                         $rows = DB::query(
339 339
                                             'SELECT label AS labelAction, date, null
340
-                                                    FROM ' . prefixTable('log_system') . '
340
+                                                    FROM ' . prefixTable('log_system').'
341 341
                                                     WHERE qui = %i
342 342
                                                     UNION
343 343
                                                     SELECT l.action, l.date, i.label AS itemLabel
344
-                                                    FROM ' . prefixTable('log_items') . ' AS l
345
-                                                    INNER JOIN ' . prefixTable('items') . ' AS i ON (l.id_item = i.id)
344
+                                                    FROM ' . prefixTable('log_items').' AS l
345
+                                                    INNER JOIN ' . prefixTable('items').' AS i ON (l.id_item = i.id)
346 346
                                                     WHERE l.id_user = %i AND l.action IN ("at_access")
347 347
                                                     ORDER BY date DESC
348 348
                                                     LIMIT 0, 40',
@@ -356,9 +356,9 @@  discard block
 block discarded – undo
356 356
                                                 $text = $lang->get($record['labelAction']);
357 357
                                             }
358 358
                                             if (empty($record['NULL']) === false) {
359
-                                                $text .= ' ' . $lang->get('for') . ' <span class="font-weight-light">' . addslashes($record['NULL']) . '</span>';
359
+                                                $text .= ' '.$lang->get('for').' <span class="font-weight-light">'.addslashes($record['NULL']).'</span>';
360 360
                                             }
361
-                                            echo '<li class="list-group-item">' . date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['date']) . ' - ' . $text . '</li>';
361
+                                            echo '<li class="list-group-item">'.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['date']).' - '.$text.'</li>';
362 362
                                         }
363 363
                                         ?>
364 364
                                     </ul>
@@ -392,13 +392,13 @@  discard block
 block discarded – undo
392 392
                                 <?php endif; /* disable_user_edit_profile */
393 393
                                 if (($SETTINGS['disable_user_edit_timezone'] ?? '0') === '0') : ?>
394 394
                                     <div class="form-group">
395
-                                        <label class="col-sm-10 control-label"><?php echo $lang->get('timezone_selection');?></label>
395
+                                        <label class="col-sm-10 control-label"><?php echo $lang->get('timezone_selection'); ?></label>
396 396
                                         <div class="col-sm-10">
397 397
                                             <select class="form-control" id="profile-user-timezone">
398 398
                                                 <?php foreach ($zones as $key => $zone): ?>
399 399
                                                     <option value="<?php echo $key; ?>"<?php 
400 400
                                                         if ($session->has('user-timezone'))
401
-                                                            if($session->get('user-timezone') === $key)
401
+                                                            if ($session->get('user-timezone') === $key)
402 402
                                                                 echo ' selected';
403 403
                                                             elseif ($session->get('user-timezone') === 'not_defined')
404 404
                                                                 if (isset($SETTINGS['timezone']) && $SETTINGS['timezone'] === $key)
@@ -416,10 +416,10 @@  discard block
 block discarded – undo
416 416
                                             <select class="form-control" id="profile-user-language">
417 417
                                                 <?php
418 418
                                                     foreach ($languages as $language) {
419
-                                                        echo '<option value="' . $language['name'] . '"',
419
+                                                        echo '<option value="'.$language['name'].'"',
420 420
                                                         strtolower($session->get('user-language')) === strtolower($language['name']) ?
421 421
                                                         ' selected="selected"' : '',
422
-                                                    '>' . $language['label'] . '</option>';
422
+                                                    '>'.$language['label'].'</option>';
423 423
                                                     }
424 424
                                                 ?>
425 425
                                             </select>
@@ -432,11 +432,11 @@  discard block
 block discarded – undo
432 432
                                         <div class="col-sm-10">
433 433
                                             <select class="form-control" id="profile-user-treeloadstrategy">
434 434
                                                 
435
-                                                <option value="sequential" <?php echo $session->has('user-tree_load_strategy') && $session->get('user-tree_load_strategy') && null !== $session->get('user-tree_load_strategy') && $session->get('user-tree_load_strategy') === 'sequential' ? ' selected' : '';?>>
435
+                                                <option value="sequential" <?php echo $session->has('user-tree_load_strategy') && $session->get('user-tree_load_strategy') && null !== $session->get('user-tree_load_strategy') && $session->get('user-tree_load_strategy') === 'sequential' ? ' selected' : ''; ?>>
436 436
                                                     <?php echo $lang->get('sequential'); ?>
437 437
                                                 </option>
438 438
                                                 
439
-                                                <option value="full" <?php echo $session->has('user-tree_load_strategy') && $session->get('user-tree_load_strategy') && null !== $session->get('user-tree_load_strategy') && $session->get('user-tree_load_strategy') === 'full' ? ' selected' : '';?>>
439
+                                                <option value="full" <?php echo $session->has('user-tree_load_strategy') && $session->get('user-tree_load_strategy') && null !== $session->get('user-tree_load_strategy') && $session->get('user-tree_load_strategy') === 'full' ? ' selected' : ''; ?>>
440 440
                                                     <?php echo $lang->get('full'); ?>
441 441
                                                 </option>
442 442
                                             </select>
@@ -449,11 +449,11 @@  discard block
 block discarded – undo
449 449
                                         <div class="col-sm-10">
450 450
                                             <select class="form-control" id="profile-user-split_view_mode">
451 451
                                                 
452
-                                                <option value="0" <?php echo $session->has('user-split_view_mode') && $session->get('user-split_view_mode') && null !== $session->get('user-split_view_mode') && $session->get('user-split_view_mode') === 0 ? 'selected' : '';?>>
452
+                                                <option value="0" <?php echo $session->has('user-split_view_mode') && $session->get('user-split_view_mode') && null !== $session->get('user-split_view_mode') && $session->get('user-split_view_mode') === 0 ? 'selected' : ''; ?>>
453 453
                                                     <?php echo $lang->get('no'); ?>
454 454
                                                 </option>
455 455
                                                 
456
-                                                <option value="1" <?php echo $session->has('user-split_view_mode') && $session->get('user-split_view_mode') && null !== $session->get('user-split_view_mode') && (int) $session->get('user-split_view_mode') === 1 ? 'selected' : '';?>>
456
+                                                <option value="1" <?php echo $session->has('user-split_view_mode') && $session->get('user-split_view_mode') && null !== $session->get('user-split_view_mode') && (int) $session->get('user-split_view_mode') === 1 ? 'selected' : ''; ?>>
457 457
                                                     <?php echo $lang->get('yes'); ?>
458 458
                                                 </option>
459 459
                                             </select>
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
                                                 <?php 
472 472
                                                 }
473 473
                                                 if (isset($SETTINGS['api']) === true && (int) $SETTINGS['api'] === 1) {
474
-                                                    echo '<button type="button" class="btn btn-warning float-right" id="profile-button-api_token">' . $lang->get('generate_api_token') . '</button>';
474
+                                                    echo '<button type="button" class="btn btn-warning float-right" id="profile-button-api_token">'.$lang->get('generate_api_token').'</button>';
475 475
                                                 }
476 476
                                                 ?>
477 477
                                                 <div id="profile-avatar-file-container" class="hidden"></div>
Please login to merge, or discard this patch.