Passed
Push — teampass_3.0 ( f644bb...9dbfce )
by Nils
12:26
created
pages/admin.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                     // error
87 87
                     toastr.remove();
88 88
                     toastr.error(
89
-                        '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error,
89
+                        '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error,
90 90
                         '', {
91 91
                             closeButton: true,
92 92
                             positionClass: 'toastr-top-right'
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                     // error
152 152
                     toastr.remove();
153 153
                     toastr.error(
154
-                        '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error,
154
+                        '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error,
155 155
                         '', {
156 156
                             closeButton: true,
157 157
                             positionClass: 'toastr-top-right'
Please login to merge, or discard this patch.
pages/uploads.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
 }
36 36
 
37 37
 /* do checks */
38
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
38
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
39 39
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], '2fa', $SETTINGS) === false) {
40 40
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
41
-    include $SETTINGS['cpassman_dir'] . '/error.php';
41
+    include $SETTINGS['cpassman_dir'].'/error.php';
42 42
     exit();
43 43
 }
44 44
 ?>
Please login to merge, or discard this patch.
pages/uploads.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,15 +35,15 @@
 block discarded – undo
35 35
 }
36 36
 
37 37
 /* do checks */
38
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
38
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
39 39
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'ldap', $SETTINGS) === false) {
40 40
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
41
-    include $SETTINGS['cpassman_dir'] . '/error.php';
41
+    include $SETTINGS['cpassman_dir'].'/error.php';
42 42
     exit();
43 43
 }
44 44
 
45 45
 // Load template
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
47 47
 
48 48
 // LDAP type currently loaded
49 49
 $ldap_type = isset($SETTINGS['ldap_type']) ? $SETTINGS['ldap_type'] : '';
Please login to merge, or discard this patch.
sources/upload.files.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
 }
56 56
 
57 57
 /* do checks */
58
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
59
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
58
+require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
59
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
60 60
 if (!checkUser($_SESSION['user_id'], $_SESSION['key'], 'items', $SETTINGS)) {
61 61
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
62
-    include $SETTINGS['cpassman_dir'] . '/error.php';
62
+    include $SETTINGS['cpassman_dir'].'/error.php';
63 63
     exit();
64 64
 }
65 65
 
66 66
 // load functions
67
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
67
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
68 68
 
69 69
 // Prepare POST variables
70 70
 $post_user_token = filter_input(INPUT_POST, 'user_token', FILTER_SANITIZE_STRING);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     } else {
100 100
         // check if token is expired
101 101
         $data = DB::queryFirstRow(
102
-            'SELECT end_timestamp FROM ' . prefixTable('tokens') . ' WHERE user_id = %i AND token = %s',
102
+            'SELECT end_timestamp FROM '.prefixTable('tokens').' WHERE user_id = %i AND token = %s',
103 103
             $_SESSION['user_id'],
104 104
             $post_user_token
105 105
         );
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
 
122 122
 // HTTP headers for no cache etc
123 123
 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
124
-header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
124
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
125 125
 header('Cache-Control: no-store, no-cache, must-revalidate');
126 126
 header('Cache-Control: post-check=0, pre-check=0', false);
127 127
 
128 128
 if (null !== $post_type_upload && $post_type_upload === 'upload_profile_photo') {
129
-    $targetDir = $SETTINGS['cpassman_dir'] . '/includes/avatars';
129
+    $targetDir = $SETTINGS['cpassman_dir'].'/includes/avatars';
130 130
 } else {
131 131
     $targetDir = $SETTINGS['path_to_files_folder'];
132 132
 }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
 // Validate file name (for our purposes we'll just remove invalid characters)
182 182
 $file_name = preg_replace(
183
-    '/[^' . $valid_chars_regex . '\.]/',
183
+    '/[^'.$valid_chars_regex.'\.]/',
184 184
     '',
185 185
     filter_var(
186 186
         strtolower(basename($_FILES['file']['name'])),
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     )
189 189
 );
190 190
 if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) {
191
-    handleUploadError('Invalid file name: ' . $file_name . '.');
191
+    handleUploadError('Invalid file name: '.$file_name.'.');
192 192
 }
193 193
 
194 194
 // Validate file extension
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
         $ext,
203 203
         explode(
204 204
             ',',
205
-            $SETTINGS['upload_docext'] . ',' . $SETTINGS['upload_imagesext'] .
206
-                ',' . $SETTINGS['upload_pkgext'] . ',' . $SETTINGS['upload_otherext']
205
+            $SETTINGS['upload_docext'].','.$SETTINGS['upload_imagesext'].
206
+                ','.$SETTINGS['upload_pkgext'].','.$SETTINGS['upload_otherext']
207 207
         )
208 208
     ) === false
209 209
 ) {
@@ -212,27 +212,27 @@  discard block
 block discarded – undo
212 212
 
213 213
 // is destination folder writable
214 214
 if (is_writable($SETTINGS['path_to_files_folder']) === false) {
215
-    handleUploadError('Not enough permissions on folder ' . $SETTINGS['path_to_files_folder'] . '.');
215
+    handleUploadError('Not enough permissions on folder '.$SETTINGS['path_to_files_folder'].'.');
216 216
 }
217 217
 
218 218
 // Clean the fileName for security reasons
219 219
 $fileName = preg_replace('/[^\w\.]+/', '_', $fileName);
220
-$fileName = preg_replace('/[^' . $valid_chars_regex . '\.]/', '', strtolower(basename($fileName)));
220
+$fileName = preg_replace('/[^'.$valid_chars_regex.'\.]/', '', strtolower(basename($fileName)));
221 221
 
222 222
 // Make sure the fileName is unique but only if chunking is disabled
223
-if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
223
+if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) {
224 224
     $fileNameA = substr($fileName, 0, strlen($ext));
225 225
     $fileNameB = substr($fileName, strlen($ext));
226 226
 
227 227
     $count = 1;
228
-    while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) {
228
+    while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) {
229 229
         ++$count;
230 230
     }
231 231
 
232
-    $fileName = $fileNameA . '_' . $count . $fileNameB;
232
+    $fileName = $fileNameA.'_'.$count.$fileNameB;
233 233
 }
234 234
 
235
-$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName;
235
+$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName;
236 236
 
237 237
 // Create target dir
238 238
 if (!file_exists($targetDir)) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 // Remove old temp files
247 247
 if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) {
248 248
     while (($file = readdir($dir)) !== false) {
249
-        $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file;
249
+        $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$file;
250 250
 
251 251
         // Remove temp file if it is older than the max age and is not the current file
252 252
         if (
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 $newFileName = bin2hex(GenerateCryptKey(16, false, true, true, false, true, $SETTINGS));
337 337
 
338 338
 //Connect to mysql server
339
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
339
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
340 340
 DB::$host = DB_HOST;
341 341
 DB::$user = DB_USER;
342 342
 DB::$password = defuseReturnDecrypted(DB_PASSWD, $SETTINGS);
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 ) {
353 353
     rename(
354 354
         $filePath,
355
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
355
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
356 356
     );
357 357
 
358 358
     // Add in DB
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 ) {
381 381
     rename(
382 382
         $filePath,
383
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
383
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
384 384
     );
385 385
 
386 386
     // Add in DB
@@ -412,13 +412,13 @@  discard block
 block discarded – undo
412 412
     // rename the file
413 413
     rename(
414 414
         $filePath,
415
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext
415
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext
416 416
     );
417 417
 
418 418
     // make thumbnail
419 419
     $ret = makeThumbnail(
420
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext,
421
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName . '_thumb' . '.' . $ext,
420
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext,
421
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName.'_thumb'.'.'.$ext,
422 422
         40
423 423
     );
424 424
 
@@ -429,21 +429,21 @@  discard block
 block discarded – undo
429 429
     }
430 430
 
431 431
     // get current avatar and delete it
432
-    $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM ' . prefixTable('users') . ' WHERE id=%i', $_SESSION['user_id']);
433
-    fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar'], $SETTINGS);
434
-    fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar_thumb'], $SETTINGS);
432
+    $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM '.prefixTable('users').' WHERE id=%i', $_SESSION['user_id']);
433
+    fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar'], $SETTINGS);
434
+    fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar_thumb'], $SETTINGS);
435 435
 
436 436
     // store in DB the new avatar
437 437
     DB::query(
438
-        'UPDATE ' . prefixTable('users') . "
439
-        SET avatar='" . $newFileName . '.' . $ext . "', avatar_thumb='" . $newFileName . '_thumb' . '.' . $ext . "'
438
+        'UPDATE '.prefixTable('users')."
439
+        SET avatar='" . $newFileName.'.'.$ext."', avatar_thumb='".$newFileName.'_thumb'.'.'.$ext."'
440 440
         WHERE id=%i",
441 441
         $_SESSION['user_id']
442 442
     );
443 443
 
444 444
     // store in session
445
-    $_SESSION['user_avatar'] = $newFileName . '.' . $ext;
446
-    $_SESSION['user_avatar_thumb'] = $newFileName . '_thumb' . '.' . $ext;
445
+    $_SESSION['user_avatar'] = $newFileName.'.'.$ext;
446
+    $_SESSION['user_avatar_thumb'] = $newFileName.'_thumb'.'.'.$ext;
447 447
 
448 448
     // return info
449 449
     echo prepareExchangedData(
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 ) {
462 462
     rename(
463 463
         $filePath,
464
-        $targetDir . DIRECTORY_SEPARATOR . $newFileName
464
+        $targetDir.DIRECTORY_SEPARATOR.$newFileName
465 465
     );
466 466
 
467 467
     // Add in DB
Please login to merge, or discard this patch.
sources/upload.attachments.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 }
40 40
 
41 41
 /* do checks */
42
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
43
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
42
+require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
43
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
44 44
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'items', $SETTINGS) !== true) {
45 45
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
46
-    include $SETTINGS['cpassman_dir'] . '/error.php';
46
+    include $SETTINGS['cpassman_dir'].'/error.php';
47 47
     exit();
48 48
 }
49 49
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 $post_isPersonal = filter_input(INPUT_POST, 'isPersonal', FILTER_SANITIZE_NUMBER_INT);
70 70
 
71 71
 // load functions
72
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
72
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
73 73
 
74 74
 // Get parameters
75 75
 $chunk = isset($_REQUEST['chunk']) ? (int) $_REQUEST['chunk'] : 0;
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     exit();
83 83
 } else {
84 84
     //Connect to mysql server
85
-    include_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
86
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
85
+    include_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
86
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
87 87
     if (defined('DB_PASSWD_CLEAR') === false) {
88 88
         define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
89 89
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         // check if token is expired
144 144
         $data = DB::queryFirstRow(
145 145
             'SELECT end_timestamp
146
-            FROM ' . prefixTable('tokens') . '
146
+            FROM ' . prefixTable('tokens').'
147 147
             WHERE user_id = %i AND token = %s',
148 148
             $_SESSION['user_id'],
149 149
             $post_user_token
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
     }
169 169
 
170 170
     // Load Settings
171
-    include_once $SETTINGS['cpassman_dir'] . '/includes/config/tp.config.php';
171
+    include_once $SETTINGS['cpassman_dir'].'/includes/config/tp.config.php';
172 172
 }
173 173
 
174 174
 // HTTP headers for no cache etc
175 175
 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
176
-header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
176
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
177 177
 header('Cache-Control: no-store, no-cache, must-revalidate');
178 178
 header('Cache-Control: post-check=0, pre-check=0', false);
179 179
 
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
 }
219 219
 
220 220
 // Validate file name (for our purposes we'll just remove invalid characters)
221
-$file_name = preg_replace('[^' . $valid_chars_regex . ']', '', strtolower(basename($_FILES['file']['name'])));
221
+$file_name = preg_replace('[^'.$valid_chars_regex.']', '', strtolower(basename($_FILES['file']['name'])));
222 222
 if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) {
223
-    handleAttachmentError('Invalid file name: ' . $file_name . '.', 114);
223
+    handleAttachmentError('Invalid file name: '.$file_name.'.', 114);
224 224
 }
225 225
 
226 226
 // Validate file extension
@@ -230,8 +230,8 @@  discard block
 block discarded – undo
230 230
         $ext,
231 231
         explode(
232 232
             ',',
233
-            $SETTINGS['upload_docext'] . ',' . $SETTINGS['upload_imagesext'] .
234
-                ',' . $SETTINGS['upload_pkgext'] . ',' . $SETTINGS['upload_otherext']
233
+            $SETTINGS['upload_docext'].','.$SETTINGS['upload_imagesext'].
234
+                ','.$SETTINGS['upload_pkgext'].','.$SETTINGS['upload_otherext']
235 235
         )
236 236
     ) === false
237 237
 ) {
@@ -243,24 +243,24 @@  discard block
 block discarded – undo
243 243
 
244 244
 // Clean the fileName for security reasons
245 245
 $fileInfo = pathinfo($fileName);
246
-$fileName = base64_encode($fileInfo['filename']) . '.' . $fileInfo['extension'];
246
+$fileName = base64_encode($fileInfo['filename']).'.'.$fileInfo['extension'];
247 247
 $fileFullSize = 0;
248 248
 
249 249
 // Make sure the fileName is unique but only if chunking is disabled
250
-if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
250
+if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) {
251 251
     $ext = strrpos($fileName, '.');
252 252
     $fileNameA = substr($fileName, 0, $ext);
253 253
     $fileNameB = substr($fileName, $ext);
254 254
 
255 255
     $count = 1;
256
-    while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) {
256
+    while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) {
257 257
         ++$count;
258 258
     }
259 259
 
260
-    $fileName = $fileNameA . '_' . $count . $fileNameB;
260
+    $fileName = $fileNameA.'_'.$count.$fileNameB;
261 261
 }
262 262
 
263
-$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName;
263
+$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName;
264 264
 
265 265
 // Create target dir
266 266
 if (file_exists($targetDir) === false) {
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 // Remove old temp files
275 275
 if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) {
276 276
     while (($file = readdir($dir)) !== false) {
277
-        $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file;
277
+        $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$file;
278 278
 
279 279
         // Remove temp file if it is older than the max age and is not the current file
280 280
         if (
@@ -396,8 +396,8 @@  discard block
 block discarded – undo
396 396
         // This is a public object
397 397
         $users = DB::query(
398 398
             'SELECT id, public_key
399
-            FROM ' . prefixTable('users') . '
400
-            WHERE id NOT IN ("' . OTV_USER_ID . '","' . SSH_USER_ID . '","' . API_USER_ID . '")
399
+            FROM ' . prefixTable('users').'
400
+            WHERE id NOT IN ("' . OTV_USER_ID.'","'.SSH_USER_ID.'","'.API_USER_ID.'")
401 401
             AND public_key != ""'
402 402
         );
403 403
         foreach ($users as $user) {
@@ -435,14 +435,14 @@  discard block
 block discarded – undo
435 435
                 'date' => time(),
436 436
                 'id_user' => $_SESSION['user_id'],
437 437
                 'action' => 'at_modification',
438
-                'raison' => 'at_add_file : ' . $fileName . ':' . $newID,
438
+                'raison' => 'at_add_file : '.$fileName.':'.$newID,
439 439
             )
440 440
         );
441 441
     }
442 442
 }
443 443
 
444 444
 // Return JSON-RPC response
445
-die('{"jsonrpc" : "2.0", "result" : null, "id" : "' . $newID . '"}');
445
+die('{"jsonrpc" : "2.0", "result" : null, "id" : "'.$newID.'"}');
446 446
 
447 447
 /**
448 448
  * Undocumented function.
@@ -452,5 +452,5 @@  discard block
 block discarded – undo
452 452
  */
453 453
 function handleAttachmentError($message, $code)
454 454
 {
455
-    echo '{"jsonrpc" : "2.0", "error" : {"code": ' . htmlentities($code, ENT_QUOTES) . ', "message": "' . htmlentities($message, ENT_QUOTES) . '"}, "id" : "id"}';
455
+    echo '{"jsonrpc" : "2.0", "error" : {"code": '.htmlentities($code, ENT_QUOTES).', "message": "'.htmlentities($message, ENT_QUOTES).'"}, "id" : "id"}';
456 456
 }
Please login to merge, or discard this patch.
includes/core/load.js.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                                     console.log('User has to regenerate keys')
84 84
                                     // HIde
85 85
                                     $('.content-header, .content').addClass('hidden');
86
-                                    $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected');?>');
86
+                                    $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected'); ?>');
87 87
 
88 88
                                     // Show passwords inputs and form
89 89
                                     $('#dialog-user-temporary-code').removeClass('hidden');
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
                                     // Show passwords inputs and form
99 99
                                     $('#dialog-user-change-password-info')
100
-                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('user_has_to_change_password_info');?>')
100
+                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('user_has_to_change_password_info'); ?>')
101 101
                                         .removeClass('hidden');
102 102
                                     $('#dialog-user-change-password').removeClass('hidden');
103 103
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
                                     // Show passwords inputs and form
112 112
                                     $('#dialog-ldap-user-change-password-info')
113
-                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('ldap_user_has_changed_his_password');?>')
113
+                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('ldap_user_has_changed_his_password'); ?>')
114 114
                                         .removeClass('hidden');
115 115
                                     $('#dialog-ldap-user-change-password').removeClass('hidden');
116 116
                                     
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         console.log('User has to regenerate keys')
182 182
         // HIde
183 183
         $('.content-header, .content').addClass('hidden');
184
-        $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected');?>');
184
+        $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected'); ?>');
185 185
 
186 186
         // Show passwords inputs and form
187 187
         $('#dialog-user-temporary-code').removeClass('hidden');
@@ -748,13 +748,13 @@  discard block
 block discarded – undo
748 748
             //
749 749
 
750 750
             
751
-            $('#dialog-admin-change-user-password-info').html('<?php echo langHdl('sending_email_message');?>');
751
+            $('#dialog-admin-change-user-password-info').html('<?php echo langHdl('sending_email_message'); ?>');
752 752
             
753 753
             // Prepare data
754 754
             var data = {
755 755
                 'receipt': $('#temp-user-email').val(),
756
-                'subject': '[Teampass] <?php echo langHdl('temporary_encryption_code');?>',
757
-                'body': '<?php echo langHdl('email_body_temporary_encryption_code');?>',
756
+                'subject': '[Teampass] <?php echo langHdl('temporary_encryption_code'); ?>',
757
+                'body': '<?php echo langHdl('email_body_temporary_encryption_code'); ?>',
758 758
                 'pre_replace' : {
759 759
                     '#enc_code#' : $('#temp-user-pwd').val(),
760 760
                 }
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
             '#warningModal',
1221 1221
             '<i class="fas fa-clock fa-lg warning mr-2"></i><?php echo langHdl('index_add_one_hour'); ?>',
1222 1222
             '<div class="form-group">' +
1223
-            '<label for="warningModal-input" class="col-form-label"><?php echo langHdl('index_session_duration') . ' (' . langHdl('minutes') . ')'; ?>:</label>' +
1223
+            '<label for="warningModal-input" class="col-form-label"><?php echo langHdl('index_session_duration').' ('.langHdl('minutes').')'; ?>:</label>' +
1224 1224
             '<input type="text" class="form-control" id="warningModal-input" value="<?php echo isset($_SESSION['user']['session_duration']) === true ? (int) $_SESSION['user']['session_duration'] / 60 : 60; ?>">' +
1225 1225
             '</div>',
1226 1226
             '<?php echo langHdl('confirm'); ?>',
Please login to merge, or discard this patch.
error.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
     && filter_input(INPUT_POST, 'session', FILTER_SANITIZE_STRING) === 'expired'
55 55
 ) {
56 56
     //Include files
57
-    require_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
58
-    require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
59
-    require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
60
-    require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
57
+    require_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
58
+    require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
59
+    require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
60
+    require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
61 61
     // connect to DB
62
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
62
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
63 63
     if (defined('DB_PASSWD_CLEAR') === false) {
64 64
         define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
65 65
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     // Update table by deleting ID
70 70
     if (isset($_SESSION['user_id'])) {
71 71
         DB::update(
72
-            DB_PREFIX . 'users',
72
+            DB_PREFIX.'users',
73 73
             [
74 74
                 'key_tempo' => '',
75 75
             ],
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         logEvents($SETTINGS, 'user_connection', 'disconnection', $_SESSION['user_id'], $_SESSION['login']);
84 84
     }
85 85
 } else {
86
-    require_once $SETTINGS['cpassman_dir'] . '/sources/main.queries.php';
86
+    require_once $SETTINGS['cpassman_dir'].'/sources/main.queries.php';
87 87
     $errorCode = '';
88 88
     if (@$_SESSION['error']['code'] === ERR_NOT_ALLOWED) {
89 89
         $errorCode = 'ERROR NOT ALLOWED';
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 }
72 72
 
73 73
 // Include files
74
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
75
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
74
+require_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
75
+require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
76 76
 // Quick major version check -> upgrade needed?
77 77
 if (isset($SETTINGS['cpassman_version']) === true && version_compare(TP_VERSION, $SETTINGS['cpassman_version']) > 0) {
78 78
     // Perform redirection
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     exit;
86 86
 }
87 87
 
88
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
88
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
89 89
 $superGlobal = new protect\SuperGlobal\SuperGlobal();
90 90
 
91 91
 if (isset($SETTINGS['cpassman_url']) === false || $SETTINGS['cpassman_url'] === '') {
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
 }
94 94
 
95 95
 // Include files
96
-require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
97
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
96
+require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
97
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
98 98
 // Open MYSQL database connection
99 99
 require_once './includes/libraries/Database/Meekrodb/db.class.php';
100 100
 if (defined('DB_PASSWD_CLEAR') === false) {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 DB::$port = DB_PORT;
108 108
 DB::$encoding = DB_ENCODING;
109 109
 // Load Core library
110
-require_once $SETTINGS['cpassman_dir'] . '/sources/core.php';
110
+require_once $SETTINGS['cpassman_dir'].'/sources/core.php';
111 111
 // Prepare POST variables
112 112
 $post_language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING);
113 113
 // Prepare superGlobal variables
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     // case of user has change language in the login page
138 138
     $dataLanguage = DB::queryFirstRow(
139 139
         'SELECT flag, name
140
-        FROM ' . prefixTable('languages') . '
140
+        FROM ' . prefixTable('languages').'
141 141
         WHERE name = %s',
142 142
         $get['language']
143 143
     );
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
     //get default language
148 148
     $dataLanguage = DB::queryFirstRow(
149 149
         'SELECT m.valeur AS valeur, l.flag AS flag
150
-        FROM ' . prefixTable('misc') . ' AS m
151
-        INNER JOIN ' . prefixTable('languages') . ' AS l ON (m.valeur = l.name)
150
+        FROM ' . prefixTable('misc').' AS m
151
+        INNER JOIN ' . prefixTable('languages').' AS l ON (m.valeur = l.name)
152 152
                                                                                                                                                                                                                                                                                                                                                                                                 WHERE m.type=%s_type AND m.intitule=%s_intitule',
153 153
         [
154 154
             'type' => 'admin',
@@ -190,23 +190,23 @@  discard block
 block discarded – undo
190 190
 
191 191
 // Load user languages files
192 192
 if (in_array($session_user_language, $languagesList) === true) {
193
-    if (file_exists($SETTINGS['cpassman_dir'] . '/includes/language/' . $session_user_language . '.php') === true) {
194
-        $_SESSION['teampass']['lang'] = include $SETTINGS['cpassman_dir'] . '/includes/language/' . $session_user_language . '.php';
193
+    if (file_exists($SETTINGS['cpassman_dir'].'/includes/language/'.$session_user_language.'.php') === true) {
194
+        $_SESSION['teampass']['lang'] = include $SETTINGS['cpassman_dir'].'/includes/language/'.$session_user_language.'.php';
195 195
     }
196 196
 } else {
197 197
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
198 198
     //not allowed page
199
-    include $SETTINGS['cpassman_dir'] . '/error.php';
199
+    include $SETTINGS['cpassman_dir'].'/error.php';
200 200
 }
201 201
 
202 202
 // load 2FA Google
203 203
 if (isset($SETTINGS['google_authentication']) === true && $SETTINGS['google_authentication'] === '1') {
204
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
204
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
205 205
 }
206 206
 
207 207
 // load 2FA Yubico
208 208
 if (isset($SETTINGS['yubico_authentication']) === true && $SETTINGS['yubico_authentication'] === '1') {
209
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/Yubico/Yubico.php';
209
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/Yubico/Yubico.php';
210 210
 }
211 211
 
212 212
 // Some template adjust
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     <!-- Toastr -->
264 264
     <link rel="stylesheet" href="plugins/toastr/toastr.min.css" />
265 265
     <!-- favicon -->
266
-    <link rel="shortcut icon" type="image/png" href="<?php echo $SETTINGS['favicon'];?>"/>
266
+    <link rel="shortcut icon" type="image/png" href="<?php echo $SETTINGS['favicon']; ?>"/>
267 267
 </head>
268 268
 
269 269
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
             ),
295 295
             'SESSION'
296 296
         );
297
-        include $SETTINGS['cpassman_dir'] . '/error.php';
297
+        include $SETTINGS['cpassman_dir'].'/error.php';
298 298
     }
299 299
 } elseif (
300 300
     $session_validite_pw !== null
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                         <div class="dropdown show">
339 339
                             <a class="btn btn-primary dropdown-toggle" href="#" data-toggle="dropdown">
340 340
                                 <?php
341
-                                    echo $session_name . '&nbsp;' . $session_lastname; ?>
341
+                                    echo $session_name.'&nbsp;'.$session_lastname; ?>
342 342
                             </a>
343 343
 
344 344
                             <div class="dropdown-menu dropdown-menu-right">
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             <!-- Main Sidebar Container -->
377 377
             <aside class="main-sidebar sidebar-dark-primary elevation-4">
378 378
                 <!-- Brand Logo -->
379
-                <a href="<?php echo $SETTINGS['cpassman_url'] . '/index.php?page=items'; ?>" class="brand-link">
379
+                <a href="<?php echo $SETTINGS['cpassman_url'].'/index.php?page=items'; ?>" class="brand-link">
380 380
                     <img src="includes/images/teampass-logo2-home.png" alt="Teampass Logo" class="brand-image">
381 381
                     <span class="brand-text font-weight-light"><?php echo TP_TOOL_NAME; ?></span>
382 382
                 </a>
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
                         <a href="#" data-name="items" class="nav-link', $get['page'] === 'items' ? ' active' : '', '">
395 395
                         <i class="nav-icon fas fa-key"></i>
396 396
                         <p>
397
-                            ' . langHdl('pw') . '
397
+                            ' . langHdl('pw').'
398 398
                         </p>
399 399
                         </a>
400 400
                     </li>';
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
                         <a href="#" data-name="import" class="nav-link', $get['page'] === 'import' ? ' active' : '', '">
411 411
                         <i class="nav-icon fas fa-file-import"></i>
412 412
                         <p>
413
-                            ' . langHdl('import') . '
413
+                            ' . langHdl('import').'
414 414
                         </p>
415 415
                         </a>
416 416
                     </li>';
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
                         <a href="#" data-name="export" class="nav-link', $get['page'] === 'export' ? ' active' : '', '">
432 432
                         <i class="nav-icon fas fa-file-export"></i>
433 433
                         <p>
434
-                            ' . langHdl('export') . '
434
+                            ' . langHdl('export').'
435 435
                         </p>
436 436
                         </a>
437 437
                     </li>';
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
                         <a href="#" data-name="search" class="nav-link', $get['page'] === 'search' ? ' active' : '', '">
459 459
                         <i class="nav-icon fas fa-search"></i>
460 460
                         <p>
461
-                            ' . langHdl('find') . '
461
+                            ' . langHdl('find').'
462 462
                         </p>
463 463
                         </a>
464 464
                     </li>';
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
                         <a href="#" data-name="favourites" class="nav-link', $get['page'] === 'admin' ? ' favourites' : '', '">
476 476
                         <i class="nav-icon fas fa-star"></i>
477 477
                         <p>
478
-                            ' . langHdl('favorites') . '
478
+                            ' . langHdl('favorites').'
479 479
                         </p>
480 480
                         </a>
481 481
                     </li>';
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
                         <a href="#" data-name="suggestion" class="nav-link', $get['page'] === 'suggestion' ? ' active' : '', '">
506 506
                         <i class="nav-icon fas fa-lightbulb"></i>
507 507
                         <p>
508
-                            ' . langHdl('suggestion_menu') . '
508
+                            ' . langHdl('suggestion_menu').'
509 509
                         </p>
510 510
                         </a>
511 511
                     </li>';
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
                         <a href="#" data-name="admin" class="nav-link', $get['page'] === 'admin' ? ' active' : '', '">
519 519
                         <i class="nav-icon fas fa-info"></i>
520 520
                         <p>
521
-                            ' . langHdl('admin_main') . '
521
+                            ' . langHdl('admin_main').'
522 522
                         </p>
523 523
                         </a>
524 524
                     </li>
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
                         <a href="#" class="nav-link">
527 527
                             <i class="nav-icon fas fa-wrench"></i>
528 528
                             <p>
529
-                                ' . langHdl('admin_settings') . '
529
+                                ' . langHdl('admin_settings').'
530 530
                                 <i class="fas fa-angle-left right"></i>
531 531
                             </p>
532 532
                         </a>
@@ -534,55 +534,55 @@  discard block
 block discarded – undo
534 534
                             <li class="nav-item">
535 535
                                 <a href="#" data-name="options" class="nav-link', $get['page'] === 'options' ? ' active' : '', '">
536 536
                                     <i class="fas fa-check-double nav-icon"></i>
537
-                                    <p>' . langHdl('options') . '</p>
537
+                                    <p>' . langHdl('options').'</p>
538 538
                                 </a>
539 539
                             </li>
540 540
                             <li class="nav-item">
541 541
                                 <a href="#" data-name="2fa" class="nav-link', $get['page'] === '2fa' ? ' active' : '', '">
542 542
                                     <i class="fas fa-qrcode nav-icon"></i>
543
-                                    <p>' . langHdl('mfa_short') . '</p>
543
+                                    <p>' . langHdl('mfa_short').'</p>
544 544
                                 </a>
545 545
                             </li>
546 546
                             <li class="nav-item">
547 547
                                 <a href="#" data-name="api" class="nav-link', $get['page'] === 'api' ? ' active' : '', '">
548 548
                                     <i class="fas fa-cubes nav-icon"></i>
549
-                                    <p>' . langHdl('api') . '</p>
549
+                                    <p>' . langHdl('api').'</p>
550 550
                                 </a>
551 551
                             </li>
552 552
                             <li class="nav-item">
553 553
                                 <a href="#" data-name="backups" class="nav-link', $get['page'] === 'backups' ? ' active' : '', '">
554 554
                                     <i class="fas fa-database nav-icon"></i>
555
-                                    <p>' . langHdl('backups') . '</p>
555
+                                    <p>' . langHdl('backups').'</p>
556 556
                                 </a>
557 557
                             </li>
558 558
                             <li class="nav-item">
559 559
                                 <a href="#" data-name="emails" class="nav-link', $get['page'] === 'emails' ? ' active' : '', '">
560 560
                                     <i class="fas fa-envelope nav-icon"></i>
561
-                                    <p>' . langHdl('emails') . '</p>
561
+                                    <p>' . langHdl('emails').'</p>
562 562
                                 </a>
563 563
                             </li>
564 564
                             <li class="nav-item">
565 565
                                 <a href="#" data-name="fields" class="nav-link', $get['page'] === 'fields' ? ' active' : '', '">
566 566
                                     <i class="fas fa-keyboard nav-icon"></i>
567
-                                    <p>' . langHdl('fields') . '</p>
567
+                                    <p>' . langHdl('fields').'</p>
568 568
                                 </a>
569 569
                             </li>
570 570
                             <li class="nav-item">
571 571
                                 <a href="#" data-name="ldap" class="nav-link', $get['page'] === 'ldap' ? ' active' : '', '">
572 572
                                     <i class="fas fa-id-card nav-icon"></i>
573
-                                    <p>' . langHdl('ldap') . '</p>
573
+                                    <p>' . langHdl('ldap').'</p>
574 574
                                 </a>
575 575
                             </li>
576 576
                             <li class="nav-item">
577 577
                                 <a href="#" data-name="uploads" class="nav-link', $get['page'] === 'uploads' ? ' active' : '', '">
578 578
                                     <i class="fas fa-file-upload nav-icon"></i>
579
-                                    <p>' . langHdl('uploads') . '</p>
579
+                                    <p>' . langHdl('uploads').'</p>
580 580
                                 </a>
581 581
                             </li>
582 582
                             <li class="nav-item">
583 583
                                 <a href="#" data-name="statistics" class="nav-link', $get['page'] === 'statistics' ? ' active' : '', '">
584 584
                                     <i class="fas fa-chart-bar nav-icon"></i>
585
-                                    <p>' . langHdl('statistics') . '</p>
585
+                                    <p>' . langHdl('statistics').'</p>
586 586
                                 </a>
587 587
                             </li>
588 588
                         </ul>
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
                         <a href="#" data-name="actions" class="nav-link', $get['page'] === 'actions' ? ' active' : '', '">
592 592
                         <i class="nav-icon fas fa-cogs"></i>
593 593
                         <p>
594
-                            ' . langHdl('actions') . '
594
+                            ' . langHdl('actions').'
595 595
                         </p>
596 596
                         </a>
597 597
                     </li>';
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
                         <a href="#" data-name="folders" class="nav-link', $get['page'] === 'folders' ? ' active' : '', '">
608 608
                         <i class="nav-icon fas fa-folder-open"></i>
609 609
                         <p>
610
-                            ' . langHdl('folders') . '
610
+                            ' . langHdl('folders').'
611 611
                         </p>
612 612
                         </a>
613 613
                     </li>
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
                         <a href="#" data-name="roles" class="nav-link', $get['page'] === 'roles' ? ' active' : '', '">
616 616
                         <i class="nav-icon fas fa-graduation-cap"></i>
617 617
                         <p>
618
-                            ' . langHdl('roles') . '
618
+                            ' . langHdl('roles').'
619 619
                         </p>
620 620
                         </a>
621 621
                     </li>
@@ -623,38 +623,38 @@  discard block
 block discarded – undo
623 623
                         <a href="#" data-name="users" class="nav-link', $get['page'] === 'users' ? ' active' : '', '">
624 624
                         <i class="nav-icon fas fa-users"></i>
625 625
                         <p>
626
-                            ' . langHdl('users') . '
626
+                            ' . langHdl('users').'
627 627
                         </p>
628 628
                         </a>
629 629
                     </li>
630 630
                     <li class="nav-item has-treeview', $menuUtilities === true ? ' menu-open' : '', '">
631 631
                         <a href="#" class="nav-link">
632 632
                         <i class="nav-icon fas fa-cubes"></i>
633
-                        <p>' . langHdl('admin_views') . '<i class="fas fa-angle-left right"></i></p>
633
+                        <p>' . langHdl('admin_views').'<i class="fas fa-angle-left right"></i></p>
634 634
                         </a>
635 635
                         <ul class="nav nav-treeview">
636 636
                           <li class="nav-item">
637 637
                             <a href="#" data-name="utilities.renewal" class="nav-link', $get['page'] === 'utilities.renewal' ? ' active' : '', '">
638 638
                               <i class="far fa-calendar-alt nav-icon"></i>
639
-                              <p>' . langHdl('renewal') . '</p>
639
+                              <p>' . langHdl('renewal').'</p>
640 640
                             </a>
641 641
                           </li>
642 642
                           <li class="nav-item">
643 643
                             <a href="#" data-name="utilities.deletion" class="nav-link', $get['page'] === 'utilities.deletion' ? ' active' : '', '">
644 644
                               <i class="fas fa-trash-alt nav-icon"></i>
645
-                              <p>' . langHdl('deletion') . '</p>
645
+                              <p>' . langHdl('deletion').'</p>
646 646
                             </a>
647 647
                           </li>
648 648
                           <li class="nav-item">
649 649
                             <a href="#" data-name="utilities.logs" class="nav-link', $get['page'] === 'utilities.logs' ? ' active' : '', '">
650 650
                               <i class="fas fa-history nav-icon"></i>
651
-                              <p>' . langHdl('logs') . '</p>
651
+                              <p>' . langHdl('logs').'</p>
652 652
                             </a>
653 653
                           </li>
654 654
                           <li class="nav-item">
655 655
                             <a href="#" data-name="utilities.database" class="nav-link', $get['page'] === 'utilities.database' ? ' active' : '', '">
656 656
                               <i class="fas fa-database nav-icon"></i>
657
-                              <p>' . langHdl('database') . '</p>
657
+                              <p>' . langHdl('database').'</p>
658 658
                             </a>
659 659
                           </li>
660 660
                         </ul>
@@ -665,10 +665,10 @@  discard block
 block discarded – undo
665 665
                     <!-- /.sidebar-menu -->
666 666
                 <div class="menu-footer">
667 667
                     <div class="" id="sidebar-footer">
668
-                        <i class="fas fa-clock-o mr-2 infotip text-info pointer" title="<?php echo langHdl('server_time') . ' ' .
669
-                            date($SETTINGS['date_format'], $server['request_time']) . ' - ' .
668
+                        <i class="fas fa-clock-o mr-2 infotip text-info pointer" title="<?php echo langHdl('server_time').' '.
669
+                            date($SETTINGS['date_format'], $server['request_time']).' - '.
670 670
                             date($SETTINGS['time_format'], $server['request_time']); ?>"></i>
671
-                        <i class="fas fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online . ' ' . langHdl('users_online'); ?>"></i>
671
+                        <i class="fas fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online.' '.langHdl('users_online'); ?>"></i>
672 672
                         <a href="<?php echo READTHEDOC_URL; ?>" target="_blank" class="text-info"><i class="fas fa-book mr-2 infotip" title="<?php echo langHdl('documentation_canal'); ?> ReadTheDocs"></i></a>
673 673
                         <a href="<?php echo REDDIT_URL; ?>" target="_blank" class="text-info"><i class="fab fa-reddit-alien mr-2 infotip" title="<?php echo langHdl('admin_help'); ?>"></i></a>
674 674
                         <i class="fas fa-bug infotip pointer text-info" title="<?php echo langHdl('bugs_page'); ?>" onclick="generateBugReport()"></i>
@@ -971,18 +971,18 @@  discard block
 block discarded – undo
971 971
                     } elseif ($get['page'] === 'items') {
972 972
                         // SHow page with Items
973 973
                         if ((int) $session_user_admin !== 1) {
974
-                            include $SETTINGS['cpassman_dir'] . '/pages/items.php';
974
+                            include $SETTINGS['cpassman_dir'].'/pages/items.php';
975 975
                         } elseif ((int) $session_user_admin === 1) {
976
-                            include $SETTINGS['cpassman_dir'] . '/pages/admin.php';
976
+                            include $SETTINGS['cpassman_dir'].'/pages/admin.php';
977 977
                         } else {
978 978
                             $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
979 979
                             //not allowed page
980
-                            include $SETTINGS['cpassman_dir'] . '/error.php';
980
+                            include $SETTINGS['cpassman_dir'].'/error.php';
981 981
                         }
982 982
                     } elseif (in_array($get['page'], array_keys($mngPages)) === true) {
983 983
                         // Define if user is allowed to see management pages
984 984
                         if ($session_user_admin === 1) {
985
-                            include $SETTINGS['cpassman_dir'] . '/pages/' . $mngPages[$get['page']];
985
+                            include $SETTINGS['cpassman_dir'].'/pages/'.$mngPages[$get['page']];
986 986
                         } elseif ($session_user_manager === 1 || $session_user_human_resources === 1) {
987 987
                             if ($get['page'] !== 'manage_main'
988 988
                                 && $get['page'] !== 'manage_settings'
@@ -991,15 +991,15 @@  discard block
 block discarded – undo
991 991
                             } else {
992 992
                                 $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
993 993
                                 //not allowed page
994
-                                include $SETTINGS['cpassman_dir'] . '/error.php';
994
+                                include $SETTINGS['cpassman_dir'].'/error.php';
995 995
                             }
996 996
                         } else {
997 997
                             $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
998 998
                             //not allowed page
999
-                            include $SETTINGS['cpassman_dir'] . '/error.php';
999
+                            include $SETTINGS['cpassman_dir'].'/error.php';
1000 1000
                         }
1001 1001
                     } elseif (empty($get['page']) === false) {
1002
-                        include $SETTINGS['cpassman_dir'] . '/pages/' . $get['page'] . '.php';
1002
+                        include $SETTINGS['cpassman_dir'].'/pages/'.$get['page'].'.php';
1003 1003
                     } else {
1004 1004
                         $_SESSION['error']['code'] = ERR_NOT_EXIST;
1005 1005
                         //page doesn't exist
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
     $superGlobal->put('initialUrl', '', 'SESSION');
1090 1090
 
1091 1091
     // LOGIN form
1092
-    include $SETTINGS['cpassman_dir'] . '/includes/core/login.php';
1092
+    include $SETTINGS['cpassman_dir'].'/includes/core/login.php';
1093 1093
 }
1094 1094
 
1095 1095
     ?>
@@ -1275,61 +1275,61 @@  discard block
 block discarded – undo
1275 1275
     isset($_SESSION['CPM']) === true
1276 1276
     && isset($SETTINGS['cpassman_dir']) === true
1277 1277
 ) {
1278
-    include_once $SETTINGS['cpassman_dir'] . '/includes/core/load.js.php';
1278
+    include_once $SETTINGS['cpassman_dir'].'/includes/core/load.js.php';
1279 1279
     if ($menuAdmin === true) {
1280
-        include_once $SETTINGS['cpassman_dir'] . '/pages/admin.js.php';
1280
+        include_once $SETTINGS['cpassman_dir'].'/pages/admin.js.php';
1281 1281
         if ($get['page'] === '2fa') {
1282
-            include_once $SETTINGS['cpassman_dir'] . '/pages/2fa.js.php';
1282
+            include_once $SETTINGS['cpassman_dir'].'/pages/2fa.js.php';
1283 1283
         } elseif ($get['page'] === 'api') {
1284
-            include_once $SETTINGS['cpassman_dir'] . '/pages/api.js.php';
1284
+            include_once $SETTINGS['cpassman_dir'].'/pages/api.js.php';
1285 1285
         } elseif ($get['page'] === 'backups') {
1286
-            include_once $SETTINGS['cpassman_dir'] . '/pages/backups.js.php';
1286
+            include_once $SETTINGS['cpassman_dir'].'/pages/backups.js.php';
1287 1287
         } elseif ($get['page'] === 'emails') {
1288
-            include_once $SETTINGS['cpassman_dir'] . '/pages/emails.js.php';
1288
+            include_once $SETTINGS['cpassman_dir'].'/pages/emails.js.php';
1289 1289
         } elseif ($get['page'] === 'ldap') {
1290
-            include_once $SETTINGS['cpassman_dir'] . '/pages/ldap.js.php';
1290
+            include_once $SETTINGS['cpassman_dir'].'/pages/ldap.js.php';
1291 1291
         } elseif ($get['page'] === 'uploads') {
1292
-            include_once $SETTINGS['cpassman_dir'] . '/pages/uploads.js.php';
1292
+            include_once $SETTINGS['cpassman_dir'].'/pages/uploads.js.php';
1293 1293
         } elseif ($get['page'] === 'actions') {
1294
-            include_once $SETTINGS['cpassman_dir'] . '/pages/actions.js.php';
1294
+            include_once $SETTINGS['cpassman_dir'].'/pages/actions.js.php';
1295 1295
         } elseif ($get['page'] === 'fields') {
1296
-            include_once $SETTINGS['cpassman_dir'] . '/pages/fields.js.php';
1296
+            include_once $SETTINGS['cpassman_dir'].'/pages/fields.js.php';
1297 1297
         } elseif ($get['page'] === 'options') {
1298
-            include_once $SETTINGS['cpassman_dir'] . '/pages/options.js.php';
1298
+            include_once $SETTINGS['cpassman_dir'].'/pages/options.js.php';
1299 1299
         } elseif ($get['page'] === 'statistics') {
1300
-            include_once $SETTINGS['cpassman_dir'] . '/pages/statistics.js.php';
1300
+            include_once $SETTINGS['cpassman_dir'].'/pages/statistics.js.php';
1301 1301
         }
1302 1302
     } elseif (isset($get['page']) === true) {
1303 1303
         if ($get['page'] === 'items') {
1304
-            include_once $SETTINGS['cpassman_dir'] . '/pages/items.js.php';
1304
+            include_once $SETTINGS['cpassman_dir'].'/pages/items.js.php';
1305 1305
         } elseif ($get['page'] === 'import') {
1306
-            include_once $SETTINGS['cpassman_dir'] . '/pages/import.js.php';
1306
+            include_once $SETTINGS['cpassman_dir'].'/pages/import.js.php';
1307 1307
         } elseif ($get['page'] === 'export') {
1308
-            include_once $SETTINGS['cpassman_dir'] . '/pages/export.js.php';
1308
+            include_once $SETTINGS['cpassman_dir'].'/pages/export.js.php';
1309 1309
         } elseif ($get['page'] === 'offline') {
1310
-            include_once $SETTINGS['cpassman_dir'] . '/pages/offline.js.php';
1310
+            include_once $SETTINGS['cpassman_dir'].'/pages/offline.js.php';
1311 1311
         } elseif ($get['page'] === 'search') {
1312
-            include_once $SETTINGS['cpassman_dir'] . '/pages/search.js.php';
1312
+            include_once $SETTINGS['cpassman_dir'].'/pages/search.js.php';
1313 1313
         } elseif ($get['page'] === 'profile') {
1314
-            include_once $SETTINGS['cpassman_dir'] . '/pages/profile.js.php';
1314
+            include_once $SETTINGS['cpassman_dir'].'/pages/profile.js.php';
1315 1315
         } elseif ($get['page'] === 'favourites') {
1316
-            include_once $SETTINGS['cpassman_dir'] . '/pages/favorites.js.php';
1316
+            include_once $SETTINGS['cpassman_dir'].'/pages/favorites.js.php';
1317 1317
         } elseif ($get['page'] === 'folders') {
1318
-            include_once $SETTINGS['cpassman_dir'] . '/pages/folders.js.php';
1318
+            include_once $SETTINGS['cpassman_dir'].'/pages/folders.js.php';
1319 1319
         } elseif ($get['page'] === 'users') {
1320
-            include_once $SETTINGS['cpassman_dir'] . '/pages/users.js.php';
1320
+            include_once $SETTINGS['cpassman_dir'].'/pages/users.js.php';
1321 1321
         } elseif ($get['page'] === 'roles') {
1322
-            include_once $SETTINGS['cpassman_dir'] . '/pages/roles.js.php';
1322
+            include_once $SETTINGS['cpassman_dir'].'/pages/roles.js.php';
1323 1323
         } elseif ($get['page'] === 'utilities.deletion') {
1324
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.deletion.js.php';
1324
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.deletion.js.php';
1325 1325
         } elseif ($get['page'] === 'utilities.logs') {
1326
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.logs.js.php';
1326
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.logs.js.php';
1327 1327
         } elseif ($get['page'] === 'utilities.database') {
1328
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.database.js.php';
1328
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.database.js.php';
1329 1329
         } elseif ($get['page'] === 'utilities.renewal') {
1330
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.renewal.js.php';
1330
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.renewal.js.php';
1331 1331
         }
1332 1332
     } else {
1333
-        include_once $SETTINGS['cpassman_dir'] . '/includes/core/login.js.php';
1333
+        include_once $SETTINGS['cpassman_dir'].'/includes/core/login.js.php';
1334 1334
     }
1335 1335
 }
Please login to merge, or discard this patch.
includes/core/otv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 } else {
49 49
     throw new Exception("Error file '/includes/config/tp.config.php' not exists", 1);
50 50
 }
51
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
51
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
52 52
 $superGlobal = new protect\SuperGlobal\SuperGlobal();
53 53
 ?>
54 54
 <body class="hold-transition otv-page">
Please login to merge, or discard this patch.