Passed
Push — teampass_3.0 ( 04f12b...91b93f )
by Nils
05:44
created
sources/main.queries.php 1 patch
Spacing   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 date_default_timezone_set(isset($SETTINGS['timezone']) === true ? $SETTINGS['timezone'] : 'UTC');
46 46
 
47 47
 // DO CHECKS
48
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
49
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
48
+require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
49
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
50 50
 $post_type = filter_input(INPUT_POST, 'type', FILTER_SANITIZE_STRING);
51 51
 if (
52 52
     isset($post_type) === true
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     && checkUser($_SESSION['user_id'], $_SESSION['key'], 'home', $SETTINGS) === false
63 63
 ) {
64 64
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
65
-    include $SETTINGS['cpassman_dir'] . '/error.php';
65
+    include $SETTINGS['cpassman_dir'].'/error.php';
66 66
     exit();
67 67
 } elseif ((isset($_SESSION['user_id']) === true
68 68
         && isset($_SESSION['key'])) === true
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     mainQuery($SETTINGS);
75 75
 } else {
76 76
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page
77
-    include $SETTINGS['cpassman_dir'] . '/error.php';
77
+    include $SETTINGS['cpassman_dir'].'/error.php';
78 78
     exit();
79 79
 }
80 80
 
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 
90 90
 
91 91
     // Includes
92
-    include_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $_SESSION['user_language'] . '.php';
93
-    include_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
94
-    include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
95
-    include_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
92
+    include_once $SETTINGS['cpassman_dir'].'/includes/language/'.$_SESSION['user_language'].'.php';
93
+    include_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
94
+    include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
95
+    include_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
96 96
 
97 97
     // Connect to mysql server
98
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
98
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
99 99
 
100 100
     DB::$host = DB_HOST;
101 101
     DB::$user = DB_USER;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     DB::$encoding = DB_ENCODING;
106 106
 
107 107
     // User's language loading
108
-    include_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $_SESSION['user_language'] . '.php';
108
+    include_once $SETTINGS['cpassman_dir'].'/includes/language/'.$_SESSION['user_language'].'.php';
109 109
 
110 110
     // Prepare post variables
111 111
     $post_key = filter_input(INPUT_POST, 'key', FILTER_SANITIZE_STRING);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             $pwdlib = new PasswordLib\PasswordLib();
234 234
             // generate key
235 235
             $key = $pwdlib->getRandomToken(filter_input(INPUT_POST, 'size', FILTER_SANITIZE_NUMBER_INT));
236
-            echo '[{"key" : "' . htmlentities($key, ENT_QUOTES) . '"}]';
236
+            echo '[{"key" : "'.htmlentities($key, ENT_QUOTES).'"}]';
237 237
             break;
238 238
 
239 239
         /*
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                 )
263 263
             );
264 264
 
265
-            echo '[{"token" : "' . $token . '"}]';
265
+            echo '[{"token" : "'.$token.'"}]';
266 266
             break;
267 267
 
268 268
 
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
     // get number of items
536 536
     DB::queryFirstRow(
537 537
         'SELECT increment_id
538
-        FROM ' . prefixTable('sharekeys_items') .
538
+        FROM ' . prefixTable('sharekeys_items').
539 539
         ' WHERE user_id = %i',
540 540
         $userId
541 541
     );
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
         // check if expected security level is reached
590 590
         $dataUser = DB::queryfirstrow(
591 591
             'SELECT *
592
-            FROM ' . prefixTable('users') . ' WHERE id = %i',
592
+            FROM ' . prefixTable('users').' WHERE id = %i',
593 593
             $post_user_id
594 594
         );
595 595
 
@@ -610,8 +610,8 @@  discard block
 block discarded – undo
610 610
         if (empty($dataUser['fonction_id']) === false) {
611 611
             $data = DB::queryFirstRow(
612 612
                 'SELECT complexity
613
-                FROM ' . prefixTable('roles_title') . '
614
-                WHERE id IN (' . $dataUser['fonction_id'] . ')
613
+                FROM ' . prefixTable('roles_title').'
614
+                WHERE id IN (' . $dataUser['fonction_id'].')
615 615
                 ORDER BY complexity DESC'
616 616
             );
617 617
         } else {
@@ -624,8 +624,8 @@  discard block
 block discarded – undo
624 624
             return prepareExchangedData(
625 625
                 array(
626 626
                     'error' => true,
627
-                    'message' => '<div style="margin:10px 0 10px 15px;">' . langHdl('complexity_level_not_reached') . '.<br>' .
628
-                        langHdl('expected_complexity_level') . ': <b>' . TP_PW_COMPLEXITY[$data['complexity']][1] . '</b></div>',
627
+                    'message' => '<div style="margin:10px 0 10px 15px;">'.langHdl('complexity_level_not_reached').'.<br>'.
628
+                        langHdl('expected_complexity_level').': <b>'.TP_PW_COMPLEXITY[$data['complexity']][1].'</b></div>',
629 629
                 ),
630 630
                 'encode'
631 631
             );
@@ -726,14 +726,14 @@  discard block
 block discarded – undo
726 726
         // Get data about user
727 727
         $data = DB::queryfirstrow(
728 728
             'SELECT id, email, pw
729
-            FROM ' . prefixTable('users') . '
729
+            FROM ' . prefixTable('users').'
730 730
             WHERE login = %s',
731 731
             $post_login
732 732
         );
733 733
     } else {
734 734
         $data = DB::queryfirstrow(
735 735
             'SELECT id, login, email, pw
736
-            FROM ' . prefixTable('users') . '
736
+            FROM ' . prefixTable('users').'
737 737
             WHERE id = %i',
738 738
             $post_id
739 739
         );
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
     $counter = DB::count();
744 744
 
745 745
     // load passwordLib library
746
-    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'] . '/includes/libraries');
746
+    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'].'/includes/libraries');
747 747
     $pwdlib->register();
748 748
     $pwdlib = new PasswordLib\PasswordLib();
749 749
 
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
     }
791 791
     
792 792
     // generate new GA user code
793
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
793
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
794 794
     $tfa = new Authentication\TwoFactorAuth\TwoFactorAuth($SETTINGS['ga_website_name']);
795 795
     $gaSecretKey = $tfa->createSecret();
796 796
     $gaTemporaryCode = GenerateCryptKey(12, false, true, true, false, true, $SETTINGS);
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
                 'email' => $data['email'],
833 833
                 'email_result' => str_replace(
834 834
                     '#email#',
835
-                    '<b>' . obfuscateEmail($data['email']) . '</b>',
835
+                    '<b>'.obfuscateEmail($data['email']).'</b>',
836 836
                     addslashes(langHdl('admin_email_result_ok'))
837 837
                 ),
838 838
             ),
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
             'email' => $data['email'],
849 849
             'email_result' => str_replace(
850 850
                 '#email#',
851
-                '<b>' . obfuscateEmail($data['email']) . '</b>',
851
+                '<b>'.obfuscateEmail($data['email']).'</b>',
852 852
                 addslashes(langHdl('admin_email_result_ok'))
853 853
             ),
854 854
         ),
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
         && (int) $SETTINGS['enable_send_email_on_user_login'] === 1
865 865
     ) {
866 866
         $row = DB::queryFirstRow(
867
-            'SELECT valeur FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s',
867
+            'SELECT valeur FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s',
868 868
             'cron',
869 869
             'sending_emails'
870 870
         );
@@ -872,12 +872,12 @@  discard block
 block discarded – undo
872 872
         if ((int) (time() - $row['valeur']) >= 300 || (int) $row['valeur'] === 0) {
873 873
             $rows = DB::query(
874 874
                 'SELECT *
875
-                FROM ' . prefixTable('emails') .
875
+                FROM ' . prefixTable('emails').
876 876
                 ' WHERE status != %s',
877 877
                 'sent'
878 878
             );
879 879
             foreach ($rows as $record) {
880
-                echo $record['increment_id'] . " >> ";
880
+                echo $record['increment_id']." >> ";
881 881
                 // Send email
882 882
                 $ret = json_decode(
883 883
                     sendEmail(
@@ -976,8 +976,8 @@  discard block
 block discarded – undo
976 976
     $arr_html = array();
977 977
     $rows = DB::query(
978 978
         'SELECT i.id AS id, i.label AS label, i.id_tree AS id_tree, l.date, i.perso AS perso, i.restricted_to AS restricted
979
-        FROM ' . prefixTable('log_items') . ' AS l
980
-        RIGHT JOIN ' . prefixTable('items') . ' AS i ON (l.id_item = i.id)
979
+        FROM ' . prefixTable('log_items').' AS l
980
+        RIGHT JOIN ' . prefixTable('items').' AS i ON (l.id_item = i.id)
981 981
         WHERE l.action = %s AND l.id_user = %i
982 982
         ORDER BY l.date DESC
983 983
         LIMIT 0, 100',
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
         isset($SETTINGS['enable_suggestion']) === true && (int) $SETTINGS['enable_suggestion'] === 1
1011 1011
         && ((int) $_SESSION['user_admin'] === 1 || (int) $_SESSION['user_manager'] === 1)
1012 1012
     ) {
1013
-        DB::query('SELECT * FROM ' . prefixTable('suggestion'));
1013
+        DB::query('SELECT * FROM '.prefixTable('suggestion'));
1014 1014
         $nb_suggestions_waiting = DB::count();
1015 1015
     }
1016 1016
 
@@ -1046,13 +1046,13 @@  discard block
 block discarded – undo
1046 1046
             if ($data === 'stat_languages') {
1047 1047
                 $tmp = '';
1048 1048
                 foreach ($stats_data[$data] as $key => $value) {
1049
-                    $tmp .= $tmp === '' ? $key . '-' . $value : ',' . $key . '-' . $value;
1049
+                    $tmp .= $tmp === '' ? $key.'-'.$value : ','.$key.'-'.$value;
1050 1050
                 }
1051 1051
                 $statsToSend[$data] = $tmp;
1052 1052
             } elseif ($data === 'stat_country') {
1053 1053
                 $tmp = '';
1054 1054
                 foreach ($stats_data[$data] as $key => $value) {
1055
-                    $tmp .= $tmp === '' ? $key . '-' . $value : ',' . $key . '-' . $value;
1055
+                    $tmp .= $tmp === '' ? $key.'-'.$value : ','.$key.'-'.$value;
1056 1056
                 }
1057 1057
                 $statsToSend[$data] = $tmp;
1058 1058
             } else {
@@ -1126,8 +1126,8 @@  discard block
 block discarded – undo
1126 1126
             if (strpos($line, 'cpassman_url') > 0 && empty($url_found) === true) {
1127 1127
                 $url_found = substr($line, 19, strlen($line) - 22);
1128 1128
                 $tmp = parse_url($url_found);
1129
-                $anonym_url = $tmp['scheme'] . '://<anonym_url>' . $tmp['path'];
1130
-                $line = "'cpassman_url' => '" . $anonym_url . "\n";
1129
+                $anonym_url = $tmp['scheme'].'://<anonym_url>'.$tmp['path'];
1130
+                $line = "'cpassman_url' => '".$anonym_url."\n";
1131 1131
             }
1132 1132
 
1133 1133
             // Anonymize all urls
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
     $teampass_errors = '';
1155 1155
     $rows = DB::query(
1156 1156
         'SELECT label, date AS error_date
1157
-        FROM ' . prefixTable('log_system') . "
1157
+        FROM ' . prefixTable('log_system')."
1158 1158
         WHERE `type` LIKE 'error'
1159 1159
         ORDER BY `date` DESC
1160 1160
         LIMIT 0, 10"
@@ -1162,9 +1162,9 @@  discard block
 block discarded – undo
1162 1162
     if (DB::count() > 0) {
1163 1163
         foreach ($rows as $record) {
1164 1164
             if (empty($teampass_errors) === true) {
1165
-                $teampass_errors = ' * ' . date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['error_date']) . ' - ' . $record['label'];
1165
+                $teampass_errors = ' * '.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['error_date']).' - '.$record['label'];
1166 1166
             } else {
1167
-                $teampass_errors .= ' * ' . date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['error_date']) . ' - ' . $record['label'];
1167
+                $teampass_errors .= ' * '.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['error_date']).' - '.$record['label'];
1168 1168
             }
1169 1169
         }
1170 1170
     }
@@ -1173,7 +1173,7 @@  discard block
 block discarded – undo
1173 1173
 
1174 1174
     // Now prepare text
1175 1175
     $txt = '### Page on which it happened
1176
-' . $post_data['current_page'] . '
1176
+' . $post_data['current_page'].'
1177 1177
 
1178 1178
 ### Steps to reproduce
1179 1179
 1.
@@ -1188,39 +1188,39 @@  discard block
 block discarded – undo
1188 1188
 Tell us what happens instead
1189 1189
 
1190 1190
 ### Server configuration
1191
-**Operating system**: ' . php_uname() . '
1191
+**Operating system**: ' . php_uname().'
1192 1192
 
1193
-**Web server:** ' . $_SERVER['SERVER_SOFTWARE'] . '
1193
+**Web server:** ' . $_SERVER['SERVER_SOFTWARE'].'
1194 1194
 
1195
-**Database:** ' . ($link === false ? langHdl('undefined') : mysqli_get_server_info($link)) . '
1195
+**Database:** ' . ($link === false ? langHdl('undefined') : mysqli_get_server_info($link)).'
1196 1196
 
1197
-**PHP version:** ' . PHP_VERSION . '
1197
+**PHP version:** ' . PHP_VERSION.'
1198 1198
 
1199
-**Teampass version:** ' . TP_VERSION_FULL . '
1199
+**Teampass version:** ' . TP_VERSION_FULL.'
1200 1200
 
1201 1201
 **Teampass configuration file:**
1202 1202
 ```
1203
-' . $list_of_options . '
1203
+' . $list_of_options.'
1204 1204
 ```
1205 1205
 
1206 1206
 **Updated from an older Teampass or fresh install:**
1207 1207
 
1208 1208
 ### Client configuration
1209 1209
 
1210
-**Browser:** ' . $post_data['browser_name'] . ' - ' . $post_data['browser_version'] . '
1210
+**Browser:** ' . $post_data['browser_name'].' - '.$post_data['browser_version'].'
1211 1211
 
1212
-**Operating system:** ' . $post_data['os'] . ' - ' . $post_data['os_archi'] . 'bits
1212
+**Operating system:** ' . $post_data['os'].' - '.$post_data['os_archi'].'bits
1213 1213
 
1214 1214
 ### Logs
1215 1215
 
1216 1216
 #### Web server error log
1217 1217
 ```
1218
-' . $err['message'] . ' - ' . $err['file'] . ' (' . $err['line'] . ')
1218
+' . $err['message'].' - '.$err['file'].' ('.$err['line'].')
1219 1219
 ```
1220 1220
 
1221 1221
 #### Teampass 10 last system errors
1222 1222
 ```
1223
-' . $teampass_errors . '
1223
+' . $teampass_errors.'
1224 1224
 ```
1225 1225
 
1226 1226
 #### Log from the web-browser developer console (CTRL + SHIFT + i)
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
         // Check if user exists
1249 1249
         $userInfo = DB::queryFirstRow(
1250 1250
             'SELECT public_key, private_key, pw, auth_type
1251
-            FROM ' . prefixTable('users') . '
1251
+            FROM ' . prefixTable('users').'
1252 1252
             WHERE id = %i',
1253 1253
             $post_user_id
1254 1254
         );
@@ -1256,7 +1256,7 @@  discard block
 block discarded – undo
1256 1256
             // Get one item
1257 1257
             $record = DB::queryFirstRow(
1258 1258
                 'SELECT object_id
1259
-                FROM ' . prefixTable('sharekeys_items') . '
1259
+                FROM ' . prefixTable('sharekeys_items').'
1260 1260
                 WHERE user_id = %i',
1261 1261
                 $post_user_id
1262 1262
             );
@@ -1264,7 +1264,7 @@  discard block
 block discarded – undo
1264 1264
             // Get itemKey from current user
1265 1265
             $currentUserKey = DB::queryFirstRow(
1266 1266
                 'SELECT share_key, increment_id
1267
-                FROM ' . prefixTable('sharekeys_items') . '
1267
+                FROM ' . prefixTable('sharekeys_items').'
1268 1268
                 WHERE object_id = %i AND user_id = %i',
1269 1269
                 $record['object_id'],
1270 1270
                 $post_user_id
@@ -1291,7 +1291,7 @@  discard block
 block discarded – undo
1291 1291
             
1292 1292
             // Use the password check
1293 1293
             // load passwordLib library
1294
-            $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'] . '/includes/libraries');
1294
+            $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'].'/includes/libraries');
1295 1295
             $pwdlib->register();
1296 1296
             $pwdlib = new PasswordLib\PasswordLib();
1297 1297
             
@@ -1335,7 +1335,7 @@  discard block
 block discarded – undo
1335 1335
         // Get user info
1336 1336
         $userData = DB::queryFirstRow(
1337 1337
             'SELECT private_key
1338
-            FROM ' . prefixTable('users') . '
1338
+            FROM ' . prefixTable('users').'
1339 1339
             WHERE id = %i',
1340 1340
             $post_user_id
1341 1341
         );
@@ -1362,7 +1362,7 @@  discard block
 block discarded – undo
1362 1362
             );
1363 1363
 
1364 1364
             // Load superGlobals
1365
-            include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1365
+            include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1366 1366
             $superGlobal = new protect\SuperGlobal\SuperGlobal();
1367 1367
 
1368 1368
             $superGlobal->put('private_key', $privateKey, 'SESSION', 'user');
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
         // Get user info
1401 1401
         $userData = DB::queryFirstRow(
1402 1402
             'SELECT email, auth_type, login
1403
-            FROM ' . prefixTable('users') . '
1403
+            FROM ' . prefixTable('users').'
1404 1404
             WHERE id = %i',
1405 1405
             $post_user_id
1406 1406
         );
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
         // Get user info
1536 1536
         $userData = DB::queryFirstRow(
1537 1537
             'SELECT email, auth_type, login
1538
-            FROM ' . prefixTable('users') . '
1538
+            FROM ' . prefixTable('users').'
1539 1539
             WHERE id = %i',
1540 1540
             $post_user_id
1541 1541
         );
@@ -1598,13 +1598,13 @@  discard block
 block discarded – undo
1598 1598
         // Check if user exists
1599 1599
         DB::queryFirstRow(
1600 1600
             'SELECT *
1601
-            FROM ' . prefixTable('users') . '
1601
+            FROM ' . prefixTable('users').'
1602 1602
             WHERE id = %i',
1603 1603
             $post_user_id
1604 1604
         );
1605 1605
         if (DB::count() > 0) {
1606 1606
             // Include libraries
1607
-            include_once $SETTINGS['cpassman_dir'] . '/sources/aes.functions.php';
1607
+            include_once $SETTINGS['cpassman_dir'].'/sources/aes.functions.php';
1608 1608
 
1609 1609
             // CLear old sharekeys
1610 1610
             if ($post_self_change === false) {
@@ -1656,13 +1656,13 @@  discard block
 block discarded – undo
1656 1656
         // Check if user exists
1657 1657
         $userInfo = DB::queryFirstRow(
1658 1658
             'SELECT public_key
1659
-            FROM ' . prefixTable('users') . '
1659
+            FROM ' . prefixTable('users').'
1660 1660
             WHERE id = %i',
1661 1661
             $post_user_id
1662 1662
         );
1663 1663
         if (DB::count() > 0) {
1664 1664
             // Include libraries
1665
-            include_once $SETTINGS['cpassman_dir'] . '/sources/aes.functions.php';
1665
+            include_once $SETTINGS['cpassman_dir'].'/sources/aes.functions.php';
1666 1666
 
1667 1667
             // WHAT STEP TO PERFORM?
1668 1668
             if ($post_action === 'step0') {
@@ -1822,15 +1822,15 @@  discard block
 block discarded – undo
1822 1822
     // Loop on items
1823 1823
     $rows = DB::query(
1824 1824
         'SELECT id, pw
1825
-        FROM ' . prefixTable('items') . '
1825
+        FROM ' . prefixTable('items').'
1826 1826
         WHERE perso = 0
1827
-        LIMIT ' . $post_start . ', ' . $post_length
1827
+        LIMIT ' . $post_start.', '.$post_length
1828 1828
     );
1829 1829
     foreach ($rows as $record) {
1830 1830
         // Get itemKey from current user
1831 1831
         $currentUserKey = DB::queryFirstRow(
1832 1832
             'SELECT share_key, increment_id
1833
-            FROM ' . prefixTable('sharekeys_items') . '
1833
+            FROM ' . prefixTable('sharekeys_items').'
1834 1834
             WHERE object_id = %i AND user_id = %i',
1835 1835
             $record['id'],
1836 1836
             $_SESSION['user_id']
@@ -1858,7 +1858,7 @@  discard block
 block discarded – undo
1858 1858
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
1859 1859
                 $currentUserKey = DB::queryFirstRow(
1860 1860
                     'SELECT increment_id
1861
-                    FROM ' . prefixTable('sharekeys_items') . '
1861
+                    FROM ' . prefixTable('sharekeys_items').'
1862 1862
                     WHERE object_id = %i AND user_id = %i',
1863 1863
                     $record['id'],
1864 1864
                     $post_user_id
@@ -1891,7 +1891,7 @@  discard block
 block discarded – undo
1891 1891
     // SHould we change step?
1892 1892
     DB::query(
1893 1893
         'SELECT *
1894
-        FROM ' . prefixTable('items') . '
1894
+        FROM ' . prefixTable('items').'
1895 1895
         WHERE perso = 0'
1896 1896
     );
1897 1897
 
@@ -1915,15 +1915,15 @@  discard block
 block discarded – undo
1915 1915
     // Loop on logs
1916 1916
     $rows = DB::query(
1917 1917
         'SELECT increment_id
1918
-        FROM ' . prefixTable('log_items') . '
1918
+        FROM ' . prefixTable('log_items').'
1919 1919
         WHERE raison LIKE "at_pw :%" AND encryption_type = "teampass_aes"
1920
-        LIMIT ' . $post_start . ', ' . $post_length
1920
+        LIMIT ' . $post_start.', '.$post_length
1921 1921
     );
1922 1922
     foreach ($rows as $record) {
1923 1923
         // Get itemKey from current user
1924 1924
         $currentUserKey = DB::queryFirstRow(
1925 1925
             'SELECT share_key
1926
-            FROM ' . prefixTable('sharekeys_logs') . '
1926
+            FROM ' . prefixTable('sharekeys_logs').'
1927 1927
             WHERE object_id = %i AND user_id = %i',
1928 1928
             $record['increment_id'],
1929 1929
             $_SESSION['user_id']
@@ -1950,7 +1950,7 @@  discard block
 block discarded – undo
1950 1950
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
1951 1951
                 $currentUserKey = DB::queryFirstRow(
1952 1952
                     'SELECT increment_id
1953
-                    FROM ' . prefixTable('sharekeys_items') . '
1953
+                    FROM ' . prefixTable('sharekeys_items').'
1954 1954
                     WHERE object_id = %i AND user_id = %i',
1955 1955
                     $record['id'],
1956 1956
                     $post_user_id
@@ -1972,7 +1972,7 @@  discard block
 block discarded – undo
1972 1972
     // SHould we change step?
1973 1973
     DB::query(
1974 1974
         'SELECT increment_id
1975
-        FROM ' . prefixTable('log_items') . '
1975
+        FROM ' . prefixTable('log_items').'
1976 1976
         WHERE raison LIKE "at_pw :%" AND encryption_type = "teampass_aes"'
1977 1977
     );
1978 1978
 
@@ -1996,15 +1996,15 @@  discard block
 block discarded – undo
1996 1996
     // Loop on fields
1997 1997
     $rows = DB::query(
1998 1998
         'SELECT id
1999
-        FROM ' . prefixTable('categories_items') . '
1999
+        FROM ' . prefixTable('categories_items').'
2000 2000
         WHERE encryption_type = "teampass_aes"
2001
-        LIMIT ' . $post_start . ', ' . $post_length
2001
+        LIMIT ' . $post_start.', '.$post_length
2002 2002
     );
2003 2003
     foreach ($rows as $record) {
2004 2004
         // Get itemKey from current user
2005 2005
         $currentUserKey = DB::queryFirstRow(
2006 2006
             'SELECT share_key
2007
-            FROM ' . prefixTable('sharekeys_fields') . '
2007
+            FROM ' . prefixTable('sharekeys_fields').'
2008 2008
             WHERE object_id = %i AND user_id = %i',
2009 2009
             $record['id'],
2010 2010
             $_SESSION['user_id']
@@ -2031,7 +2031,7 @@  discard block
 block discarded – undo
2031 2031
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2032 2032
                 $currentUserKey = DB::queryFirstRow(
2033 2033
                     'SELECT increment_id
2034
-                    FROM ' . prefixTable('sharekeys_items') . '
2034
+                    FROM ' . prefixTable('sharekeys_items').'
2035 2035
                     WHERE object_id = %i AND user_id = %i',
2036 2036
                     $record['id'],
2037 2037
                     $post_user_id
@@ -2053,7 +2053,7 @@  discard block
 block discarded – undo
2053 2053
     // SHould we change step?
2054 2054
     DB::query(
2055 2055
         'SELECT *
2056
-        FROM ' . prefixTable('categories_items') . '
2056
+        FROM ' . prefixTable('categories_items').'
2057 2057
         WHERE encryption_type = "teampass_aes"'
2058 2058
     );
2059 2059
 
@@ -2077,14 +2077,14 @@  discard block
 block discarded – undo
2077 2077
     // Loop on suggestions
2078 2078
     $rows = DB::query(
2079 2079
         'SELECT id
2080
-        FROM ' . prefixTable('suggestion') . '
2081
-        LIMIT ' . $post_start . ', ' . $post_length
2080
+        FROM ' . prefixTable('suggestion').'
2081
+        LIMIT ' . $post_start.', '.$post_length
2082 2082
     );
2083 2083
     foreach ($rows as $record) {
2084 2084
         // Get itemKey from current user
2085 2085
         $currentUserKey = DB::queryFirstRow(
2086 2086
             'SELECT share_key
2087
-            FROM ' . prefixTable('sharekeys_suggestions') . '
2087
+            FROM ' . prefixTable('sharekeys_suggestions').'
2088 2088
             WHERE object_id = %i AND user_id = %i',
2089 2089
             $record['id'],
2090 2090
             $_SESSION['user_id']
@@ -2111,7 +2111,7 @@  discard block
 block discarded – undo
2111 2111
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2112 2112
                 $currentUserKey = DB::queryFirstRow(
2113 2113
                     'SELECT increment_id
2114
-                    FROM ' . prefixTable('sharekeys_items') . '
2114
+                    FROM ' . prefixTable('sharekeys_items').'
2115 2115
                     WHERE object_id = %i AND user_id = %i',
2116 2116
                     $record['id'],
2117 2117
                     $post_user_id
@@ -2156,15 +2156,15 @@  discard block
 block discarded – undo
2156 2156
     // Loop on files
2157 2157
     $rows = DB::query(
2158 2158
         'SELECT id
2159
-        FROM ' . prefixTable('files') . '
2160
-        WHERE status = "' . TP_ENCRYPTION_NAME . '"
2161
-        LIMIT ' . $post_start . ', ' . $post_length
2159
+        FROM ' . prefixTable('files').'
2160
+        WHERE status = "' . TP_ENCRYPTION_NAME.'"
2161
+        LIMIT ' . $post_start.', '.$post_length
2162 2162
     ); //aes_encryption
2163 2163
     foreach ($rows as $record) {
2164 2164
         // Get itemKey from current user
2165 2165
         $currentUserKey = DB::queryFirstRow(
2166 2166
             'SELECT share_key
2167
-            FROM ' . prefixTable('sharekeys_files') . '
2167
+            FROM ' . prefixTable('sharekeys_files').'
2168 2168
             WHERE object_id = %i AND user_id = %i',
2169 2169
             $record['id'],
2170 2170
             $_SESSION['user_id']
@@ -2191,7 +2191,7 @@  discard block
 block discarded – undo
2191 2191
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2192 2192
                 $currentUserKey = DB::queryFirstRow(
2193 2193
                     'SELECT increment_id
2194
-                    FROM ' . prefixTable('sharekeys_items') . '
2194
+                    FROM ' . prefixTable('sharekeys_items').'
2195 2195
                     WHERE object_id = %i AND user_id = %i',
2196 2196
                     $record['id'],
2197 2197
                     $post_user_id
@@ -2213,8 +2213,8 @@  discard block
 block discarded – undo
2213 2213
     // SHould we change step?
2214 2214
     DB::query(
2215 2215
         'SELECT *
2216
-        FROM ' . prefixTable('files') . '
2217
-        WHERE status = "' . TP_ENCRYPTION_NAME . '"'
2216
+        FROM ' . prefixTable('files').'
2217
+        WHERE status = "' . TP_ENCRYPTION_NAME.'"'
2218 2218
     );
2219 2219
 
2220 2220
     $next_start = (int) $post_start + (int) $post_length;
@@ -2246,16 +2246,16 @@  discard block
 block discarded – undo
2246 2246
     if (count($_SESSION['personal_folders']) > 0) {
2247 2247
         $rows = DB::query(
2248 2248
             'SELECT id, pw
2249
-            FROM ' . prefixTable('items') . '
2249
+            FROM ' . prefixTable('items').'
2250 2250
             WHERE perso = 1 AND id_tree IN %ls
2251
-            LIMIT ' . $post_start . ', ' . $post_length,
2251
+            LIMIT ' . $post_start.', '.$post_length,
2252 2252
             $_SESSION['personal_folders']
2253 2253
         );
2254 2254
         foreach ($rows as $record) {
2255 2255
             // Get itemKey from current user
2256 2256
             $currentUserKey = DB::queryFirstRow(
2257 2257
                 'SELECT share_key, increment_id
2258
-                FROM ' . prefixTable('sharekeys_items') . '
2258
+                FROM ' . prefixTable('sharekeys_items').'
2259 2259
                 WHERE object_id = %i AND user_id = %i',
2260 2260
                 $record['id'],
2261 2261
                 $_SESSION['user_id']
@@ -2282,7 +2282,7 @@  discard block
 block discarded – undo
2282 2282
                 if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2283 2283
                     $currentUserKey = DB::queryFirstRow(
2284 2284
                         'SELECT increment_id
2285
-                        FROM ' . prefixTable('sharekeys_items') . '
2285
+                        FROM ' . prefixTable('sharekeys_items').'
2286 2286
                         WHERE object_id = %i AND user_id = %i',
2287 2287
                         $record['id'],
2288 2288
                         $post_user_id
@@ -2305,7 +2305,7 @@  discard block
 block discarded – undo
2305 2305
     // SHould we change step?
2306 2306
     DB::query(
2307 2307
         'SELECT *
2308
-        FROM ' . prefixTable('items') . '
2308
+        FROM ' . prefixTable('items').'
2309 2309
         WHERE perso = 0'
2310 2310
     );
2311 2311
 
@@ -2329,7 +2329,7 @@  discard block
 block discarded – undo
2329 2329
         // Check if user exists
2330 2330
         $userInfo = DB::queryFirstRow(
2331 2331
             'SELECT public_key, encrypted_psk
2332
-            FROM ' . prefixTable('users') . '
2332
+            FROM ' . prefixTable('users').'
2333 2333
             WHERE id = %i',
2334 2334
             $post_user_id
2335 2335
         );
@@ -2354,9 +2354,9 @@  discard block
 block discarded – undo
2354 2354
                 // Loop on persoanl items
2355 2355
                 $rows = DB::query(
2356 2356
                     'SELECT id, pw
2357
-                    FROM ' . prefixTable('items') . '
2357
+                    FROM ' . prefixTable('items').'
2358 2358
                     WHERE perso = 1 AND id_tree IN %ls
2359
-                    LIMIT ' . $post_start . ', ' . $post_length,
2359
+                    LIMIT ' . $post_start.', '.$post_length,
2360 2360
                     $_SESSION['personal_folders']
2361 2361
                 );
2362 2362
                 $countUserPersonalItems = DB::count();
@@ -2399,7 +2399,7 @@  discard block
 block discarded – undo
2399 2399
                         // Loop on files
2400 2400
                         $rows = DB::query(
2401 2401
                             'SELECT id, file
2402
-                            FROM ' . prefixTable('files') . '
2402
+                            FROM ' . prefixTable('files').'
2403 2403
                             WHERE status != %s
2404 2404
                             AND id_item = %i',
2405 2405
                             TP_ENCRYPTION_NAME,
@@ -2410,14 +2410,14 @@  discard block
 block discarded – undo
2410 2410
                             // Now decrypt the file
2411 2411
                             prepareFileWithDefuse(
2412 2412
                                 'decrypt',
2413
-                                $SETTINGS['path_to_upload_folder'] . '/' . $record2['file'],
2414
-                                $SETTINGS['path_to_upload_folder'] . '/' . $record2['file'] . '.delete',
2413
+                                $SETTINGS['path_to_upload_folder'].'/'.$record2['file'],
2414
+                                $SETTINGS['path_to_upload_folder'].'/'.$record2['file'].'.delete',
2415 2415
                                 $SETTINGS,
2416 2416
                                 $post_user_psk
2417 2417
                             );
2418 2418
 
2419 2419
                             // Encrypt the file
2420
-                            $encryptedFile = encryptFile($record2['file'] . '.delete', $SETTINGS['path_to_upload_folder']);
2420
+                            $encryptedFile = encryptFile($record2['file'].'.delete', $SETTINGS['path_to_upload_folder']);
2421 2421
 
2422 2422
                             DB::update(
2423 2423
                                 prefixTable('files'),
@@ -2440,7 +2440,7 @@  discard block
 block discarded – undo
2440 2440
                             );
2441 2441
 
2442 2442
                             // Unlink original file
2443
-                            unlink($SETTINGS['path_to_upload_folder'] . '/' . $record2['file']);
2443
+                            unlink($SETTINGS['path_to_upload_folder'].'/'.$record2['file']);
2444 2444
                         }
2445 2445
                     }
2446 2446
                 }
@@ -2509,7 +2509,7 @@  discard block
 block discarded – undo
2509 2509
         // Get user info
2510 2510
         $userData = DB::queryFirstRow(
2511 2511
             'SELECT '.$post_fields.'
2512
-            FROM ' . prefixTable('users') . '
2512
+            FROM ' . prefixTable('users').'
2513 2513
             WHERE id = %i',
2514 2514
             $post_user_id
2515 2515
         );
@@ -2544,7 +2544,7 @@  discard block
 block discarded – undo
2544 2544
         // Get user info
2545 2545
         $userData = DB::queryFirstRow(
2546 2546
             'SELECT auth_type, login, private_key
2547
-            FROM ' . prefixTable('users') . '
2547
+            FROM ' . prefixTable('users').'
2548 2548
             WHERE id = %i',
2549 2549
             $post_user_id
2550 2550
         );
@@ -2555,7 +2555,7 @@  discard block
 block discarded – undo
2555 2555
             $privateKey = decryptPrivateKey($post_current_pwd, $userData['private_key']);
2556 2556
 
2557 2557
             // Load superGlobals
2558
-            include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2558
+            include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2559 2559
             $superGlobal = new protect\SuperGlobal\SuperGlobal();
2560 2560
 
2561 2561
             if ($superGlobal->get('private_key', 'SESSION', 'user') === $privateKey) {
@@ -2588,7 +2588,7 @@  discard block
 block discarded – undo
2588 2588
                 return prepareExchangedData(
2589 2589
                     array(
2590 2590
                         'error' => false,
2591
-                        'message' => langHdl('done'),'',
2591
+                        'message' => langHdl('done'), '',
2592 2592
                     ),
2593 2593
                     'encode'
2594 2594
                 );
@@ -2626,7 +2626,7 @@  discard block
 block discarded – undo
2626 2626
         // Get user info
2627 2627
         $userData = DB::queryFirstRow(
2628 2628
             'SELECT auth_type, login, private_key, special
2629
-            FROM ' . prefixTable('users') . '
2629
+            FROM ' . prefixTable('users').'
2630 2630
             WHERE id = %i',
2631 2631
             $post_user_id
2632 2632
         );
@@ -2656,14 +2656,14 @@  discard block
 block discarded – undo
2656 2656
                 );
2657 2657
 
2658 2658
                 // Load superGlobals
2659
-                include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2659
+                include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2660 2660
                 $superGlobal = new protect\SuperGlobal\SuperGlobal();
2661 2661
                 $superGlobal->put('private_key', $privateKey, 'SESSION', 'user');
2662 2662
 
2663 2663
                 return prepareExchangedData(
2664 2664
                     array(
2665 2665
                         'error' => false,
2666
-                        'message' => langHdl('done'),'',
2666
+                        'message' => langHdl('done'), '',
2667 2667
                     ),
2668 2668
                     'encode'
2669 2669
                 );
@@ -2687,14 +2687,14 @@  discard block
 block discarded – undo
2687 2687
             // Get one item
2688 2688
             $record = DB::queryFirstRow(
2689 2689
                 'SELECT id, pw
2690
-                FROM ' . prefixTable('items') . '
2690
+                FROM ' . prefixTable('items').'
2691 2691
                 WHERE perso = 0'
2692 2692
             );
2693 2693
 
2694 2694
             // Get itemKey from current user
2695 2695
             $currentUserKey = DB::queryFirstRow(
2696 2696
                 'SELECT share_key, increment_id
2697
-                FROM ' . prefixTable('sharekeys_items') . '
2697
+                FROM ' . prefixTable('sharekeys_items').'
2698 2698
                 WHERE object_id = %i AND user_id = %i',
2699 2699
                 $record['id'],
2700 2700
                 $post_user_id
@@ -2722,7 +2722,7 @@  discard block
 block discarded – undo
2722 2722
                     );
2723 2723
                     
2724 2724
                     // Load superGlobals
2725
-                    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2725
+                    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2726 2726
                     $superGlobal = new protect\SuperGlobal\SuperGlobal();
2727 2727
                     $superGlobal->put('private_key', $privateKey, 'SESSION', 'user');
2728 2728
 
@@ -2776,7 +2776,7 @@  discard block
 block discarded – undo
2776 2776
             $_SESSION['user_id']
2777 2777
         );
2778 2778
         // Return data
2779
-        return '[{"new_value":"' . $_SESSION['sessionDuration'] . '"}]';
2779
+        return '[{"new_value":"'.$_SESSION['sessionDuration'].'"}]';
2780 2780
     }
2781 2781
     
2782 2782
     return '[{"new_value":"expired"}]';
Please login to merge, or discard this patch.
includes/core/load.js.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                                     console.log('User has to regenerate keys')
118 118
                                     // HIde
119 119
                                     $('.content-header, .content').addClass('hidden');
120
-                                    $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected');?>');
120
+                                    $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected'); ?>');
121 121
 
122 122
                                     // Show passwords inputs and form
123 123
                                     $('#dialog-user-temporary-code').removeClass('hidden');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
                                     // Show passwords inputs and form
133 133
                                     $('#dialog-user-change-password-info')
134
-                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('user_has_to_change_password_info');?>')
134
+                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('user_has_to_change_password_info'); ?>')
135 135
                                         .removeClass('hidden');
136 136
                                     $('#dialog-user-change-password').removeClass('hidden');
137 137
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
                                     // Show passwords inputs and form
146 146
                                     $('#dialog-ldap-user-change-password-info')
147
-                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('ldap_user_has_changed_his_password');?>')
147
+                                        .html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('ldap_user_has_changed_his_password'); ?>')
148 148
                                         .removeClass('hidden');
149 149
                                     $('#dialog-ldap-user-change-password').removeClass('hidden');
150 150
                                     
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         console.log('User has to regenerate keys')
219 219
         // HIde
220 220
         $('.content-header, .content').addClass('hidden');
221
-        $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected');?>');
221
+        $('#dialog-user-temporary-code-info').html('<i class="icon fas fa-info mr-2"></i><?php echo langHdl('renecyption_expected'); ?>');
222 222
 
223 223
         // Show passwords inputs and form
224 224
         $('#dialog-user-temporary-code').removeClass('hidden');
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             {
297 297
                 if (step === 'psk') {
298 298
                     // Inform user
299
-                    $("#user-current-defuse-psk-progress").html('<b><?php echo langHdl('encryption_keys'); ?> </b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH;?>) + '] ' +
299
+                    $("#user-current-defuse-psk-progress").html('<b><?php echo langHdl('encryption_keys'); ?> </b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH; ?>) + '] ' +
300 300
                         '... <?php echo langHdl('please_wait'); ?><i class="fas fa-spinner fa-pulse ml-3 text-primary"></i>');
301 301
 
302 302
                     var data = {'userPsk' : $('#user-current-defuse-psk').val()};
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
                         "sources/main.queries.php", {
306 306
                             type: "user_psk_reencryption",
307 307
                             'start': start,
308
-                            'length': <?php echo NUMBER_ITEMS_IN_BATCH;?>,
308
+                            'length': <?php echo NUMBER_ITEMS_IN_BATCH; ?>,
309 309
                             userId: userId,
310 310
                             data: prepareExchangedData(JSON.stringify(data), "encode", "<?php echo $_SESSION['key']; ?>"),
311 311
                             key: '<?php echo $_SESSION['key']; ?>'
@@ -794,15 +794,15 @@  discard block
 block discarded – undo
794 794
             // Prepare data
795 795
             var data = {
796 796
                 'receipt': $('#temp-user-email').val(),
797
-                'subject': '[Teampass] <?php echo langHdl('your_new_password');?>',
798
-                'body': '<?php echo langHdl('email_body_temporary_login_password');?>',
797
+                'subject': '[Teampass] <?php echo langHdl('your_new_password'); ?>',
798
+                'body': '<?php echo langHdl('email_body_temporary_login_password'); ?>',
799 799
                 'pre_replace' : {
800 800
                     '#enc_code#' : $('#temp-user-pwd').val(),
801 801
                 }
802 802
             }
803 803
             console.log(data);
804 804
             // Prepare form
805
-            $('#dialog-admin-change-user-password-info').html('<?php echo langHdl('sending_email_message');?>');
805
+            $('#dialog-admin-change-user-password-info').html('<?php echo langHdl('sending_email_message'); ?>');
806 806
             toastr.remove();
807 807
             toastr.info(
808 808
                 '<?php echo langHdl('in_progress'); ?><i class="fas fa-circle-notch fa-spin fa-2x ml-3"></i>'
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
             '#warningModal',
1271 1271
             '<i class="fas fa-clock fa-lg warning mr-2"></i><?php echo langHdl('index_add_one_hour'); ?>',
1272 1272
             '<div class="form-group">' +
1273
-            '<label for="warningModal-input" class="col-form-label"><?php echo langHdl('index_session_duration') . ' (' . langHdl('minutes') . ')'; ?>:</label>' +
1273
+            '<label for="warningModal-input" class="col-form-label"><?php echo langHdl('index_session_duration').' ('.langHdl('minutes').')'; ?>:</label>' +
1274 1274
             '<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; ?>">' +
1275 1275
             '</div>',
1276 1276
             '<?php echo langHdl('confirm'); ?>',
@@ -1522,13 +1522,13 @@  discard block
 block discarded – undo
1522 1522
         if (step !== 'finished') {
1523 1523
             // Inform user
1524 1524
             $("#"+divIdDialog+'-progress').html('<b><?php echo langHdl('encryption_keys'); ?> - ' +
1525
-                stepText + '</b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH;?>) + '] ' +
1525
+                stepText + '</b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH; ?>) + '] ' +
1526 1526
                 '... <?php echo langHdl('please_wait'); ?><i class="fas fa-spinner fa-pulse ml-3 text-primary"></i>');
1527 1527
 
1528 1528
             var data = {
1529 1529
                 'action': step,
1530 1530
                 'start': start,
1531
-                'length': <?php echo NUMBER_ITEMS_IN_BATCH;?>,
1531
+                'length': <?php echo NUMBER_ITEMS_IN_BATCH; ?>,
1532 1532
                 'user_id': userId,
1533 1533
             }
1534 1534
             // Do query
Please login to merge, or discard this patch.
pages/search.js.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -2,30 +2,30 @@
 block discarded – undo
2 2
 
3 3
 declare(strict_types=1);
4 4
 
5
- /**
6
-  * Teampass - a collaborative passwords manager.
7
-  * ---
8
-  * This library is distributed in the hope that it will be useful,
9
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
-  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
-  * ---
12
-  *
13
-  * @project   Teampass
14
-  *
15
-  * @file      search.js.php
16
-  * ---
17
-  *
18
-  * @author    Nils Laumaillé ([email protected])
19
-  *
20
-  * @copyright 2009-2022 Teampass.net
21
-  *
22
-  * @license   https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0
23
-  * ---
24
-  *
25
-  * @see       https://www.teampass.net
26
-  */
27
-
28
- $var = [];
5
+    /**
6
+     * Teampass - a collaborative passwords manager.
7
+     * ---
8
+     * This library is distributed in the hope that it will be useful,
9
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
+     * ---
12
+     *
13
+     * @project   Teampass
14
+     *
15
+     * @file      search.js.php
16
+     * ---
17
+     *
18
+     * @author    Nils Laumaillé ([email protected])
19
+     *
20
+     * @copyright 2009-2022 Teampass.net
21
+     *
22
+     * @license   https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0
23
+     * ---
24
+     *
25
+     * @see       https://www.teampass.net
26
+     */
27
+
28
+    $var = [];
29 29
 $var['hidden_asterisk'] = '<i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk"></i>';
30 30
 
31 31
 ?>
Please login to merge, or discard this patch.