Passed
Push — teampass_3.0 ( d39ab8...880668 )
by Nils
09:01 queued 04:32
created
pages/actions.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'ldap', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49
-    include $SETTINGS['cpassman_dir'] . '/error.php';
49
+    include $SETTINGS['cpassman_dir'].'/error.php';
50 50
     exit;
51 51
 }
52 52
 
53 53
 // Load template
54
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
54
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
55 55
 
56 56
 ?>
57 57
 
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
                                 <?php
91 91
                                 echo langHdl('rebuild_config_file');
92 92
 $data = DB::queryfirstrow(
93
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
93
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
94 94
                                     WHERE label = %s
95 95
                                     ORDER BY id DESC',
96 96
     'admin_action_rebuild_config_file'
97 97
 );
98 98
 if (DB::count() > 0) {
99
-    $tmp = langHdl('last_execution') . ' ' .
100
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
99
+    $tmp = langHdl('last_execution').' '.
100
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
101 101
     $tmp .= $data['field_1'] === 'success' ?
102 102
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
103 103
 } else {
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
                                 </span>
120 120
                                 <?php echo langHdl('admin_action_check_pf');
121 121
 $data = DB::queryfirstrow(
122
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
122
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
123 123
                                     WHERE label = %s
124 124
                                     ORDER BY id DESC',
125 125
     'admin_action_check_pf'
126 126
 );
127 127
 if (DB::count() > 0) {
128
-    $tmp = langHdl('last_execution') . ' ' .
129
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
128
+    $tmp = langHdl('last_execution').' '.
129
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
130 130
     $tmp .= $data['field_1'] === 'success' ?
131 131
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
132 132
 } else {
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
                                 </span>
147 147
                                 <?php echo langHdl('admin_action_db_clean_items');
148 148
 $data = DB::queryfirstrow(
149
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
149
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
150 150
                                     WHERE label = %s
151 151
                                     ORDER BY id DESC',
152 152
     'admin_action_db_clean_items'
153 153
 );
154 154
 if (DB::count() > 0) {
155
-    $tmp = langHdl('last_execution') . ' ' .
156
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
155
+    $tmp = langHdl('last_execution').' '.
156
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
157 157
     $tmp .= $data['field_1'] === 'success' ?
158 158
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
159 159
 } else {
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
                                 </span>
176 176
                                 <?php echo langHdl('admin_action_db_optimize');
177 177
 $data = DB::queryfirstrow(
178
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
178
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
179 179
                                     WHERE label = %s
180 180
                                     ORDER BY id DESC',
181 181
     'admin_action_db_optimize'
182 182
 );
183 183
 if (DB::count() > 0) {
184
-    $tmp = langHdl('last_execution') . ' ' .
185
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
184
+    $tmp = langHdl('last_execution').' '.
185
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
186 186
     $tmp .= $data['field_1'] === 'success' ?
187 187
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
188 188
 } else {
@@ -201,14 +201,14 @@  discard block
 block discarded – undo
201 201
                                 </span>
202 202
                                 <?php echo langHdl('admin_action_purge_old_files');
203 203
 $data = DB::queryfirstrow(
204
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
204
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
205 205
                                     WHERE label = %s
206 206
                                     ORDER BY id DESC',
207 207
     'admin_action_purge_old_files'
208 208
 );
209 209
 if (DB::count() > 0) {
210
-    $tmp = langHdl('last_execution') . ' ' .
211
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
210
+    $tmp = langHdl('last_execution').' '.
211
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
212 212
     $tmp .= $data['field_1'] === 'success' ?
213 213
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
214 214
 } else {
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
                                 </span>
231 231
                                 <?php echo langHdl('admin_action_reload_cache_table');
232 232
 $data = DB::queryfirstrow(
233
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
233
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
234 234
                                     WHERE label = %s
235 235
                                     ORDER BY id DESC',
236 236
     'admin_action_reload_cache_table'
237 237
 );
238 238
 if (DB::count() > 0) {
239
-    $tmp = langHdl('last_execution') . ' ' .
240
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
239
+    $tmp = langHdl('last_execution').' '.
240
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
241 241
     $tmp .= $data['field_1'] === 'success' ?
242 242
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
243 243
 } else {
@@ -260,14 +260,14 @@  discard block
 block discarded – undo
260 260
                                 </span>
261 261
                                 <?php echo langHdl('admin_action_change_salt_key');
262 262
 $data = DB::queryfirstrow(
263
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
263
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
264 264
                                     WHERE label = %s
265 265
                                     ORDER BY id DESC',
266 266
     'admin_action_change_sk'
267 267
 );
268 268
 if (DB::count() > 0) {
269
-    $tmp = langHdl('last_execution') . ' ' .
270
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
269
+    $tmp = langHdl('last_execution').' '.
270
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
271 271
     $tmp .= $data['field_1'] === 'success' ?
272 272
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
273 273
 } else {
@@ -290,14 +290,14 @@  discard block
 block discarded – undo
290 290
                                 </span>
291 291
                                 <?php echo langHdl('admin_action_attachments_cryption');
292 292
 $data = DB::queryfirstrow(
293
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
293
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
294 294
                                     WHERE label = %s
295 295
                                     ORDER BY id DESC',
296 296
     'admin_action_change_file_encryption'
297 297
 );
298 298
 if (DB::count() > 0) {
299
-    $tmp = langHdl('last_execution') . ' ' .
300
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
299
+    $tmp = langHdl('last_execution').' '.
300
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
301 301
     $tmp .= $data['field_1'] === 'success' ?
302 302
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
303 303
 } else {
Please login to merge, or discard this patch.
sources/expired.datatables.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 require_once 'SecureHandler.php';
29 29
 session_name('teampass_session');
30 30
 session_start();
31
-if (! isset($_SESSION['CPM']) || $_SESSION['CPM'] === false || ! isset($_SESSION['key']) || empty($_SESSION['key'])) {
31
+if (!isset($_SESSION['CPM']) || $_SESSION['CPM'] === false || !isset($_SESSION['key']) || empty($_SESSION['key'])) {
32 32
     die('Hacking attempt...');
33 33
 }
34 34
 
@@ -42,22 +42,22 @@  discard block
 block discarded – undo
42 42
 }
43 43
 
44 44
 // Do checks
45
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
45
+require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'folders', $SETTINGS) === false) {
48 48
     // Not allowed page
49 49
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
50
-    include $SETTINGS['cpassman_dir'] . '/error.php';
50
+    include $SETTINGS['cpassman_dir'].'/error.php';
51 51
     exit;
52 52
 }
53 53
 
54
-require_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $_SESSION['user_language'] . '.php';
55
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
54
+require_once $SETTINGS['cpassman_dir'].'/includes/language/'.$_SESSION['user_language'].'.php';
55
+require_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
56 56
 header('Content-type: text/html; charset=utf-8');
57 57
 header('Cache-Control: no-cache, must-revalidate');
58 58
 require_once 'main.functions.php';
59 59
 // Connect to mysql server
60
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
60
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
61 61
 if (defined('DB_PASSWD_CLEAR') === false) {
62 62
     define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
63 63
 }
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 DB::$port = DB_PORT;
69 69
 DB::$encoding = DB_ENCODING;
70 70
 // Class loader
71
-require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
71
+require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
72 72
 //Build tree
73
-$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'] . '/includes/libraries');
73
+$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'].'/includes/libraries');
74 74
 $tree->register();
75 75
 $tree = new Tree\NestedTree\NestedTree(prefixTable('nested_tree'), 'id', 'parent_id', 'title');
76 76
 //Columns name
@@ -81,22 +81,22 @@  discard block
 block discarded – undo
81 81
 $sOrder = $sLimit = '';
82 82
 // Is a date sent?
83 83
 if (isset($_GET['dateCriteria']) === true && empty($_GET['dateCriteria']) === false) {
84
-    $sWhere .= ' AND a.del_value < ' . round(filter_var($_GET['dateCriteria'], FILTER_SANITIZE_NUMBER_INT) / 1000, 0);
84
+    $sWhere .= ' AND a.del_value < '.round(filter_var($_GET['dateCriteria'], FILTER_SANITIZE_NUMBER_INT) / 1000, 0);
85 85
 }
86 86
 //echo $sWhere;
87 87
 /* BUILD QUERY */
88 88
 //Paging
89 89
 $sLimit = '';
90 90
 if (isset($_GET['length']) === true && (int) $_GET['length'] !== -1) {
91
-    $sLimit = ' LIMIT ' . filter_var($_GET['start'], FILTER_SANITIZE_NUMBER_INT) . ', ' . filter_var($_GET['length'], FILTER_SANITIZE_NUMBER_INT) . '';
91
+    $sLimit = ' LIMIT '.filter_var($_GET['start'], FILTER_SANITIZE_NUMBER_INT).', '.filter_var($_GET['length'], FILTER_SANITIZE_NUMBER_INT).'';
92 92
 }
93 93
 
94 94
 //Ordering
95 95
 if (isset($_GET['order'][0]['dir']) && in_array($_GET['order'][0]['dir'], $aSortTypes)) {
96 96
     $sOrder = 'ORDER BY  ';
97 97
     if (preg_match('#^(asc|desc)$#i', $_GET['order'][0]['column'])) {
98
-        $sOrder .= '' . $aColumns[filter_var($_GET['order'][0]['column'], FILTER_SANITIZE_NUMBER_INT)] . ' '
99
-            . filter_var($_GET['order'][0]['column'], FILTER_SANITIZE_STRING) . ', ';
98
+        $sOrder .= ''.$aColumns[filter_var($_GET['order'][0]['column'], FILTER_SANITIZE_NUMBER_INT)].' '
99
+            . filter_var($_GET['order'][0]['column'], FILTER_SANITIZE_STRING).', ';
100 100
     }
101 101
 
102 102
     $sOrder = substr_replace($sOrder, '', -2);
@@ -117,29 +117,29 @@  discard block
 block discarded – undo
117 117
     && $_GET['letter'] !== 'None'
118 118
 ) {
119 119
     $sWhere .= ' AND ';
120
-    $sWhere .= $aColumns[1] . " LIKE '" . filter_var($_GET['letter'], FILTER_SANITIZE_STRING) . "%' OR ";
121
-    $sWhere .= $aColumns[2] . " LIKE '" . filter_var($_GET['letter'], FILTER_SANITIZE_STRING) . "%' OR ";
122
-    $sWhere .= $aColumns[3] . " LIKE '" . filter_var($_GET['letter'], FILTER_SANITIZE_STRING) . "%' ";
120
+    $sWhere .= $aColumns[1]." LIKE '".filter_var($_GET['letter'], FILTER_SANITIZE_STRING)."%' OR ";
121
+    $sWhere .= $aColumns[2]." LIKE '".filter_var($_GET['letter'], FILTER_SANITIZE_STRING)."%' OR ";
122
+    $sWhere .= $aColumns[3]." LIKE '".filter_var($_GET['letter'], FILTER_SANITIZE_STRING)."%' ";
123 123
 } elseif (isset($_GET['search']['value']) === true && $_GET['search']['value'] !== '') {
124 124
     $sWhere = ' AND ';
125
-    $sWhere .= $aColumns[1] . " LIKE '" . filter_var($_GET['search']['value'], FILTER_SANITIZE_STRING) . "%' OR ";
126
-    $sWhere .= $aColumns[2] . " LIKE '" . filter_var($_GET['search']['value'], FILTER_SANITIZE_STRING) . "%' OR ";
127
-    $sWhere .= $aColumns[3] . " LIKE '" . filter_var($_GET['search']['value'], FILTER_SANITIZE_STRING) . "%' ";
125
+    $sWhere .= $aColumns[1]." LIKE '".filter_var($_GET['search']['value'], FILTER_SANITIZE_STRING)."%' OR ";
126
+    $sWhere .= $aColumns[2]." LIKE '".filter_var($_GET['search']['value'], FILTER_SANITIZE_STRING)."%' OR ";
127
+    $sWhere .= $aColumns[3]." LIKE '".filter_var($_GET['search']['value'], FILTER_SANITIZE_STRING)."%' ";
128 128
 }
129 129
 
130 130
 $rows = DB::query(
131 131
     'SELECT a.item_id, i.label, a.del_value, i.id_tree
132
-    FROM ' . prefixTable('automatic_del') . ' AS a
133
-    INNER JOIN ' . prefixTable('items') . ' AS i ON (i.id = a.item_id)' .
132
+    FROM ' . prefixTable('automatic_del').' AS a
133
+    INNER JOIN ' . prefixTable('items').' AS i ON (i.id = a.item_id)'.
134 134
     $sWhere.
135 135
     (string) $sOrder
136 136
 );
137 137
 $iTotal = DB::count();
138 138
 $rows = DB::query(
139 139
     'SELECT a.item_id, i.label, a.del_value, i.id_tree
140
-    FROM ' . prefixTable('automatic_del') . ' AS a
141
-    INNER JOIN ' . prefixTable('items') . ' AS i ON (i.id = a.item_id)' .
142
-        $sWhere .
140
+    FROM ' . prefixTable('automatic_del').' AS a
141
+    INNER JOIN ' . prefixTable('items').' AS i ON (i.id = a.item_id)'.
142
+        $sWhere.
143 143
         $sLimit
144 144
 );
145 145
 $iFilteredTotal = DB::count();
@@ -157,18 +157,18 @@  discard block
 block discarded – undo
157 157
     // start the line
158 158
     $sOutput .= '[';
159 159
     // Column 1
160
-    $sOutput .= '"<i class=\"fas fa-external-link-alt pointer text-primary mr-2\" onclick=\"showItemCard($(this))\" data-item-id=\"' . $record['item_id'] . '\"  data-item-tree-id=\"' . $record['id_tree'] . '\"></i>", ';
160
+    $sOutput .= '"<i class=\"fas fa-external-link-alt pointer text-primary mr-2\" onclick=\"showItemCard($(this))\" data-item-id=\"'.$record['item_id'].'\"  data-item-tree-id=\"'.$record['id_tree'].'\"></i>", ';
161 161
     // Column 2
162
-    $sOutput .= '"' . $record['label'] . '", ';
162
+    $sOutput .= '"'.$record['label'].'", ';
163 163
     // Column 3
164
-    $sOutput .= '"' . date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['del_value']) . '", ';
164
+    $sOutput .= '"'.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['del_value']).'", ';
165 165
     // Column 4
166 166
     $path = [];
167 167
     $treeDesc = $tree->getPath($record['id_tree'], true);
168 168
     foreach ($treeDesc as $t) {
169 169
         array_push($path, $t->title);
170 170
     }
171
-    $sOutput .= '"' . implode('<i class=\"fas fa-angle-right ml-1 mr-1\"></i>', $path) . '"],';
171
+    $sOutput .= '"'.implode('<i class=\"fas fa-angle-right ml-1 mr-1\"></i>', $path).'"],';
172 172
 }
173 173
 
174 174
 if ($iTotal > 0) {
@@ -181,4 +181,4 @@  discard block
 block discarded – undo
181 181
 }
182 182
 
183 183
 // finalize output
184
-echo '{"recordsTotal": ' . $iTotal . ', "recordsFiltered": ' . $iFilteredTotal . ', "data": ' . $sOutput;
184
+echo '{"recordsTotal": '.$iTotal.', "recordsFiltered": '.$iFilteredTotal.', "data": '.$sOutput;
Please login to merge, or discard this patch.
sources/export.queries.php 1 patch
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -50,26 +50,26 @@  discard block
 block discarded – undo
50 50
 }
51 51
 
52 52
 // Do checks
53
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
54
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
53
+require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
54
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
55 55
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'items', $SETTINGS) === false) {
56 56
     // Not allowed page
57 57
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
58
-    include $SETTINGS['cpassman_dir'] . '/error.php';
58
+    include $SETTINGS['cpassman_dir'].'/error.php';
59 59
     exit();
60 60
 }
61 61
 
62 62
 // No time limit
63 63
 set_time_limit(0);
64 64
 
65
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
65
+require_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
66 66
 header('Content-type: text/html; charset=utf-8');
67 67
 error_reporting(E_ERROR);
68
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
69
-require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
68
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
69
+require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
70 70
 
71 71
 // Connect to mysql server
72
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
72
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
73 73
 if (defined('DB_PASSWD_CLEAR') === false) {
74 74
     define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
75 75
 }
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
 DB::$encoding = DB_ENCODING;
82 82
 
83 83
 // Build tree
84
-$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'] . '/includes/libraries');
84
+$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'].'/includes/libraries');
85 85
 $tree->register();
86
-$tree = new Tree\NestedTree\NestedTree($pre . 'nested_tree', 'id', 'parent_id', 'title');
86
+$tree = new Tree\NestedTree\NestedTree($pre.'nested_tree', 'id', 'parent_id', 'title');
87 87
 
88 88
 // User's language loading
89
-require_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $_SESSION['user_language'] . '.php';
89
+require_once $SETTINGS['cpassman_dir'].'/includes/language/'.$_SESSION['user_language'].'.php';
90 90
 
91 91
 // Prepare POST variables
92 92
 $id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
                         'SELECT i.id as id, i.id_tree as id_tree, i.restricted_to as restricted_to, i.perso as perso,
138 138
                             i.label as label, i.description as description, i.pw as pw, i.login as login, i.url as url,
139 139
                             i.email as email,l.date as date, i.pw_iv as pw_iv,n.renewal_period as renewal_period
140
-                        FROM ' . prefixTable('items') . ' as i
141
-                        INNER JOIN ' . prefixTable('nested_tree') . ' as n ON (i.id_tree = n.id)
142
-                        INNER JOIN ' . prefixTable('log_items') . ' as l ON (i.id = l.id_item)
140
+                        FROM ' . prefixTable('items').' as i
141
+                        INNER JOIN ' . prefixTable('nested_tree').' as n ON (i.id_tree = n.id)
142
+                        INNER JOIN ' . prefixTable('log_items').' as l ON (i.id = l.id_item)
143 143
                         WHERE i.inactif = %i
144 144
                         AND i.id_tree= %i
145 145
                         AND (l.action = %s OR (l.action = %s AND l.raison LIKE %s))
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
                                 // Run query
163 163
                                 $dataItem = DB::queryfirstrow(
164 164
                                     'SELECT i.pw AS pw, s.share_key AS share_key
165
-                                    FROM ' . prefixTable('items') . ' AS i
166
-                                    INNER JOIN ' . prefixTable('sharekeys_items') . ' AS s ON (s.object_id = i.id)
165
+                                    FROM ' . prefixTable('items').' AS i
166
+                                    INNER JOIN ' . prefixTable('sharekeys_items').' AS s ON (s.object_id = i.id)
167 167
                                     WHERE user_id = %i AND i.id = %i',
168 168
                                     $_SESSION['user_id'],
169 169
                                     $record['id']
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
                                 $arr_kbs = [];
188 188
                                 $rows_kb = DB::query(
189 189
                                     'SELECT b.label, b.id
190
-                                    FROM ' . prefixTable('kb_items') . ' AS a
191
-                                    INNER JOIN ' . prefixTable('kb') . ' AS b ON (a.kb_id = b.id)
190
+                                    FROM ' . prefixTable('kb_items').' AS a
191
+                                    INNER JOIN ' . prefixTable('kb').' AS b ON (a.kb_id = b.id)
192 192
                                     WHERE a.item_id = %i',
193 193
                                     $record['id']
194 194
                                 );
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                                 $arr_tags = [];
201 201
                                 $rows_tag = DB::query(
202 202
                                     'SELECT tag
203
-                                    FROM ' . prefixTable('tags') . '
203
+                                    FROM ' . prefixTable('tags').'
204 204
                                     WHERE item_id = %i',
205 205
                                     $record['id']
206 206
                                 );
@@ -247,14 +247,14 @@  discard block
 block discarded – undo
247 247
                 $tmp .= array2csv($value);
248 248
             }
249 249
 
250
-            echo '[{"content":"' . base64_encode($tmp) . '"}]';
250
+            echo '[{"content":"'.base64_encode($tmp).'"}]';
251 251
             break;
252 252
 
253 253
             /*
254 254
          * PDF - step 1 - Prepare database
255 255
          */
256 256
         case 'initialize_export_table':
257
-            DB::query('TRUNCATE TABLE ' . prefixTable('export'));
257
+            DB::query('TRUNCATE TABLE '.prefixTable('export'));
258 258
             break;
259 259
 
260 260
             /*
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
                     'SELECT i.id as id, i.restricted_to as restricted_to, i.perso as perso, i.label as label, i.description as description, i.pw as pw, i.login as login, i.url as url, i.email as email,
299 299
                         l.date as date, i.pw_iv as pw_iv,
300 300
                         n.renewal_period as renewal_period
301
-                        FROM ' . prefixTable('items') . ' as i
302
-                        INNER JOIN ' . prefixTable('nested_tree') . ' as n ON (i.id_tree = n.id)
303
-                        INNER JOIN ' . prefixTable('log_items') . ' as l ON (i.id = l.id_item)
301
+                        FROM ' . prefixTable('items').' as i
302
+                        INNER JOIN ' . prefixTable('nested_tree').' as n ON (i.id_tree = n.id)
303
+                        INNER JOIN ' . prefixTable('log_items').' as l ON (i.id = l.id_item)
304 304
                         WHERE i.inactif = %i
305 305
                         AND i.id_tree= %i
306 306
                         AND (l.action = %s OR (l.action = %s AND l.raison LIKE %s))
@@ -326,8 +326,8 @@  discard block
 block discarded – undo
326 326
                             // Run query
327 327
                             $dataItem = DB::queryfirstrow(
328 328
                                 'SELECT i.pw AS pw, s.share_key AS share_key
329
-                                FROM ' . prefixTable('items') . ' AS i
330
-                                INNER JOIN ' . prefixTable('sharekeys_items') . ' AS s ON (s.object_id = i.id)
329
+                                FROM ' . prefixTable('items').' AS i
330
+                                INNER JOIN ' . prefixTable('sharekeys_items').' AS s ON (s.object_id = i.id)
331 331
                                 WHERE user_id = %i AND i.id = %i',
332 332
                                 $_SESSION['user_id'],
333 333
                                 $record['id']
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
                             $arr_kbs = '';
352 352
                             $rows_kb = DB::query(
353 353
                                 'SELECT b.label, b.id
354
-                                FROM ' . prefixTable('kb_items') . ' AS a
355
-                                INNER JOIN ' . prefixTable('kb') . ' AS b ON (a.kb_id = b.id)
354
+                                FROM ' . prefixTable('kb_items').' AS a
355
+                                INNER JOIN ' . prefixTable('kb').' AS b ON (a.kb_id = b.id)
356 356
                                 WHERE a.item_id = %i',
357 357
                                 $record['id']
358 358
                             );
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
                                 if (empty($arr_kbs)) {
361 361
                                     $arr_kbs = $rec_kb['label'];
362 362
                                 } else {
363
-                                    $arr_kbs .= ' | ' . $rec_kb['label'];
363
+                                    $arr_kbs .= ' | '.$rec_kb['label'];
364 364
                                 }
365 365
                             }
366 366
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                             $arr_tags = '';
369 369
                             $rows_tag = DB::query(
370 370
                                 'SELECT tag
371
-                                FROM ' . prefixTable('tags') . '
371
+                                FROM ' . prefixTable('tags').'
372 372
                                 WHERE item_id = %i',
373 373
                                 $record['id']
374 374
                             );
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                                 if (empty($arr_tags)) {
377 377
                                     $arr_tags = $rec_tag['tag'];
378 378
                                 } else {
379
-                                    $arr_tags .= ' ' . $rec_tag['tag'];
379
+                                    $arr_tags .= ' '.$rec_tag['tag'];
380 380
                                 }
381 381
                             }
382 382
 
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
             header('Content-type: application/pdf');
445 445
 
446 446
             // query
447
-            $rows = DB::query('SELECT * FROM ' . prefixTable('export'));
447
+            $rows = DB::query('SELECT * FROM '.prefixTable('export'));
448 448
             $counter = DB::count();
449 449
             if ($counter > 0) {
450 450
                 // print
@@ -452,8 +452,8 @@  discard block
 block discarded – undo
452 452
                 $prev_path = '';
453 453
 
454 454
                 //Prepare the PDF file
455
-                require_once($SETTINGS['cpassman_dir'] . '/includes/libraries/Pdf/tcpdf/config/tcpdf_config.php');
456
-                include $SETTINGS['cpassman_dir'] . '/includes/libraries/Pdf/tcpdf/tcpdf.php';
455
+                require_once($SETTINGS['cpassman_dir'].'/includes/libraries/Pdf/tcpdf/config/tcpdf_config.php');
456
+                include $SETTINGS['cpassman_dir'].'/includes/libraries/Pdf/tcpdf/tcpdf.php';
457 457
 
458 458
                 $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
459 459
                 $pdf->SetProtection(array('print'), $dataReceived['pdf_password'], null);
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 
466 466
                 // set default header data
467 467
                 $pdf->SetHeaderData(
468
-                    $SETTINGS['cpassman_dir'] . '/includes/images/teampass-logo2-home.png',
468
+                    $SETTINGS['cpassman_dir'].'/includes/images/teampass-logo2-home.png',
469 469
                     PDF_HEADER_LOGO_WIDTH,
470 470
                     'Teampass export',
471 471
                     $_SESSION['lastname']." ".$_SESSION['name'].' @ '.date($SETTINGS['date_format']." ".$SETTINGS['time_format'], (int) time())
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
                 logEvents($SETTINGS, 'pdf_export', '', (string) $_SESSION['user_id'], $_SESSION['login']);
570 570
 
571 571
                 //clean table
572
-                DB::query('TRUNCATE TABLE ' . prefixTable('export'));
572
+                DB::query('TRUNCATE TABLE '.prefixTable('export'));
573 573
 
574 574
                 // Send back the file in Blob
575 575
                 echo $pdf->Output(null, 'I');
@@ -581,8 +581,8 @@  discard block
 block discarded – undo
581 581
             // step 1:
582 582
             // - prepare export file
583 583
             // - get full list of objects id to export
584
-            include $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
585
-            include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Encryption/GibberishAES/GibberishAES.php';
584
+            include $SETTINGS['cpassman_dir'].'/includes/config/include.php';
585
+            include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Encryption/GibberishAES/GibberishAES.php';
586 586
             $idsList = array();
587 587
 
588 588
             foreach (explode(';', $post_ids) as $id) {
@@ -594,9 +594,9 @@  discard block
 block discarded – undo
594 594
                     // count elements to display
595 595
                     $result = DB::query(
596 596
                         'SELECT i.id AS id, i.label AS label, i.restricted_to AS restricted_to, i.perso AS perso
597
-                    FROM ' . prefixTable('items') . ' as i
598
-                    INNER JOIN ' . prefixTable('nested_tree') . ' as n ON (i.id_tree = n.id)
599
-                    INNER JOIN ' . prefixTable('log_items') . ' as l ON (i.id = l.id_item)
597
+                    FROM ' . prefixTable('items').' as i
598
+                    INNER JOIN ' . prefixTable('nested_tree').' as n ON (i.id_tree = n.id)
599
+                    INNER JOIN ' . prefixTable('log_items').' as l ON (i.id = l.id_item)
600 600
                     WHERE i.inactif = %i
601 601
                     AND i.id_tree= %i
602 602
                     AND (l.action = %s OR (l.action = %s AND l.raison LIKE %s))
@@ -624,9 +624,9 @@  discard block
 block discarded – undo
624 624
 
625 625
             // prepare export file
626 626
             //save the file
627
-            $html_file = '/teampass_export_' . time() . '_' . generateKey() . '.html';
627
+            $html_file = '/teampass_export_'.time().'_'.generateKey().'.html';
628 628
             //print_r($full_listing);
629
-            $outstream = fopen($SETTINGS['path_to_files_folder'] . $html_file, 'w');
629
+            $outstream = fopen($SETTINGS['path_to_files_folder'].$html_file, 'w');
630 630
             if ($outstream === false) {
631 631
                 echo '[{"error":"true"}]';
632 632
                 break;
@@ -650,12 +650,12 @@  discard block
 block discarded – undo
650 650
     </style>
651 651
     </head>
652 652
     <body>
653
-    <input type="hidden" id="generation_date" value="' . GibberishAES::enc(/** @scrutinizer ignore-type */ (string) time(), $post_pdf_password) . '" />
653
+    <input type="hidden" id="generation_date" value="' . GibberishAES::enc(/** @scrutinizer ignore-type */ (string) time(), $post_pdf_password).'" />
654 654
     <div id="header">
655
-    ' . TP_TOOL_NAME . ' - Off Line mode
655
+    ' . TP_TOOL_NAME.' - Off Line mode
656 656
     </div>
657 657
     <div style="margin:10px; font-size:9px;">
658
-    <i>This page was generated by <b>' . $_SESSION['name'] . ' ' . $_SESSION['lastname'] . '</b>, the ' . date('Y/m/d H:i:s') . '.</i>
658
+    <i>This page was generated by <b>' . $_SESSION['name'].' '.$_SESSION['lastname'].'</b>, the '.date('Y/m/d H:i:s').'.</i>
659 659
     <span id="info_page" style="margin-left:20px; font-weight:bold; font-size: 14px; color:red;"></span>
660 660
     </div>
661 661
     <div id="information"></div>
@@ -666,11 +666,11 @@  discard block
 block discarded – undo
666 666
     <div>
667 667
     <table id="itemsTable">
668 668
         <thead><tr>
669
-            <th style="width:15%;">' . $LANG['label'] . '</th>
670
-            <th style="width:10%;">' . $LANG['pw'] . '</th>
671
-            <th style="width:30%;">' . $LANG['description'] . '</th>
672
-            <th style="width:5%;">' . $LANG['user_login'] . '</th>
673
-            <th style="width:20%;">' . $LANG['url'] . '</th>
669
+            <th style="width:15%;">' . $LANG['label'].'</th>
670
+            <th style="width:10%;">' . $LANG['pw'].'</th>
671
+            <th style="width:30%;">' . $LANG['description'].'</th>
672
+            <th style="width:5%;">' . $LANG['user_login'].'</th>
673
+            <th style="width:20%;">' . $LANG['url'].'</th>
674 674
         </tr></thead>
675 675
         <tbody id="itemsTable_tbody">'
676 676
             );
@@ -695,22 +695,22 @@  discard block
 block discarded – undo
695 695
                 || in_array($post_idTree, $_SESSION['groupes_visibles']) === false
696 696
                 || (in_array($post_idTree, $_SESSION['no_access_folders']) === true)
697 697
             ) {
698
-                echo '[{"loop":"true", "number":"' . $post_number . '", "cpt":"' . $post_cpt . '", "file":"' . $post_file . '", "idsList":"' . $post_idsList . '" , "file_link":"' . $post_file_link . '"}]';
698
+                echo '[{"loop":"true", "number":"'.$post_number.'", "cpt":"'.$post_cpt.'", "file":"'.$post_file.'", "idsList":"'.$post_idsList.'" , "file_link":"'.$post_file_link.'"}]';
699 699
                 break;
700 700
             }
701 701
 
702 702
             $full_listing = array();
703 703
             $items_id_list = array();
704
-            include $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
705
-            include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Encryption/GibberishAES/GibberishAES.php';
704
+            include $SETTINGS['cpassman_dir'].'/includes/config/include.php';
705
+            include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Encryption/GibberishAES/GibberishAES.php';
706 706
 
707 707
             $rows = DB::query(
708 708
                 'SELECT i.id as id, i.url as url, i.perso as perso, i.label as label, i.description as description, i.pw as pw, i.login as login, i.id_tree as id_tree,
709 709
                 l.date as date, i.pw_iv as pw_iv,
710 710
                 n.renewal_period as renewal_period
711
-            FROM ' . prefixTable('items') . ' as i
712
-            INNER JOIN ' . prefixTable('nested_tree') . ' as n ON (i.id_tree = n.id)
713
-            INNER JOIN ' . prefixTable('log_items') . ' as l ON (i.id = l.id_item)
711
+            FROM ' . prefixTable('items').' as i
712
+            INNER JOIN ' . prefixTable('nested_tree').' as n ON (i.id_tree = n.id)
713
+            INNER JOIN ' . prefixTable('log_items').' as l ON (i.id = l.id_item)
714 714
             WHERE i.inactif = %i
715 715
             AND i.id_tree= %i
716 716
             AND (l.action = %s OR (l.action = %s AND l.raison LIKE %s))
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
             }
771 771
 
772 772
             //save in export file
773
-            $outstream = fopen($post_file . '.txt', 'a');
773
+            $outstream = fopen($post_file.'.txt', 'a');
774 774
             if ($outstream === false) {
775 775
                 echo '[{"error":"true"}]';
776 776
                 break;
@@ -808,13 +808,13 @@  discard block
 block discarded – undo
808 808
                         if (empty($arboHtml)) {
809 809
                             $arboHtml = $arboHtml_tmp;
810 810
                         } else {
811
-                            $arboHtml .= ' » ' . $arboHtml_tmp;
811
+                            $arboHtml .= ' » '.$arboHtml_tmp;
812 812
                         }
813 813
                     }
814 814
                     fputs(
815 815
                         $outstream,
816 816
                         '
817
-        <tr class="path"><td colspan="5">' . $arboHtml . '</td></tr>'
817
+        <tr class="path"><td colspan="5">' . $arboHtml.'</td></tr>'
818 818
                     );
819 819
                     $idTree = $elem['id_tree'];
820 820
                 }
@@ -823,12 +823,12 @@  discard block
 block discarded – undo
823 823
                 fputs(
824 824
                     $outstream,
825 825
                     '
826
-        <tr class="' . $lineType . '">
827
-            <td>' . addslashes($elem['label']) . '</td>
828
-            <td align="center"><span class="span_pw" id="span_' . $elem['id'] . '"><a href="#" onclick="decryptme(' . $elem['id'] . ', \'' . $encPw . '\');return false;">Decrypt </a></span><input type="hidden" id="hide_' . $elem['id'] . '" value="' . $encPw . '" /></td>
829
-            <td>' . $desc . '</td>
830
-            <td align="center">' . $login . '</td>
831
-            <td align="center">' . $url . '</td>
826
+        <tr class="' . $lineType.'">
827
+            <td>' . addslashes($elem['label']).'</td>
828
+            <td align="center"><span class="span_pw" id="span_' . $elem['id'].'"><a href="#" onclick="decryptme('.$elem['id'].', \''.$encPw.'\');return false;">Decrypt </a></span><input type="hidden" id="hide_'.$elem['id'].'" value="'.$encPw.'" /></td>
829
+            <td>' . $desc.'</td>
830
+            <td align="center">' . $login.'</td>
831
+            <td align="center">' . $url.'</td>
832 832
             </tr>'
833 833
                 );
834 834
             }
@@ -836,29 +836,29 @@  discard block
 block discarded – undo
836 836
             fclose($outstream);
837 837
 
838 838
             // send back and continue
839
-            echo '[{"loop":"true", "number":"' . $post_number . '", "cpt":"' . $post_cpt . '", "file":"' . $post_file . '", "idsList":"' . $post_idsList . '" , "file_link":"' . $post_file_link . '"}]';
839
+            echo '[{"loop":"true", "number":"'.$post_number.'", "cpt":"'.$post_cpt.'", "file":"'.$post_file.'", "idsList":"'.$post_idsList.'" , "file_link":"'.$post_file_link.'"}]';
840 840
             break;
841 841
 
842 842
             //CASE export in HTML format - Iteration loop
843 843
         case 'export_to_html_format_finalize':
844 844
             // Load includes
845
-            include $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
846
-            require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Encryption/GibberishAES/GibberishAES.php';
845
+            include $SETTINGS['cpassman_dir'].'/includes/config/include.php';
846
+            require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Encryption/GibberishAES/GibberishAES.php';
847 847
 
848 848
             // read the content of the temporary file
849
-            $handle = fopen($post_file . '.txt', 'r');
849
+            $handle = fopen($post_file.'.txt', 'r');
850 850
             if ($handle === false) {
851 851
                 echo '[{"error":"true"}]';
852 852
                 break;
853 853
             }
854
-            $contents = fread($handle, filesize($post_file . '.txt'));
854
+            $contents = fread($handle, filesize($post_file.'.txt'));
855 855
             if ($contents === false) {
856 856
                 echo '[{"error":"true"}]';
857 857
                 break;
858 858
             }
859 859
             fclose($handle);
860
-            if (is_file($post_file . '.txt')) {
861
-                unlink($post_file . '.txt');
860
+            if (is_file($post_file.'.txt')) {
861
+                unlink($post_file.'.txt');
862 862
             }
863 863
 
864 864
             // Encrypt its content
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
                 if (empty($encrypted_text) === true) {
870 870
                     $encrypted_text = GibberishAES::enc(/** @scrutinizer ignore-type */ $chunk, $post_pdf_password);
871 871
                 } else {
872
-                    $encrypted_text .= '|#|#|' . GibberishAES::enc(/** @scrutinizer ignore-type */ $chunk, $post_pdf_password);
872
+                    $encrypted_text .= '|#|#|'.GibberishAES::enc(/** @scrutinizer ignore-type */ $chunk, $post_pdf_password);
873 873
                 }
874 874
             }
875 875
 
@@ -886,9 +886,9 @@  discard block
 block discarded – undo
886 886
         </table></div>
887 887
         <input type="button" value="Hide all" onclick="hideAll()" />
888 888
         <div id="footer" style="text-align:center;">
889
-            <a href="https://teampass.net/about/" target="_blank" style="">' . TP_TOOL_NAME . '&nbsp;' . TP_VERSION_FULL . '&nbsp;' . TP_COPYRIGHT . '</a>
889
+            <a href="https://teampass.net/about/" target="_blank" style="">' . TP_TOOL_NAME.'&nbsp;'.TP_VERSION_FULL.'&nbsp;'.TP_COPYRIGHT.'</a>
890 890
         </div>
891
-        <div id="enc_html" style="display:none;">' . $encrypted_text . '</div>
891
+        <div id="enc_html" style="display:none;">' . $encrypted_text.'</div>
892 892
         </body>
893 893
     </html>
894 894
     <script type="text/javascript">
@@ -994,9 +994,9 @@  discard block
 block discarded – undo
994 994
 
995 995
             fclose($outstream);
996 996
 
997
-            echo '[{"text":"<a href=\'' .
998
-                $post_file_link .
999
-                '\' target=\'_blank\'>' . $LANG['pdf_download'] . '</a>"}]';
997
+            echo '[{"text":"<a href=\''.
998
+                $post_file_link.
999
+                '\' target=\'_blank\'>'.$LANG['pdf_download'].'</a>"}]';
1000 1000
             break;
1001 1001
     }
1002 1002
 }
Please login to merge, or discard this patch.
sources/core.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -50,22 +50,22 @@  discard block
 block discarded – undo
50 50
     // Load AntiXSS
51 51
     include_once '../includes/libraries/voku/helper/AntiXSS.php';
52 52
     $antiXss = new voku\helper\AntiXSS();
53
-    if (! headers_sent()) {    //If headers not sent yet... then do php redirect
54
-        header('Location: ' . $antiXss->xss_clean($url));
53
+    if (!headers_sent()) {    //If headers not sent yet... then do php redirect
54
+        header('Location: '.$antiXss->xss_clean($url));
55 55
         exit;
56 56
     }
57 57
 
58 58
     //If headers are sent... do java redirect... if java disabled, do html redirect.
59 59
     echo '<script type="text/javascript">';
60
-    echo 'window.location.href="' . $antiXss->xss_clean($url) . '";';
60
+    echo 'window.location.href="'.$antiXss->xss_clean($url).'";';
61 61
     echo '</script>';
62 62
     echo '<noscript>';
63
-    echo '<meta http-equiv="refresh" content="0;url=' . $antiXss->xss_clean($url) . '" />';
63
+    echo '<meta http-equiv="refresh" content="0;url='.$antiXss->xss_clean($url).'" />';
64 64
     echo '</noscript>';
65 65
 }
66 66
 
67 67
 // Include files
68
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
68
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
69 69
 $superGlobal = new protect\SuperGlobal\SuperGlobal();
70 70
 // Prepare GET variables
71 71
 $server = [];
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     && isset($SETTINGS['enable_sts']) === true
89 89
     && (int) $SETTINGS['enable_sts'] === 1
90 90
 ) {
91
-    redirect('https://' . $server['http_host'] . $server['request_uri']);
91
+    redirect('https://'.$server['http_host'].$server['request_uri']);
92 92
 }
93 93
 
94 94
 // Load pwComplexity
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
 // LOAD CPASSMAN SETTINGS
114 114
 if (
115 115
     isset($SETTINGS['cpassman_dir']) === true
116
-    && is_dir($SETTINGS['cpassman_dir'] . '/install') === true
116
+    && is_dir($SETTINGS['cpassman_dir'].'/install') === true
117 117
 ) {
118 118
     // Should we delete folder INSTALL?
119 119
     $row = DB::queryFirstRow(
120
-        'SELECT valeur FROM ' . prefixTable('misc') . ' WHERE type=%s AND intitule=%s',
120
+        'SELECT valeur FROM '.prefixTable('misc').' WHERE type=%s AND intitule=%s',
121 121
         'install',
122 122
         'clear_install_folder'
123 123
     );
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
             if ($directories !== false) {
136 136
                 $files = array_diff($directories, ['.', '..']);
137 137
                 foreach ($files as $file) {
138
-                    if (is_dir($dir . '/' . $file)) {
139
-                        delTree($dir . '/' . $file);
138
+                    if (is_dir($dir.'/'.$file)) {
139
+                        delTree($dir.'/'.$file);
140 140
                     } else {
141 141
                         try {
142
-                            unlink($dir . '/' . $file);
142
+                            unlink($dir.'/'.$file);
143 143
                         } catch (Exception $e) {
144 144
                             // do nothing... php will ignore and continue
145 145
                         }
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
             }
153 153
         }
154 154
 
155
-        if (is_dir($SETTINGS['cpassman_dir'] . '/install')) {
155
+        if (is_dir($SETTINGS['cpassman_dir'].'/install')) {
156 156
             // Set the permissions on the install directory and delete
157 157
             // is server Windows or Linux?
158 158
             if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
159
-                recursiveChmod($SETTINGS['cpassman_dir'] . '/install', 0755, 0440);
159
+                recursiveChmod($SETTINGS['cpassman_dir'].'/install', 0755, 0440);
160 160
             }
161
-            delTree($SETTINGS['cpassman_dir'] . '/install');
161
+            delTree($SETTINGS['cpassman_dir'].'/install');
162 162
         }
163 163
 
164 164
         // Delete temporary install table
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 // Load Languages stuff
177 177
 if (isset($languagesList) === false) {
178 178
     $languagesList = [];
179
-    $rows = DB::query('SELECT * FROM ' . prefixTable('languages') . ' GROUP BY name, label, code, flag, id ORDER BY name ASC');
179
+    $rows = DB::query('SELECT * FROM '.prefixTable('languages').' GROUP BY name, label, code, flag, id ORDER BY name ASC');
180 180
     foreach ($rows as $record) {
181 181
         array_push($languagesList, $record['name']);
182 182
         if (isset($_SESSION['user_language']) && $record['name'] === $_SESSION['user_language']) {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 // CHECK IF SESSION EXISTS AND IF SESSION IS VALID
235 235
 if (empty($_SESSION['sessionDuration']) === false) {
236 236
     $dataSession = DB::queryFirstRow(
237
-        'SELECT key_tempo FROM ' . prefixTable('users') . ' WHERE id=%i',
237
+        'SELECT key_tempo FROM '.prefixTable('users').' WHERE id=%i',
238 238
         $_SESSION['user_id']
239 239
     );
240 240
 } else {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     && (isset($_SESSION['user_admin']) === true && $_SESSION['user_admin'] === 1)
299 299
 ) {
300 300
     $row = DB::queryFirstRow(
301
-        'SELECT valeur FROM ' . prefixTable('misc') . ' WHERE type=%s_type AND intitule=%s_intitule',
301
+        'SELECT valeur FROM '.prefixTable('misc').' WHERE type=%s_type AND intitule=%s_intitule',
302 302
         [
303 303
             'type' => 'admin',
304 304
             'intitule' => 'cpassman_version',
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 
359 359
         syslog(
360 360
             LOG_WARNING,
361
-            'Unlog user: ' . date('Y/m/d H:i:s') . " {$server['remote_addr']} ({$server['http_user_agent']})"
361
+            'Unlog user: '.date('Y/m/d H:i:s')." {$server['remote_addr']} ({$server['http_user_agent']})"
362 362
         );
363 363
         // erase session table
364 364
         $_SESSION = [];
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 if (isset($_SESSION['user_id']) === true && empty($_SESSION['user_id']) === false) {
410 410
     // query on user
411 411
     $data = DB::queryfirstrow(
412
-        'SELECT login, admin, gestionnaire, can_manage_all_users, groupes_visibles, groupes_interdits, fonction_id, last_connexion FROM ' . prefixTable('users') . ' WHERE id=%i',
412
+        'SELECT login, admin, gestionnaire, can_manage_all_users, groupes_visibles, groupes_interdits, fonction_id, last_connexion FROM '.prefixTable('users').' WHERE id=%i',
413 413
         $_SESSION['user_id']
414 414
     );
415 415
     //Check if user has been deleted or unlogged
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
     $_SESSION['item_fields'] = [];
491 491
     $rows = DB::query(
492 492
         'SELECT *
493
-            FROM ' . prefixTable('categories') . '
493
+            FROM ' . prefixTable('categories').'
494 494
             WHERE level=%i',
495 495
         '0'
496 496
     );
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
         // get each field
500 500
         $rows2 = DB::query(
501 501
             'SELECT *
502
-            FROM ' . prefixTable('categories') . '
502
+            FROM ' . prefixTable('categories').'
503 503
             WHERE parent_id=%i
504 504
             ORDER BY `order` ASC',
505 505
             $record['id']
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
 if (
577 577
     isset($SETTINGS['roles_allowed_to_print']) === true
578 578
     && isset($_SESSION['user_roles']) === true
579
-    && (! isset($_SESSION['temporary']['user_can_printout']) || empty($_SESSION['temporary']['user_can_printout']))
579
+    && (!isset($_SESSION['temporary']['user_can_printout']) || empty($_SESSION['temporary']['user_can_printout']))
580 580
 ) {
581 581
     foreach (explode(';', $SETTINGS['roles_allowed_to_print']) as $role) {
582 582
         if (in_array($role, $_SESSION['user_roles']) === true) {
@@ -586,5 +586,5 @@  discard block
 block discarded – undo
586 586
 }
587 587
 
588 588
 /* CHECK NUMBER OF USER ONLINE */
589
-DB::query('SELECT * FROM ' . prefixTable('users') . ' WHERE timestamp>=%i', time() - 600);
589
+DB::query('SELECT * FROM '.prefixTable('users').' WHERE timestamp>=%i', time() - 600);
590 590
 $_SESSION['nb_users_online'] = DB::count();
Please login to merge, or discard this patch.
pages/emails.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'emails', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49
-    include $SETTINGS['cpassman_dir'] . '/error.php';
49
+    include $SETTINGS['cpassman_dir'].'/error.php';
50 50
     exit;
51 51
 }
52 52
 
53 53
 // Load template
54
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
54
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
55 55
 
56 56
 ?>
57 57
 <!-- Content Header (Page header) -->
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                     <div class="card-body">
200 200
                         <div id="unsent-emails">
201 201
                             <?php
202
-                            DB::query('SELECT * FROM ' . prefixTable('emails') . ' WHERE status = %s OR status = %s', 'not_sent', '');
202
+                            DB::query('SELECT * FROM '.prefixTable('emails').' WHERE status = %s OR status = %s', 'not_sent', '');
203 203
 echo str_replace('#nb_emails#', (string) DB::count(), langHdl('email_send_backlog'));
204 204
                             ?>
205 205
                         </div>
Please login to merge, or discard this patch.
pages/items.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -43,18 +43,18 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], curPage($SETTINGS), $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49 49
     //not allowed page
50
-    include $SETTINGS['cpassman_dir'] . '/error.php';
50
+    include $SETTINGS['cpassman_dir'].'/error.php';
51 51
     exit;
52 52
 }
53 53
 
54 54
 // Load
55
-require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
56
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
57
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
55
+require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
56
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
57
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
58 58
 $superGlobal = new protect\SuperGlobal\SuperGlobal();
59 59
 
60 60
 // Prepare SESSION variables
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 // Get list of users
71 71
 $usersList = [];
72
-$rows = DB::query('SELECT id,login,email FROM ' . prefixTable('users') . ' ORDER BY login ASC');
72
+$rows = DB::query('SELECT id,login,email FROM '.prefixTable('users').' ORDER BY login ASC');
73 73
 foreach ($rows as $record) {
74 74
     $usersList[$record['login']] = [
75 75
         'id' => $record['id'],
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
 // Get list of roles
81 81
 $arrRoles = [];
82 82
 $listRoles = '';
83
-$rows = DB::query('SELECT id,title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC');
83
+$rows = DB::query('SELECT id,title FROM '.prefixTable('roles_title').' ORDER BY title ASC');
84 84
 foreach ($rows as $reccord) {
85 85
     $arrRoles[$reccord['title']] = [
86 86
         'id' => $reccord['id'],
87 87
         'title' => $reccord['title'],
88 88
     ];
89 89
     if (empty($listRoles)) {
90
-        $listRoles = $reccord['id'] . '#' . $reccord['title'];
90
+        $listRoles = $reccord['id'].'#'.$reccord['title'];
91 91
     } else {
92
-        $listRoles .= ';' . $reccord['id'] . '#' . $reccord['title'];
92
+        $listRoles .= ';'.$reccord['id'].'#'.$reccord['title'];
93 93
     }
94 94
 }
95 95
 ?>
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
                         <li class="nav-item"><a class="nav-link" href="#tab_3" data-toggle="tab"><i class="fas fa-archive mr-2"></i><?php echo langHdl('attachments'); ?></a></li>
164 164
                         <?php
165 165
                         echo isset($SETTINGS['item_extra_fields']) === true && (int) $SETTINGS['item_extra_fields'] === 1 ? '
166
-                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fas fa-cubes mr-2"></i>' . langHdl('fields') . '</a></li>' : '';
166
+                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fas fa-cubes mr-2"></i>' . langHdl('fields').'</a></li>' : '';
167 167
 echo isset($SETTINGS['insert_manual_entry_item_history']) === true && (int) $SETTINGS['insert_manual_entry_item_history'] === 1 ? '
168
-                            <li class="nav-item"><a class="nav-link" href="#tab_5" data-toggle="tab"><i class="fas fa-history mr-2"></i>' . langHdl('history') . '</a></li>' : '';
168
+                            <li class="nav-item"><a class="nav-link" href="#tab_5" data-toggle="tab"><i class="fas fa-history mr-2"></i>' . langHdl('history').'</a></li>' : '';
169 169
                         ?>
170 170
                     </ul>
171 171
                 </div><!-- /.card-header -->
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                                                 <?php
235 235
                                                 for ($i = 4; $i <= $SETTINGS['pwd_maximum_length']; ++$i) {
236 236
                                                     echo '
237
-                                                <option>' . $i . '</option>';
237
+                                                <option>' . $i.'</option>';
238 238
                                                 }
239 239
                                                 ?>
240 240
                                             </select>
@@ -403,29 +403,29 @@  discard block
 block discarded – undo
403 403
                                         if (isset($_SESSION['item_fields']) === true) {
404 404
                                             foreach ($_SESSION['item_fields'] as $category) {
405 405
                                                 echo '
406
-                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'] . '">
407
-                                                <h5>' . $category['title'] . '</h5>
406
+                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'].'">
407
+                                                <h5>' . $category['title'].'</h5>
408 408
                                                 <p>';
409 409
                                                 foreach ($category['fields'] as $field) {
410 410
                                                     if ($field['type'] === 'textarea') {
411 411
                                                         echo '
412
-                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
412
+                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
413 413
                                                         <label>' . $field['title'],
414 414
                                                             $field['is_mandatory'] === '1' ?
415
-                                                                '<span class="fas fa-fire text-danger ml-1 infotip" title="' . langHdl('is_mandatory') . '"></span>' : '',
415
+                                                                '<span class="fas fa-fire text-danger ml-1 infotip" title="'.langHdl('is_mandatory').'"></span>' : '',
416 416
                                                             '</label>
417
-                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-change-ongoing="0"></textarea>
417
+                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-change-ongoing="0"></textarea>
418 418
                                                     </div>';
419 419
                                                     } else {
420 420
                                                         echo '
421
-                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
421
+                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
422 422
                                                         <div class="input-group-prepend">
423 423
                                                             <span class="input-group-text">' . $field['title'],
424 424
                                                             $field['is_mandatory'] === '1' ?
425
-                                                                '<span class="fas fa-fire text-danger ml-1 infotip" title="' . langHdl('is_mandatory') . '"></span>' : '',
425
+                                                                '<span class="fas fa-fire text-danger ml-1 infotip" title="'.langHdl('is_mandatory').'"></span>' : '',
426 426
                                                             '</span>
427 427
                                                         </div>
428
-                                                        <input type="' . $field['type'] . '" class="form-control form-item-control form-item-field-custom" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-change-ongoing="0">
428
+                                                        <input type="' . $field['type'].'" class="form-control form-item-control form-item-field-custom" data-field-name="'.$field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-change-ongoing="0">
429 429
                                                     </div>';
430 430
                                                     }
431 431
                                                 }
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
                                                 ) {
437 437
                                                     echo '
438 438
                                                     <div class="form-check icheck-blue">
439
-                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'] . '" data-change-ongoing="0" data-field-name="template" id="template_' . $category['id'] . '">
440
-                                                        <label class="form-check-label ml-3" for="template_' . $category['id'] . '">' . langHdl('main_template') . '</label>
439
+                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'].'" data-change-ongoing="0" data-field-name="template" id="template_'.$category['id'].'">
440
+                                                        <label class="form-check-label ml-3" for="template_' . $category['id'].'">'.langHdl('main_template').'</label>
441 441
                                                     </div>';
442 442
                                                 }
443 443
                                                 echo '
@@ -667,18 +667,18 @@  discard block
 block discarded – undo
667 667
                         <?php
668 668
                             foreach ($_SESSION['item_fields'] as $elem) {
669 669
                                 echo '
670
-                        <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'] . '">
671
-                            <h5>' . $elem['title'] . '</h5>
670
+                        <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'].'">
671
+                            <h5>' . $elem['title'].'</h5>
672 672
                             <p>
673 673
                                 <ul class="list-group list-group-unbordered mb-3">';
674 674
                                 foreach ($elem['fields'] as $field) {
675 675
                                     echo '
676
-                                    <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'] . '">
677
-                                        <b>' . $field['title'] . '</b>
678
-                                        <button type="button" class="float-right btn btn-outline-info btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'] . '">
676
+                                    <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'].'">
677
+                                        <b>' . $field['title'].'</b>
678
+                                        <button type="button" class="float-right btn btn-outline-info btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'].'">
679 679
                                             <i class="fas fa-copy"></i>
680 680
                                         </button>
681
-                                        <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'] . '"></span>
681
+                                        <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'].'"></span>
682 682
                                     </li>';
683 683
                                 }
684 684
                                 echo '
@@ -1050,7 +1050,7 @@  discard block
 block discarded – undo
1050 1050
                         <p><?php
1051 1051
                             echo str_replace(
1052 1052
         ['##otv_expiration_period##', '. '],
1053
-        ['<span class="text-bold text-primary">' . $SETTINGS['otv_expiration_period'] . '</span>', '<br>'],
1053
+        ['<span class="text-bold text-primary">'.$SETTINGS['otv_expiration_period'].'</span>', '<br>'],
1054 1054
         langHdl('otv_message')
1055 1055
     );
1056 1056
                             ?></p>
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
                             <select class="form-control form-folder-control select2" style="width:100%;" id="form-folder-add-complexicity" required>
1125 1125
                                 <?php
1126 1126
                                 foreach (TP_PW_COMPLEXITY as $key => $value) {
1127
-                                    echo '<option value="' . $key . '">' . $value[1] . '</option>';
1127
+                                    echo '<option value="'.$key.'">'.$value[1].'</option>';
1128 1128
                                 }
1129 1129
                                 ?>
1130 1130
                             </select>
Please login to merge, or discard this patch.
sources/main.queries.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1834,7 +1834,9 @@
 block discarded – undo
1834 1834
             $record['id'],
1835 1835
             $_SESSION['user_id']
1836 1836
         );
1837
-        if ($currentUserKey === null || count($currentUserKey) === 0) continue;
1837
+        if ($currentUserKey === null || count($currentUserKey) === 0) {
1838
+            continue;
1839
+        }
1838 1840
 
1839 1841
         // Decrypt itemkey with admin key
1840 1842
         $itemKey = decryptUserObjectKey($currentUserKey['share_key'], $_SESSION['user']['private_key']);
Please login to merge, or discard this 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);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             $pwdlib = new PasswordLib\PasswordLib();
226 226
             // generate key
227 227
             $key = $pwdlib->getRandomToken(filter_input(INPUT_POST, 'size', FILTER_SANITIZE_NUMBER_INT));
228
-            echo '[{"key" : "' . htmlentities($key, ENT_QUOTES) . '"}]';
228
+            echo '[{"key" : "'.htmlentities($key, ENT_QUOTES).'"}]';
229 229
             break;
230 230
 
231 231
         /*
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                 )
255 255
             );
256 256
 
257
-            echo '[{"token" : "' . $token . '"}]';
257
+            echo '[{"token" : "'.$token.'"}]';
258 258
             break;
259 259
 
260 260
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         case 'get_teampass_settings':
320 320
             // Encrypt data to return
321 321
             echo prepareExchangedData(
322
-    $SETTINGS['cpassman_dir'],$SETTINGS, 'encode');
322
+    $SETTINGS['cpassman_dir'], $SETTINGS, 'encode');
323 323
 
324 324
             break;
325 325
 
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
     // get number of items
505 505
     DB::queryFirstRow(
506 506
         'SELECT increment_id
507
-        FROM ' . prefixTable('sharekeys_items') .
507
+        FROM ' . prefixTable('sharekeys_items').
508 508
         ' WHERE user_id = %i',
509 509
         $userId
510 510
     );
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
         // check if expected security level is reached
561 561
         $dataUser = DB::queryfirstrow(
562 562
             'SELECT *
563
-            FROM ' . prefixTable('users') . ' WHERE id = %i',
563
+            FROM ' . prefixTable('users').' WHERE id = %i',
564 564
             $post_user_id
565 565
         );
566 566
 
@@ -581,8 +581,8 @@  discard block
 block discarded – undo
581 581
         if (empty($dataUser['fonction_id']) === false) {
582 582
             $data = DB::queryFirstRow(
583 583
                 'SELECT complexity
584
-                FROM ' . prefixTable('roles_title') . '
585
-                WHERE id IN (' . $dataUser['fonction_id'] . ')
584
+                FROM ' . prefixTable('roles_title').'
585
+                WHERE id IN (' . $dataUser['fonction_id'].')
586 586
                 ORDER BY complexity DESC'
587 587
             );
588 588
         } else {
@@ -596,8 +596,8 @@  discard block
 block discarded – undo
596 596
     $SETTINGS['cpassman_dir'],
597 597
                 array(
598 598
                     'error' => true,
599
-                    'message' => '<div style="margin:10px 0 10px 15px;">' . langHdl('complexity_level_not_reached') . '.<br>' .
600
-                        langHdl('expected_complexity_level') . ': <b>' . TP_PW_COMPLEXITY[$data['complexity']][1] . '</b></div>',
599
+                    'message' => '<div style="margin:10px 0 10px 15px;">'.langHdl('complexity_level_not_reached').'.<br>'.
600
+                        langHdl('expected_complexity_level').': <b>'.TP_PW_COMPLEXITY[$data['complexity']][1].'</b></div>',
601 601
                 ),
602 602
                 'encode'
603 603
             );
@@ -703,14 +703,14 @@  discard block
 block discarded – undo
703 703
         // Get data about user
704 704
         $data = DB::queryfirstrow(
705 705
             'SELECT id, email, pw
706
-            FROM ' . prefixTable('users') . '
706
+            FROM ' . prefixTable('users').'
707 707
             WHERE login = %s',
708 708
             $post_login
709 709
         );
710 710
     } else {
711 711
         $data = DB::queryfirstrow(
712 712
             'SELECT id, login, email, pw
713
-            FROM ' . prefixTable('users') . '
713
+            FROM ' . prefixTable('users').'
714 714
             WHERE id = %i',
715 715
             $post_id
716 716
         );
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
     $counter = DB::count();
721 721
 
722 722
     // load passwordLib library
723
-    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'] . '/includes/libraries');
723
+    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'].'/includes/libraries');
724 724
     $pwdlib->register();
725 725
     $pwdlib = new PasswordLib\PasswordLib();
726 726
 
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
     }
771 771
     
772 772
     // generate new GA user code
773
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
773
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
774 774
     $tfa = new Authentication\TwoFactorAuth\TwoFactorAuth($SETTINGS['ga_website_name']);
775 775
     $gaSecretKey = $tfa->createSecret();
776 776
     $gaTemporaryCode = GenerateCryptKey(12, false, true, true, false, true, $SETTINGS);
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
                 'email' => $data['email'],
811 811
                 'email_result' => str_replace(
812 812
                     '#email#',
813
-                    '<b>' . obfuscateEmail($data['email']) . '</b>',
813
+                    '<b>'.obfuscateEmail($data['email']).'</b>',
814 814
                     addslashes(langHdl('admin_email_result_ok'))
815 815
                 ),
816 816
             ),
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
             'email' => $data['email'],
828 828
             'email_result' => str_replace(
829 829
                 '#email#',
830
-                '<b>' . obfuscateEmail($data['email']) . '</b>',
830
+                '<b>'.obfuscateEmail($data['email']).'</b>',
831 831
                 addslashes(langHdl('admin_email_result_ok'))
832 832
             ),
833 833
         ),
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
         && (int) $SETTINGS['enable_send_email_on_user_login'] === 1
844 844
     ) {
845 845
         $row = DB::queryFirstRow(
846
-            'SELECT valeur FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s',
846
+            'SELECT valeur FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s',
847 847
             'cron',
848 848
             'sending_emails'
849 849
         );
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
         if ((int) (time() - $row['valeur']) >= 300 || (int) $row['valeur'] === 0) {
852 852
             $rows = DB::query(
853 853
                 'SELECT *
854
-                FROM ' . prefixTable('emails') .
854
+                FROM ' . prefixTable('emails').
855 855
                 ' WHERE status != %s',
856 856
                 'sent'
857 857
             );
@@ -957,8 +957,8 @@  discard block
 block discarded – undo
957 957
     $arr_html = array();
958 958
     $rows = DB::query(
959 959
         '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
960
-        FROM ' . prefixTable('log_items') . ' AS l
961
-        RIGHT JOIN ' . prefixTable('items') . ' AS i ON (l.id_item = i.id)
960
+        FROM ' . prefixTable('log_items').' AS l
961
+        RIGHT JOIN ' . prefixTable('items').' AS i ON (l.id_item = i.id)
962 962
         WHERE l.action = %s AND l.id_user = %i
963 963
         ORDER BY l.date DESC
964 964
         LIMIT 0, 100',
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
         isset($SETTINGS['enable_suggestion']) === true && (int) $SETTINGS['enable_suggestion'] === 1
992 992
         && ((int) $_SESSION['user_admin'] === 1 || (int) $_SESSION['user_manager'] === 1)
993 993
     ) {
994
-        DB::query('SELECT * FROM ' . prefixTable('suggestion'));
994
+        DB::query('SELECT * FROM '.prefixTable('suggestion'));
995 995
         $nb_suggestions_waiting = DB::count();
996 996
     }
997 997
 
@@ -1027,13 +1027,13 @@  discard block
 block discarded – undo
1027 1027
             if ($data === 'stat_languages') {
1028 1028
                 $tmp = '';
1029 1029
                 foreach ($stats_data[$data] as $key => $value) {
1030
-                    $tmp .= $tmp === '' ? $key . '-' . $value : ',' . $key . '-' . $value;
1030
+                    $tmp .= $tmp === '' ? $key.'-'.$value : ','.$key.'-'.$value;
1031 1031
                 }
1032 1032
                 $statsToSend[$data] = $tmp;
1033 1033
             } elseif ($data === 'stat_country') {
1034 1034
                 $tmp = '';
1035 1035
                 foreach ($stats_data[$data] as $key => $value) {
1036
-                    $tmp .= $tmp === '' ? $key . '-' . $value : ',' . $key . '-' . $value;
1036
+                    $tmp .= $tmp === '' ? $key.'-'.$value : ','.$key.'-'.$value;
1037 1037
                 }
1038 1038
                 $statsToSend[$data] = $tmp;
1039 1039
             } else {
@@ -1107,8 +1107,8 @@  discard block
 block discarded – undo
1107 1107
             if (strpos($line, 'cpassman_url') > 0 && empty($url_found) === true) {
1108 1108
                 $url_found = substr($line, 19, strlen($line) - 22);
1109 1109
                 $tmp = parse_url($url_found);
1110
-                $anonym_url = $tmp['scheme'] . '://<anonym_url>' . $tmp['path'];
1111
-                $line = "'cpassman_url' => '" . $anonym_url . "\n";
1110
+                $anonym_url = $tmp['scheme'].'://<anonym_url>'.$tmp['path'];
1111
+                $line = "'cpassman_url' => '".$anonym_url."\n";
1112 1112
             }
1113 1113
 
1114 1114
             // Anonymize all urls
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
     $teampass_errors = '';
1136 1136
     $rows = DB::query(
1137 1137
         'SELECT label, date AS error_date
1138
-        FROM ' . prefixTable('log_system') . "
1138
+        FROM ' . prefixTable('log_system')."
1139 1139
         WHERE `type` LIKE 'error'
1140 1140
         ORDER BY `date` DESC
1141 1141
         LIMIT 0, 10"
@@ -1143,9 +1143,9 @@  discard block
 block discarded – undo
1143 1143
     if (DB::count() > 0) {
1144 1144
         foreach ($rows as $record) {
1145 1145
             if (empty($teampass_errors) === true) {
1146
-                $teampass_errors = ' * ' . date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['error_date']) . ' - ' . $record['label'];
1146
+                $teampass_errors = ' * '.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['error_date']).' - '.$record['label'];
1147 1147
             } else {
1148
-                $teampass_errors .= ' * ' . date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['error_date']) . ' - ' . $record['label'];
1148
+                $teampass_errors .= ' * '.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['error_date']).' - '.$record['label'];
1149 1149
             }
1150 1150
         }
1151 1151
     }
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
 
1155 1155
     // Now prepare text
1156 1156
     $txt = '### Page on which it happened
1157
-' . $post_data['current_page'] . '
1157
+' . $post_data['current_page'].'
1158 1158
 
1159 1159
 ### Steps to reproduce
1160 1160
 1.
@@ -1169,39 +1169,39 @@  discard block
 block discarded – undo
1169 1169
 Tell us what happens instead
1170 1170
 
1171 1171
 ### Server configuration
1172
-**Operating system**: ' . php_uname() . '
1172
+**Operating system**: ' . php_uname().'
1173 1173
 
1174
-**Web server:** ' . $_SERVER['SERVER_SOFTWARE'] . '
1174
+**Web server:** ' . $_SERVER['SERVER_SOFTWARE'].'
1175 1175
 
1176
-**Database:** ' . ($link === false ? langHdl('undefined') : mysqli_get_server_info($link)) . '
1176
+**Database:** ' . ($link === false ? langHdl('undefined') : mysqli_get_server_info($link)).'
1177 1177
 
1178
-**PHP version:** ' . PHP_VERSION . '
1178
+**PHP version:** ' . PHP_VERSION.'
1179 1179
 
1180
-**Teampass version:** ' . TP_VERSION_FULL . '
1180
+**Teampass version:** ' . TP_VERSION_FULL.'
1181 1181
 
1182 1182
 **Teampass configuration file:**
1183 1183
 ```
1184
-' . $list_of_options . '
1184
+' . $list_of_options.'
1185 1185
 ```
1186 1186
 
1187 1187
 **Updated from an older Teampass or fresh install:**
1188 1188
 
1189 1189
 ### Client configuration
1190 1190
 
1191
-**Browser:** ' . $post_data['browser_name'] . ' - ' . $post_data['browser_version'] . '
1191
+**Browser:** ' . $post_data['browser_name'].' - '.$post_data['browser_version'].'
1192 1192
 
1193
-**Operating system:** ' . $post_data['os'] . ' - ' . $post_data['os_archi'] . 'bits
1193
+**Operating system:** ' . $post_data['os'].' - '.$post_data['os_archi'].'bits
1194 1194
 
1195 1195
 ### Logs
1196 1196
 
1197 1197
 #### Web server error log
1198 1198
 ```
1199
-' . $err['message'] . ' - ' . $err['file'] . ' (' . $err['line'] . ')
1199
+' . $err['message'].' - '.$err['file'].' ('.$err['line'].')
1200 1200
 ```
1201 1201
 
1202 1202
 #### Teampass 10 last system errors
1203 1203
 ```
1204
-' . $teampass_errors . '
1204
+' . $teampass_errors.'
1205 1205
 ```
1206 1206
 
1207 1207
 #### Log from the web-browser developer console (CTRL + SHIFT + i)
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
         // Check if user exists
1231 1231
         $userInfo = DB::queryFirstRow(
1232 1232
             'SELECT public_key, private_key, pw, auth_type
1233
-            FROM ' . prefixTable('users') . '
1233
+            FROM ' . prefixTable('users').'
1234 1234
             WHERE id = %i',
1235 1235
             $post_user_id
1236 1236
         );
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
             // Get one item
1239 1239
             $record = DB::queryFirstRow(
1240 1240
                 'SELECT object_id
1241
-                FROM ' . prefixTable('sharekeys_items') . '
1241
+                FROM ' . prefixTable('sharekeys_items').'
1242 1242
                 WHERE user_id = %i',
1243 1243
                 $post_user_id
1244 1244
             );
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
             // Get itemKey from current user
1247 1247
             $currentUserKey = DB::queryFirstRow(
1248 1248
                 'SELECT share_key, increment_id
1249
-                FROM ' . prefixTable('sharekeys_items') . '
1249
+                FROM ' . prefixTable('sharekeys_items').'
1250 1250
                 WHERE object_id = %i AND user_id = %i',
1251 1251
                 $record['object_id'],
1252 1252
                 $post_user_id
@@ -1274,7 +1274,7 @@  discard block
 block discarded – undo
1274 1274
             
1275 1275
             // Use the password check
1276 1276
             // load passwordLib library
1277
-            $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'] . '/includes/libraries');
1277
+            $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'].'/includes/libraries');
1278 1278
             $pwdlib->register();
1279 1279
             $pwdlib = new PasswordLib\PasswordLib();
1280 1280
             
@@ -1333,7 +1333,7 @@  discard block
 block discarded – undo
1333 1333
         // Get user info
1334 1334
         $userData = DB::queryFirstRow(
1335 1335
             'SELECT private_key
1336
-            FROM ' . prefixTable('users') . '
1336
+            FROM ' . prefixTable('users').'
1337 1337
             WHERE id = %i',
1338 1338
             $post_user_id
1339 1339
         );
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
             );
1361 1361
 
1362 1362
             // Load superGlobals
1363
-            include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1363
+            include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1364 1364
             $superGlobal = new protect\SuperGlobal\SuperGlobal();
1365 1365
 
1366 1366
             $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
         );
@@ -1540,7 +1540,7 @@  discard block
 block discarded – undo
1540 1540
         // Get user info
1541 1541
         $userData = DB::queryFirstRow(
1542 1542
             'SELECT email, auth_type, login
1543
-            FROM ' . prefixTable('users') . '
1543
+            FROM ' . prefixTable('users').'
1544 1544
             WHERE id = %i',
1545 1545
             $post_user_id
1546 1546
         );
@@ -1606,13 +1606,13 @@  discard block
 block discarded – undo
1606 1606
         // Check if user exists
1607 1607
         DB::queryFirstRow(
1608 1608
             'SELECT *
1609
-            FROM ' . prefixTable('users') . '
1609
+            FROM ' . prefixTable('users').'
1610 1610
             WHERE id = %i',
1611 1611
             $post_user_id
1612 1612
         );
1613 1613
         if (DB::count() > 0) {
1614 1614
             // Include libraries
1615
-            include_once $SETTINGS['cpassman_dir'] . '/sources/aes.functions.php';
1615
+            include_once $SETTINGS['cpassman_dir'].'/sources/aes.functions.php';
1616 1616
 
1617 1617
             // CLear old sharekeys
1618 1618
             if ($post_self_change === false) {
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
         // Check if user exists
1668 1668
         $userInfo = DB::queryFirstRow(
1669 1669
             'SELECT public_key
1670
-            FROM ' . prefixTable('users') . '
1670
+            FROM ' . prefixTable('users').'
1671 1671
             WHERE id = %i',
1672 1672
             $post_user_id
1673 1673
         );
@@ -1677,7 +1677,7 @@  discard block
 block discarded – undo
1677 1677
             $next_action = '';
1678 1678
 
1679 1679
             // Include libraries
1680
-            include_once $SETTINGS['cpassman_dir'] . '/sources/aes.functions.php';
1680
+            include_once $SETTINGS['cpassman_dir'].'/sources/aes.functions.php';
1681 1681
 
1682 1682
             // WHAT STEP TO PERFORM?
1683 1683
             if ($post_action === 'step0') {
@@ -1840,15 +1840,15 @@  discard block
 block discarded – undo
1840 1840
     // Loop on items
1841 1841
     $rows = DB::query(
1842 1842
         'SELECT id, pw
1843
-        FROM ' . prefixTable('items') . '
1843
+        FROM ' . prefixTable('items').'
1844 1844
         WHERE perso = 0
1845
-        LIMIT ' . $post_start . ', ' . $post_length
1845
+        LIMIT ' . $post_start.', '.$post_length
1846 1846
     );
1847 1847
     foreach ($rows as $record) {
1848 1848
         // Get itemKey from current user
1849 1849
         $currentUserKey = DB::queryFirstRow(
1850 1850
             'SELECT share_key, increment_id
1851
-            FROM ' . prefixTable('sharekeys_items') . '
1851
+            FROM ' . prefixTable('sharekeys_items').'
1852 1852
             WHERE object_id = %i AND user_id = %i',
1853 1853
             $record['id'],
1854 1854
             $_SESSION['user_id']
@@ -1876,7 +1876,7 @@  discard block
 block discarded – undo
1876 1876
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
1877 1877
                 $currentUserKey = DB::queryFirstRow(
1878 1878
                     'SELECT increment_id
1879
-                    FROM ' . prefixTable('sharekeys_items') . '
1879
+                    FROM ' . prefixTable('sharekeys_items').'
1880 1880
                     WHERE object_id = %i AND user_id = %i',
1881 1881
                     $record['id'],
1882 1882
                     $post_user_id
@@ -1909,7 +1909,7 @@  discard block
 block discarded – undo
1909 1909
     // SHould we change step?
1910 1910
     DB::query(
1911 1911
         'SELECT *
1912
-        FROM ' . prefixTable('items') . '
1912
+        FROM ' . prefixTable('items').'
1913 1913
         WHERE perso = 0'
1914 1914
     );
1915 1915
 
@@ -1933,15 +1933,15 @@  discard block
 block discarded – undo
1933 1933
     // Loop on logs
1934 1934
     $rows = DB::query(
1935 1935
         'SELECT increment_id
1936
-        FROM ' . prefixTable('log_items') . '
1936
+        FROM ' . prefixTable('log_items').'
1937 1937
         WHERE raison LIKE "at_pw :%" AND encryption_type = "teampass_aes"
1938
-        LIMIT ' . $post_start . ', ' . $post_length
1938
+        LIMIT ' . $post_start.', '.$post_length
1939 1939
     );
1940 1940
     foreach ($rows as $record) {
1941 1941
         // Get itemKey from current user
1942 1942
         $currentUserKey = DB::queryFirstRow(
1943 1943
             'SELECT share_key
1944
-            FROM ' . prefixTable('sharekeys_logs') . '
1944
+            FROM ' . prefixTable('sharekeys_logs').'
1945 1945
             WHERE object_id = %i AND user_id = %i',
1946 1946
             $record['increment_id'],
1947 1947
             $_SESSION['user_id']
@@ -1968,7 +1968,7 @@  discard block
 block discarded – undo
1968 1968
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
1969 1969
                 $currentUserKey = DB::queryFirstRow(
1970 1970
                     'SELECT increment_id
1971
-                    FROM ' . prefixTable('sharekeys_items') . '
1971
+                    FROM ' . prefixTable('sharekeys_items').'
1972 1972
                     WHERE object_id = %i AND user_id = %i',
1973 1973
                     $record['id'],
1974 1974
                     $post_user_id
@@ -1990,7 +1990,7 @@  discard block
 block discarded – undo
1990 1990
     // SHould we change step?
1991 1991
     DB::query(
1992 1992
         'SELECT increment_id
1993
-        FROM ' . prefixTable('log_items') . '
1993
+        FROM ' . prefixTable('log_items').'
1994 1994
         WHERE raison LIKE "at_pw :%" AND encryption_type = "teampass_aes"'
1995 1995
     );
1996 1996
 
@@ -2014,15 +2014,15 @@  discard block
 block discarded – undo
2014 2014
     // Loop on fields
2015 2015
     $rows = DB::query(
2016 2016
         'SELECT id
2017
-        FROM ' . prefixTable('categories_items') . '
2017
+        FROM ' . prefixTable('categories_items').'
2018 2018
         WHERE encryption_type = "teampass_aes"
2019
-        LIMIT ' . $post_start . ', ' . $post_length
2019
+        LIMIT ' . $post_start.', '.$post_length
2020 2020
     );
2021 2021
     foreach ($rows as $record) {
2022 2022
         // Get itemKey from current user
2023 2023
         $currentUserKey = DB::queryFirstRow(
2024 2024
             'SELECT share_key
2025
-            FROM ' . prefixTable('sharekeys_fields') . '
2025
+            FROM ' . prefixTable('sharekeys_fields').'
2026 2026
             WHERE object_id = %i AND user_id = %i',
2027 2027
             $record['id'],
2028 2028
             $_SESSION['user_id']
@@ -2049,7 +2049,7 @@  discard block
 block discarded – undo
2049 2049
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2050 2050
                 $currentUserKey = DB::queryFirstRow(
2051 2051
                     'SELECT increment_id
2052
-                    FROM ' . prefixTable('sharekeys_items') . '
2052
+                    FROM ' . prefixTable('sharekeys_items').'
2053 2053
                     WHERE object_id = %i AND user_id = %i',
2054 2054
                     $record['id'],
2055 2055
                     $post_user_id
@@ -2071,7 +2071,7 @@  discard block
 block discarded – undo
2071 2071
     // SHould we change step?
2072 2072
     DB::query(
2073 2073
         'SELECT *
2074
-        FROM ' . prefixTable('categories_items') . '
2074
+        FROM ' . prefixTable('categories_items').'
2075 2075
         WHERE encryption_type = "teampass_aes"'
2076 2076
     );
2077 2077
 
@@ -2095,14 +2095,14 @@  discard block
 block discarded – undo
2095 2095
     // Loop on suggestions
2096 2096
     $rows = DB::query(
2097 2097
         'SELECT id
2098
-        FROM ' . prefixTable('suggestion') . '
2099
-        LIMIT ' . $post_start . ', ' . $post_length
2098
+        FROM ' . prefixTable('suggestion').'
2099
+        LIMIT ' . $post_start.', '.$post_length
2100 2100
     );
2101 2101
     foreach ($rows as $record) {
2102 2102
         // Get itemKey from current user
2103 2103
         $currentUserKey = DB::queryFirstRow(
2104 2104
             'SELECT share_key
2105
-            FROM ' . prefixTable('sharekeys_suggestions') . '
2105
+            FROM ' . prefixTable('sharekeys_suggestions').'
2106 2106
             WHERE object_id = %i AND user_id = %i',
2107 2107
             $record['id'],
2108 2108
             $_SESSION['user_id']
@@ -2129,7 +2129,7 @@  discard block
 block discarded – undo
2129 2129
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2130 2130
                 $currentUserKey = DB::queryFirstRow(
2131 2131
                     'SELECT increment_id
2132
-                    FROM ' . prefixTable('sharekeys_items') . '
2132
+                    FROM ' . prefixTable('sharekeys_items').'
2133 2133
                     WHERE object_id = %i AND user_id = %i',
2134 2134
                     $record['id'],
2135 2135
                     $post_user_id
@@ -2174,15 +2174,15 @@  discard block
 block discarded – undo
2174 2174
     // Loop on files
2175 2175
     $rows = DB::query(
2176 2176
         'SELECT id
2177
-        FROM ' . prefixTable('files') . '
2178
-        WHERE status = "' . TP_ENCRYPTION_NAME . '"
2179
-        LIMIT ' . $post_start . ', ' . $post_length
2177
+        FROM ' . prefixTable('files').'
2178
+        WHERE status = "' . TP_ENCRYPTION_NAME.'"
2179
+        LIMIT ' . $post_start.', '.$post_length
2180 2180
     ); //aes_encryption
2181 2181
     foreach ($rows as $record) {
2182 2182
         // Get itemKey from current user
2183 2183
         $currentUserKey = DB::queryFirstRow(
2184 2184
             'SELECT share_key
2185
-            FROM ' . prefixTable('sharekeys_files') . '
2185
+            FROM ' . prefixTable('sharekeys_files').'
2186 2186
             WHERE object_id = %i AND user_id = %i',
2187 2187
             $record['id'],
2188 2188
             $_SESSION['user_id']
@@ -2209,7 +2209,7 @@  discard block
 block discarded – undo
2209 2209
             if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2210 2210
                 $currentUserKey = DB::queryFirstRow(
2211 2211
                     'SELECT increment_id
2212
-                    FROM ' . prefixTable('sharekeys_items') . '
2212
+                    FROM ' . prefixTable('sharekeys_items').'
2213 2213
                     WHERE object_id = %i AND user_id = %i',
2214 2214
                     $record['id'],
2215 2215
                     $post_user_id
@@ -2231,8 +2231,8 @@  discard block
 block discarded – undo
2231 2231
     // SHould we change step?
2232 2232
     DB::query(
2233 2233
         'SELECT *
2234
-        FROM ' . prefixTable('files') . '
2235
-        WHERE status = "' . TP_ENCRYPTION_NAME . '"'
2234
+        FROM ' . prefixTable('files').'
2235
+        WHERE status = "' . TP_ENCRYPTION_NAME.'"'
2236 2236
     );
2237 2237
 
2238 2238
     $next_start = (int) $post_start + (int) $post_length;
@@ -2264,16 +2264,16 @@  discard block
 block discarded – undo
2264 2264
     if (count($_SESSION['personal_folders']) > 0) {
2265 2265
         $rows = DB::query(
2266 2266
             'SELECT id, pw
2267
-            FROM ' . prefixTable('items') . '
2267
+            FROM ' . prefixTable('items').'
2268 2268
             WHERE perso = 1 AND id_tree IN %ls
2269
-            LIMIT ' . $post_start . ', ' . $post_length,
2269
+            LIMIT ' . $post_start.', '.$post_length,
2270 2270
             $_SESSION['personal_folders']
2271 2271
         );
2272 2272
         foreach ($rows as $record) {
2273 2273
             // Get itemKey from current user
2274 2274
             $currentUserKey = DB::queryFirstRow(
2275 2275
                 'SELECT share_key, increment_id
2276
-                FROM ' . prefixTable('sharekeys_items') . '
2276
+                FROM ' . prefixTable('sharekeys_items').'
2277 2277
                 WHERE object_id = %i AND user_id = %i',
2278 2278
                 $record['id'],
2279 2279
                 $_SESSION['user_id']
@@ -2300,7 +2300,7 @@  discard block
 block discarded – undo
2300 2300
                 if ((int) $post_user_id !== (int) $_SESSION['user_id']) {
2301 2301
                     $currentUserKey = DB::queryFirstRow(
2302 2302
                         'SELECT increment_id
2303
-                        FROM ' . prefixTable('sharekeys_items') . '
2303
+                        FROM ' . prefixTable('sharekeys_items').'
2304 2304
                         WHERE object_id = %i AND user_id = %i',
2305 2305
                         $record['id'],
2306 2306
                         $post_user_id
@@ -2323,7 +2323,7 @@  discard block
 block discarded – undo
2323 2323
     // SHould we change step?
2324 2324
     DB::query(
2325 2325
         'SELECT *
2326
-        FROM ' . prefixTable('items') . '
2326
+        FROM ' . prefixTable('items').'
2327 2327
         WHERE perso = 0'
2328 2328
     );
2329 2329
 
@@ -2347,7 +2347,7 @@  discard block
 block discarded – undo
2347 2347
         // Check if user exists
2348 2348
         $userInfo = DB::queryFirstRow(
2349 2349
             'SELECT public_key, encrypted_psk
2350
-            FROM ' . prefixTable('users') . '
2350
+            FROM ' . prefixTable('users').'
2351 2351
             WHERE id = %i',
2352 2352
             $post_user_id
2353 2353
         );
@@ -2373,9 +2373,9 @@  discard block
 block discarded – undo
2373 2373
                 // Loop on persoanl items
2374 2374
                 $rows = DB::query(
2375 2375
                     'SELECT id, pw
2376
-                    FROM ' . prefixTable('items') . '
2376
+                    FROM ' . prefixTable('items').'
2377 2377
                     WHERE perso = 1 AND id_tree IN %ls
2378
-                    LIMIT ' . $post_start . ', ' . $post_length,
2378
+                    LIMIT ' . $post_start.', '.$post_length,
2379 2379
                     $_SESSION['personal_folders']
2380 2380
                 );
2381 2381
                 $countUserPersonalItems = DB::count();
@@ -2418,7 +2418,7 @@  discard block
 block discarded – undo
2418 2418
                         // Loop on files
2419 2419
                         $rows = DB::query(
2420 2420
                             'SELECT id, file
2421
-                            FROM ' . prefixTable('files') . '
2421
+                            FROM ' . prefixTable('files').'
2422 2422
                             WHERE status != %s
2423 2423
                             AND id_item = %i',
2424 2424
                             TP_ENCRYPTION_NAME,
@@ -2429,14 +2429,14 @@  discard block
 block discarded – undo
2429 2429
                             // Now decrypt the file
2430 2430
                             prepareFileWithDefuse(
2431 2431
                                 'decrypt',
2432
-                                $SETTINGS['path_to_upload_folder'] . '/' . $record2['file'],
2433
-                                $SETTINGS['path_to_upload_folder'] . '/' . $record2['file'] . '.delete',
2432
+                                $SETTINGS['path_to_upload_folder'].'/'.$record2['file'],
2433
+                                $SETTINGS['path_to_upload_folder'].'/'.$record2['file'].'.delete',
2434 2434
                                 $SETTINGS,
2435 2435
                                 $post_user_psk
2436 2436
                             );
2437 2437
 
2438 2438
                             // Encrypt the file
2439
-                            $encryptedFile = encryptFile($record2['file'] . '.delete', $SETTINGS['path_to_upload_folder']);
2439
+                            $encryptedFile = encryptFile($record2['file'].'.delete', $SETTINGS['path_to_upload_folder']);
2440 2440
 
2441 2441
                             DB::update(
2442 2442
                                 prefixTable('files'),
@@ -2459,7 +2459,7 @@  discard block
 block discarded – undo
2459 2459
                             );
2460 2460
 
2461 2461
                             // Unlink original file
2462
-                            unlink($SETTINGS['path_to_upload_folder'] . '/' . $record2['file']);
2462
+                            unlink($SETTINGS['path_to_upload_folder'].'/'.$record2['file']);
2463 2463
                         }
2464 2464
                     }
2465 2465
                 }
@@ -2531,7 +2531,7 @@  discard block
 block discarded – undo
2531 2531
         // Get user info
2532 2532
         $userData = DB::queryFirstRow(
2533 2533
             'SELECT '.$post_fields.'
2534
-            FROM ' . prefixTable('users') . '
2534
+            FROM ' . prefixTable('users').'
2535 2535
             WHERE id = %i',
2536 2536
             $post_user_id
2537 2537
         );
@@ -2568,7 +2568,7 @@  discard block
 block discarded – undo
2568 2568
         // Get user info
2569 2569
         $userData = DB::queryFirstRow(
2570 2570
             'SELECT auth_type, login, private_key
2571
-            FROM ' . prefixTable('users') . '
2571
+            FROM ' . prefixTable('users').'
2572 2572
             WHERE id = %i',
2573 2573
             $post_user_id
2574 2574
         );
@@ -2579,7 +2579,7 @@  discard block
 block discarded – undo
2579 2579
             $privateKey = decryptPrivateKey($post_current_pwd, $userData['private_key']);
2580 2580
 
2581 2581
             // Load superGlobals
2582
-            include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2582
+            include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2583 2583
             $superGlobal = new protect\SuperGlobal\SuperGlobal();
2584 2584
 
2585 2585
             if ($superGlobal->get('private_key', 'SESSION', 'user') === $privateKey) {
@@ -2613,7 +2613,7 @@  discard block
 block discarded – undo
2613 2613
     $SETTINGS['cpassman_dir'],
2614 2614
                     array(
2615 2615
                         'error' => false,
2616
-                        'message' => langHdl('done'),'',
2616
+                        'message' => langHdl('done'), '',
2617 2617
                     ),
2618 2618
                     'encode'
2619 2619
                 );
@@ -2653,7 +2653,7 @@  discard block
 block discarded – undo
2653 2653
         // Get user info
2654 2654
         $userData = DB::queryFirstRow(
2655 2655
             'SELECT auth_type, login, private_key, special
2656
-            FROM ' . prefixTable('users') . '
2656
+            FROM ' . prefixTable('users').'
2657 2657
             WHERE id = %i',
2658 2658
             $post_user_id
2659 2659
         );
@@ -2683,7 +2683,7 @@  discard block
 block discarded – undo
2683 2683
                 );
2684 2684
 
2685 2685
                 // Load superGlobals
2686
-                include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2686
+                include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2687 2687
                 $superGlobal = new protect\SuperGlobal\SuperGlobal();
2688 2688
                 $superGlobal->put('private_key', $privateKey, 'SESSION', 'user');
2689 2689
 
@@ -2691,7 +2691,7 @@  discard block
 block discarded – undo
2691 2691
     $SETTINGS['cpassman_dir'],
2692 2692
                     array(
2693 2693
                         'error' => false,
2694
-                        'message' => langHdl('done'),'',
2694
+                        'message' => langHdl('done'), '',
2695 2695
                     ),
2696 2696
                     'encode'
2697 2697
                 );
@@ -2716,14 +2716,14 @@  discard block
 block discarded – undo
2716 2716
             // Get one item
2717 2717
             $record = DB::queryFirstRow(
2718 2718
                 'SELECT id, pw
2719
-                FROM ' . prefixTable('items') . '
2719
+                FROM ' . prefixTable('items').'
2720 2720
                 WHERE perso = 0'
2721 2721
             );
2722 2722
 
2723 2723
             // Get itemKey from current user
2724 2724
             $currentUserKey = DB::queryFirstRow(
2725 2725
                 'SELECT share_key, increment_id
2726
-                FROM ' . prefixTable('sharekeys_items') . '
2726
+                FROM ' . prefixTable('sharekeys_items').'
2727 2727
                 WHERE object_id = %i AND user_id = %i',
2728 2728
                 $record['id'],
2729 2729
                 $post_user_id
@@ -2751,7 +2751,7 @@  discard block
 block discarded – undo
2751 2751
                     );
2752 2752
                     
2753 2753
                     // Load superGlobals
2754
-                    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2754
+                    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
2755 2755
                     $superGlobal = new protect\SuperGlobal\SuperGlobal();
2756 2756
                     $superGlobal->put('private_key', $privateKey, 'SESSION', 'user');
2757 2757
 
@@ -2808,7 +2808,7 @@  discard block
 block discarded – undo
2808 2808
             $_SESSION['user_id']
2809 2809
         );
2810 2810
         // Return data
2811
-        return '[{"new_value":"' . $_SESSION['sessionDuration'] . '"}]';
2811
+        return '[{"new_value":"'.$_SESSION['sessionDuration'].'"}]';
2812 2812
     }
2813 2813
     
2814 2814
     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.