Passed
Push — master ( e824e6...9b9d31 )
by Nils
05:57
created
api/inc/encryption_utils.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 function encrypt_with_session_key(string $data, string $key)
48 48
 {
49 49
     if (strlen($key) !== 32) {
50
-        error_log('[API] encrypt_with_session_key: Invalid key length. Expected 32 bytes, got ' . strlen($key));
50
+        error_log('[API] encrypt_with_session_key: Invalid key length. Expected 32 bytes, got '.strlen($key));
51 51
         return false;
52 52
     }
53 53
 
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 
75 75
         // Combine nonce + tag + ciphertext and encode in base64
76 76
         // Format: [12 bytes nonce][16 bytes tag][variable ciphertext]
77
-        return base64_encode($nonce . $tag . $ciphertext);
77
+        return base64_encode($nonce.$tag.$ciphertext);
78 78
 
79 79
     } catch (Exception $e) {
80
-        error_log('[API] encrypt_with_session_key: Exception - ' . $e->getMessage());
80
+        error_log('[API] encrypt_with_session_key: Exception - '.$e->getMessage());
81 81
         return false;
82 82
     }
83 83
 }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 function decrypt_with_session_key(string $encryptedData, string $key)
96 96
 {
97 97
     if (strlen($key) !== 32) {
98
-        error_log('[API] decrypt_with_session_key: Invalid key length. Expected 32 bytes, got ' . strlen($key));
98
+        error_log('[API] decrypt_with_session_key: Invalid key length. Expected 32 bytes, got '.strlen($key));
99 99
         return false;
100 100
     }
101 101
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         return $plaintext;
137 137
 
138 138
     } catch (Exception $e) {
139
-        error_log('[API] decrypt_with_session_key: Exception - ' . $e->getMessage());
139
+        error_log('[API] decrypt_with_session_key: Exception - '.$e->getMessage());
140 140
         return false;
141 141
     }
142 142
 }
Please login to merge, or discard this patch.
pages/api.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('api') === false) {
70 70
     // Not allowed page
71 71
     $session->set('system-error_code', ERR_NOT_ALLOWED);
72
-    include $SETTINGS['cpassman_dir'] . '/error.php';
72
+    include $SETTINGS['cpassman_dir'].'/error.php';
73 73
     exit;
74 74
 }
75 75
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                                     <?php
161 161
                                     $rowsKeys = DB::query(
162 162
                                         'SELECT *
163
-                                        FROM ' . prefixTable('api') . '
163
+                                        FROM ' . prefixTable('api').'
164 164
                                         WHERE type = %s
165 165
                                         ORDER BY timestamp ASC',
166 166
                                         'key'
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
                                             <?php
184 184
                                             foreach ($rowsKeys as $key) {
185 185
                                                 echo '
186
-                                                    <tr data-id="' . $key['increment_id'] . '">
187
-                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . $lang->get('del_button') . '"></i></td>
188
-                                                    <td><span class="edit-api-key pointer">' . $key['label'] . '</span></td>
189
-                                                    <td>' . $key['value']. '</td>   
190
-                                                    <td><i class="fas '.((int) $key['enabled'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="enabled" data-increment-id="' . $key['increment_id'] . '"></i></td>
191
-                                                    <td><i class="fas '.((int) $key['allowed_to_create'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_create" data-increment-id="' . $key['increment_id'] . '"></i></td>
192
-                                                    <td><i class="fas '.((int) $key['allowed_to_read'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_read" data-increment-id="' . $key['increment_id'] . '"></i></td>
193
-                                                    <td><i class="fas '.((int) $key['allowed_to_update'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_update" data-increment-id="' . $key['increment_id'] . '"></i></td>
194
-                                                    <td><i class="fas '.((int) $key['allowed_to_delete'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_delete" data-increment-id="' . $key['increment_id'] . '"></i></td>                   
186
+                                                    <tr data-id="' . $key['increment_id'].'">
187
+                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . $lang->get('del_button').'"></i></td>
188
+                                                    <td><span class="edit-api-key pointer">' . $key['label'].'</span></td>
189
+                                                    <td>' . $key['value'].'</td>   
190
+                                                    <td><i class="fas '.((int) $key['enabled'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="enabled" data-increment-id="'.$key['increment_id'].'"></i></td>
191
+                                                    <td><i class="fas '.((int) $key['allowed_to_create'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_create" data-increment-id="'.$key['increment_id'].'"></i></td>
192
+                                                    <td><i class="fas '.((int) $key['allowed_to_read'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_read" data-increment-id="'.$key['increment_id'].'"></i></td>
193
+                                                    <td><i class="fas '.((int) $key['allowed_to_update'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_update" data-increment-id="'.$key['increment_id'].'"></i></td>
194
+                                                    <td><i class="fas '.((int) $key['allowed_to_delete'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_delete" data-increment-id="'.$key['increment_id'].'"></i></td>                   
195 195
                                                 </tr>';
196 196
                                             } ?>
197 197
                                         </tbody>
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                                 <div class="col-12 mt-4" id="table-api-ip">
227 227
                                     <?php
228 228
                                     $rowsIps = DB::query(
229
-                                                'SELECT increment_id, label, timestamp value FROM ' . prefixTable('api') . '
229
+                                                'SELECT increment_id, label, timestamp value FROM '.prefixTable('api').'
230 230
                                                 WHERE type = %s
231 231
                                                 ORDER BY timestamp ASC',
232 232
                                                 'ip'
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
                                             <?php
245 245
                                             foreach ($rowsIps as $ip) {
246 246
                                                 echo '
247
-                                                <tr data-id="' . $ip['increment_id'] . '">
248
-                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . $lang->get('del_button') . '"></i></td>
249
-                                                    <td><span class="edit-api-ip pointer" data-field="label">' . $ip['label'] . '</span></td>
250
-                                                    <td><span class="edit-api-ip pointer" data-field="value">' . $ip['value'] . '</span></td>
247
+                                                <tr data-id="' . $ip['increment_id'].'">
248
+                                                    <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . $lang->get('del_button').'"></i></td>
249
+                                                    <td><span class="edit-api-ip pointer" data-field="label">' . $ip['label'].'</span></td>
250
+                                                    <td><span class="edit-api-ip pointer" data-field="value">' . $ip['value'].'</span></td>
251 251
                                                 </tr>';
252 252
                                             } ?>
253 253
                                         </tbody>
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
                                     <?php
292 292
                                     $rowsKeys = DB::query(
293 293
                                         'SELECT a.*, u.name, u.lastname, u.login
294
-                                        FROM ' . prefixTable('api') . ' AS a
295
-                                        INNER JOIN ' . prefixTable('users') . ' AS u ON a.user_id = u.id
294
+                                        FROM ' . prefixTable('api').' AS a
295
+                                        INNER JOIN ' . prefixTable('users').' AS u ON a.user_id = u.id
296 296
                                         WHERE a.type = %s AND u.disabled = %i AND u.deleted_at IS NULL AND u.id NOT IN %li AND u.admin = %i
297 297
                                         ORDER BY u.login ASC',
298 298
                                         'user',
@@ -316,13 +316,13 @@  discard block
 block discarded – undo
316 316
                                             <?php
317 317
                                             foreach ($rowsKeys as $key) {
318 318
                                                 echo '
319
-                                                    <tr data-id="' . $key['increment_id'] . '">
320
-                                                    <td>' . $key['name'] . ' ' . $key['lastname'] . ' (<i>'.$key['login'].'</i>)</td>
321
-                                                    <td><i class="fas '.((int) $key['enabled'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="enabled" data-increment-id="' . $key['increment_id'] . '"></i></td>
322
-                                                    <td><i class="fas '.((int) $key['allowed_to_create'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_create" data-increment-id="' . $key['increment_id'] . '"></i></td>
323
-                                                    <td><i class="fas '.((int) $key['allowed_to_read'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_read" data-increment-id="' . $key['increment_id'] . '"></i></td>
324
-                                                    <td><i class="fas '.((int) $key['allowed_to_update'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_update" data-increment-id="' . $key['increment_id'] . '"></i></td>
325
-                                                    <td><i class="fas '.((int) $key['allowed_to_delete'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_delete" data-increment-id="' . $key['increment_id'] . '"></i></td>
319
+                                                    <tr data-id="' . $key['increment_id'].'">
320
+                                                    <td>' . $key['name'].' '.$key['lastname'].' (<i>'.$key['login'].'</i>)</td>
321
+                                                    <td><i class="fas '.((int) $key['enabled'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="enabled" data-increment-id="'.$key['increment_id'].'"></i></td>
322
+                                                    <td><i class="fas '.((int) $key['allowed_to_create'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_create" data-increment-id="'.$key['increment_id'].'"></i></td>
323
+                                                    <td><i class="fas '.((int) $key['allowed_to_read'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_read" data-increment-id="'.$key['increment_id'].'"></i></td>
324
+                                                    <td><i class="fas '.((int) $key['allowed_to_update'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_update" data-increment-id="'.$key['increment_id'].'"></i></td>
325
+                                                    <td><i class="fas '.((int) $key['allowed_to_delete'] === 1 ? 'fa-toggle-on text-info' : 'fa-toggle-off').' mr-1 text-center pointer api-clickme-action" data-field="allowed_to_delete" data-increment-id="'.$key['increment_id'].'"></i></td>
326 326
                                                 </tr>';
327 327
                                             } ?>
328 328
                                         </tbody>
Please login to merge, or discard this patch.
pages/options.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('options') === false) {
70 70
     // Not allowed page
71 71
     $session->set('system-error_code', ERR_NOT_ALLOWED);
72
-    include $SETTINGS['cpassman_dir'] . '/error.php';
72
+    include $SETTINGS['cpassman_dir'].'/error.php';
73 73
     exit;
74 74
 }
75 75
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                                     // get list of all timezones
253 253
                                     foreach ($zones as $key => $zone) {
254 254
                                         echo '
255
-                                <option value="' . $key . '"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>' . $zone . '</option>';
255
+                                <option value="' . $key.'"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>'.$zone.'</option>';
256 256
                                     }
257 257
                                     ?>
258 258
                                 </select>
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                                     $languagesList = $languagesList ?? [];
305 305
                                     foreach ($languagesList as $teampassLang) {
306 306
                                         echo '
307
-                                <option value="' . $teampassLang . '"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>' . $teampassLang . '</option>';
307
+                                <option value="' . $teampassLang.'"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>'.$teampassLang.'</option>';
308 308
                                     }
309 309
                                     ?>
310 310
                                 </select>
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
                                         $roles = getRolesTitles();
930 930
                                         foreach ($roles as $role) {
931 931
                                             echo '
932
-                                    <option value="' . htmlspecialchars($role['id']) . '"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>' . htmlspecialchars(addslashes($role['title'])) . '</option>';
932
+                                    <option value="' . htmlspecialchars($role['id']).'"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>'.htmlspecialchars(addslashes($role['title'])).'</option>';
933 933
                                         }
934 934
                                     }
935 935
                                     ?>
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
                                     <?php
968 968
                                     foreach (TP_PW_COMPLEXITY as $complex) {
969 969
                                         echo '
970
-                                <option value="' . $complex[0] . '"', isset($SETTINGS['offline_key_level']) === true && (int) $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>';
970
+                                <option value="' . $complex[0].'"', isset($SETTINGS['offline_key_level']) === true && (int) $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>';
971 971
                                     }
972 972
                                     ?>
973 973
                                 </select>
Please login to merge, or discard this patch.
sources/find.queries.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 ) {
74 74
     // Not allowed page
75 75
     $session->set('system-error_code', ERR_NOT_ALLOWED);
76
-    include $SETTINGS['cpassman_dir'] . '/error.php';
76
+    include $SETTINGS['cpassman_dir'].'/error.php';
77 77
     exit;
78 78
 }
79 79
 
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 if (null === $session->get('user-accessible_folders')
93 93
     || empty($session->get('user-accessible_folders')) === true
94 94
 ) {
95
-    echo '{"sEcho": ' . $request->query->filter('sEcho', FILTER_SANITIZE_NUMBER_INT) . ' ,"iTotalRecords": "0", "iTotalDisplayRecords": "0", "aaData": [] }';
95
+    echo '{"sEcho": '.$request->query->filter('sEcho', FILTER_SANITIZE_NUMBER_INT).' ,"iTotalRecords": "0", "iTotalDisplayRecords": "0", "aaData": [] }';
96 96
     exit;
97 97
 }
98 98
 
99 99
 //Columns name
100
-$aColumns = ['c.id', 'c.label', 'c.login', 'c.description', 'c.tags', 'c.id_tree', 'c.folder', 'c.login', 'c.url', 'ci.data'];//
100
+$aColumns = ['c.id', 'c.label', 'c.login', 'c.description', 'c.tags', 'c.id_tree', 'c.folder', 'c.login', 'c.url', 'ci.data']; //
101 101
 $aSortTypes = ['ASC', 'DESC'];
102 102
 //init SQL variables
103 103
 $sOrder = $sLimit = $sWhere = '';
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 //Get current user "personal folder" ID
119 119
 $row = DB::query(
120
-    'SELECT id FROM ' . prefixTable('nested_tree') . ' WHERE title = %i',
120
+    'SELECT id FROM '.prefixTable('nested_tree').' WHERE title = %i',
121 121
     intval($session->get('user-id'))
122 122
 );
123 123
 //get list of personal folders
@@ -126,20 +126,20 @@  discard block
 block discarded – undo
126 126
 $listPf = '';
127 127
 if (empty($row['id']) === false) {
128 128
     $rows = DB::query(
129
-        'SELECT id FROM ' . prefixTable('nested_tree') . '
129
+        'SELECT id FROM '.prefixTable('nested_tree').'
130 130
         WHERE personal_folder = 1 AND NOT parent_id = %i AND NOT title = %i',
131 131
         filter_var($row['id'], FILTER_SANITIZE_NUMBER_INT),
132 132
         filter_var($session->get('user-id'), FILTER_SANITIZE_NUMBER_INT)
133 133
     );
134 134
     foreach ($rows as $record) {
135
-        if (! in_array($record['id'], $arrayPf)) {
135
+        if (!in_array($record['id'], $arrayPf)) {
136 136
             //build an array of personal folders ids
137 137
             array_push($arrayPf, $record['id']);
138 138
             //build also a string with those ids
139 139
             if (empty($listPf)) {
140 140
                 $listPf = $record['id'];
141 141
             } else {
142
-                $listPf .= ', ' . $record['id'];
142
+                $listPf .= ', '.$record['id'];
143 143
             }
144 144
         }
145 145
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 //Paging
150 150
 $sLimit = '';
151 151
 if (null !== $request->query->get('start') && $request->query->get('length') !== '-1') {
152
-    $sLimit = 'LIMIT ' . $request->query->filter('start', null, FILTER_SANITIZE_NUMBER_INT) . ', ' . $request->query->filter('length', null, FILTER_SANITIZE_NUMBER_INT) . '';
152
+    $sLimit = 'LIMIT '.$request->query->filter('start', null, FILTER_SANITIZE_NUMBER_INT).', '.$request->query->filter('length', null, FILTER_SANITIZE_NUMBER_INT).'';
153 153
 }
154 154
 
155 155
 //Ordering
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
     }
164 164
     $sOrder = 'ORDER BY  ';
165 165
     if ($orderParam[0]['column'] >= 0) {
166
-        $sOrder .= '' . $aColumns[filter_var($orderParam[0]['column'], FILTER_SANITIZE_NUMBER_INT)] . ' '
167
-                . filter_var($orderParam[0]['dir'], FILTER_SANITIZE_FULL_SPECIAL_CHARS) . ', ';
166
+        $sOrder .= ''.$aColumns[filter_var($orderParam[0]['column'], FILTER_SANITIZE_NUMBER_INT)].' '
167
+                . filter_var($orderParam[0]['dir'], FILTER_SANITIZE_FULL_SPECIAL_CHARS).', ';
168 168
     }
169 169
 
170 170
     $sOrder = substr_replace($sOrder, '', -2);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $sOrder = '';
173 173
     }
174 174
 } else {
175
-    $sOrder = 'ORDER BY ' . $aColumns[1] . ' ASC';
175
+    $sOrder = 'ORDER BY '.$aColumns[1].' ASC';
176 176
 }
177 177
 
178 178
 // Define criteria
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 if (empty($search_criteria) === false) {
197 197
     $sWhere .= ' AND (';
198 198
     for ($i = 0; $i < count($aColumns); ++$i) {
199
-        $sWhere .= $aColumns[$i] . ' LIKE %ss_' . $i . ' OR ';
199
+        $sWhere .= $aColumns[$i].' LIKE %ss_'.$i.' OR ';
200 200
     }
201
-    $sWhere = substr_replace((string) $sWhere, '', -3) . ') ';
201
+    $sWhere = substr_replace((string) $sWhere, '', -3).') ';
202 202
     $crit = [
203 203
         'idtree' => array_unique($folders),
204 204
         '0' => $search_criteria,
@@ -235,16 +235,16 @@  discard block
 block discarded – undo
235 235
 
236 236
 // Do NOT show the items in PERSONAL FOLDERS
237 237
 if (empty($listPf) === false) {
238
-    $sWhere = 'WHERE ' . $sWhere . ' AND c.id_tree NOT IN %ls_pf ';
238
+    $sWhere = 'WHERE '.$sWhere.' AND c.id_tree NOT IN %ls_pf ';
239 239
 } else {
240
-    $sWhere = 'WHERE ' . $sWhere;
240
+    $sWhere = 'WHERE '.$sWhere;
241 241
 }
242 242
 
243 243
 // Do queries
244 244
 DB::query(
245 245
     "SELECT c.id
246
-    FROM " . prefixTable('cache') . " AS c
247
-    LEFT JOIN " . prefixTable('categories_items') . " AS ci ON (ci.item_id = c.id)
246
+    FROM " . prefixTable('cache')." AS c
247
+    LEFT JOIN " . prefixTable('categories_items')." AS ci ON (ci.item_id = c.id)
248 248
     {$sWhere}
249 249
     {$sOrder}",
250 250
     $crit
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
 $iTotal = DB::count();
253 253
 $rows = DB::query(
254 254
     "SELECT c.*, ci.data, i.item_key
255
-    FROM " . prefixTable('cache') . " AS c
256
-    LEFT JOIN " . prefixTable('categories_items') . " AS ci ON (ci.item_id = c.id)
257
-    INNER JOIN " . prefixTable('items') . " AS i ON (i.id = c.id)
255
+    FROM " . prefixTable('cache')." AS c
256
+    LEFT JOIN " . prefixTable('categories_items')." AS ci ON (ci.item_id = c.id)
257
+    INNER JOIN " . prefixTable('items')." AS i ON (i.id = c.id)
258 258
     {$sWhere}
259 259
     {$sOrder}
260 260
     {$sLimit}",
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 if (null === $request->query->get('type')) {
280 280
     $sOutput = '{';
281 281
     if (null !== $request->query->get('draw')) {
282
-        $sOutput .= '"draw": ' . $request->query->filter('draw', FILTER_SANITIZE_NUMBER_INT) . ', ';
282
+        $sOutput .= '"draw": '.$request->query->filter('draw', FILTER_SANITIZE_NUMBER_INT).', ';
283 283
     }
284 284
     $sOutput .= '"data": [';
285 285
     $sOutputConst = '';
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             foreach (explode(';', $session->get('user-roles')) as $role) {
297 297
                 //db::debugmode(true);
298 298
                 $access = DB::queryFirstRow(
299
-                    'SELECT type FROM ' . prefixTable('roles_values') . ' WHERE role_id = %i AND folder_id = %i',
299
+                    'SELECT type FROM '.prefixTable('roles_values').' WHERE role_id = %i AND folder_id = %i',
300 300
                     $role,
301 301
                     $record['id_tree']
302 302
                 );
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             }
317 317
             $accessLevel = count($arrTmp) > 0 ? min($arrTmp) : $accessLevel;
318 318
             if ($accessLevel === 0) {
319
-                $checkbox = '<input type=\"checkbox\" value=\"0\" class=\"mass_op_cb\" data-id=\"' . $record['id'] . '\">';
319
+                $checkbox = '<input type=\"checkbox\" value=\"0\" class=\"mass_op_cb\" data-id=\"'.$record['id'].'\">';
320 320
             }
321 321
 
322 322
             if ((int) $accessLevel === 0) {
@@ -356,22 +356,22 @@  discard block
 block discarded – undo
356 356
             if (empty($restrictedTo)) {
357 357
                 $restrictedTo = $session->get('user-id');
358 358
             } else {
359
-                $restrictedTo .= ',' . $session->get('user-id');
359
+                $restrictedTo .= ','.$session->get('user-id');
360 360
             }
361 361
         }
362 362
         
363 363
         //col1
364
-        $sOutputItem .= '"<i class=\"fa fa-external-link-alt infotip mr-2\" title=\"' . $lang->get('open_url_link') . '\" onClick=\"window.location.href=&#039;index.php?page=items&amp;group=' . $record['id_tree'] . '&amp;id=' . $record['id'] . '&#039;\" style=\"cursor:pointer;\"></i>' .
365
-        '<i class=\"fa fa-eye infotip mr-2 item-detail\" title=\"' . stripslashes($lang->get('see_item_title')) . '\" data-id=\"' . $record['id'] . '\" data-perso=\"' . $record['perso'] . '\" data-tree-id=\"' . $record['id_tree'] . '\" data-expired=\"' . $expired . '\" data-restricted-to=\"' . $restrictedTo . '\" data-rights=\"' . $right . '\" style=\"cursor:pointer;\"></i>' . $checkbox . '",' ;
364
+        $sOutputItem .= '"<i class=\"fa fa-external-link-alt infotip mr-2\" title=\"'.$lang->get('open_url_link').'\" onClick=\"window.location.href=&#039;index.php?page=items&amp;group='.$record['id_tree'].'&amp;id='.$record['id'].'&#039;\" style=\"cursor:pointer;\"></i>'.
365
+        '<i class=\"fa fa-eye infotip mr-2 item-detail\" title=\"'.stripslashes($lang->get('see_item_title')).'\" data-id=\"'.$record['id'].'\" data-perso=\"'.$record['perso'].'\" data-tree-id=\"'.$record['id_tree'].'\" data-expired=\"'.$expired.'\" data-restricted-to=\"'.$restrictedTo.'\" data-rights=\"'.$right.'\" style=\"cursor:pointer;\"></i>'.$checkbox.'",';
366 366
         //col2
367
-        $sOutputItem .= '"'.base64_encode('<span id=\"item_label-' . $record['id'] . '\">' . (str_replace("\\", "&#92;", (string) $record['label'])) . '</span>').'", ';   // replace backslash #3015
367
+        $sOutputItem .= '"'.base64_encode('<span id=\"item_label-'.$record['id'].'\">'.(str_replace("\\", "&#92;", (string) $record['label'])).'</span>').'", '; // replace backslash #3015
368 368
         //col3
369
-        $sOutputItem .= '"' . base64_encode(str_replace('&amp;', '&', htmlspecialchars(stripslashes((string) $record['login']), ENT_QUOTES))) . '", ';
369
+        $sOutputItem .= '"'.base64_encode(str_replace('&amp;', '&', htmlspecialchars(stripslashes((string) $record['login']), ENT_QUOTES))).'", ';
370 370
         //col4
371 371
         //get restriction from ROles
372 372
         $restrictedToRole = false;
373 373
         $rTmp = DB::queryFirstColumn(
374
-            'SELECT role_id FROM ' . prefixTable('restriction_to_roles') . ' WHERE item_id = %i',
374
+            'SELECT role_id FROM '.prefixTable('restriction_to_roles').' WHERE item_id = %i',
375 375
             $record['id']
376 376
         );
377 377
         // We considere here that if user has at least one group similar to the object ones
@@ -389,14 +389,14 @@  discard block
 block discarded – undo
389 389
         } else {
390 390
             $txt = str_replace(['\n', '<br />', '\\'], [' ', ' ', '', ' '], strip_tags($record['description']));
391 391
             if (strlen($txt) > 50) {
392
-                $sOutputItem .= '"' . base64_encode(substr(stripslashes(preg_replace('~/<[\/]{0,1}[^>]*>\//|[ \t]/~', '', $txt)), 0, 50)) . '", ';
392
+                $sOutputItem .= '"'.base64_encode(substr(stripslashes(preg_replace('~/<[\/]{0,1}[^>]*>\//|[ \t]/~', '', $txt)), 0, 50)).'", ';
393 393
             } else {
394
-                $sOutputItem .= '"' . base64_encode(stripslashes(preg_replace('~/<[^>]*>|[ \t]/~', '', $txt))) . '", ';
394
+                $sOutputItem .= '"'.base64_encode(stripslashes(preg_replace('~/<[^>]*>|[ \t]/~', '', $txt))).'", ';
395 395
             }
396 396
         }
397 397
 
398 398
         //col5 - TAGS
399
-        $sOutputItem .= '"' . base64_encode(htmlspecialchars(stripslashes((string) $record['tags']), ENT_QUOTES)) . '", ';
399
+        $sOutputItem .= '"'.base64_encode(htmlspecialchars(stripslashes((string) $record['tags']), ENT_QUOTES)).'", ';
400 400
         // col6 - URL
401 401
         if ($record['url'] !== '0') {
402 402
             $sOutputItem .= '"'.htmlspecialchars(filter_var($record['url'], FILTER_SANITIZE_URL)).'", ';
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         }
406 406
 
407 407
         //col7 - Prepare the Treegrid
408
-        $sOutputItem .= '"' . base64_encode(stripslashes((string) $record['folder'])) . '"';
408
+        $sOutputItem .= '"'.base64_encode(stripslashes((string) $record['folder'])).'"';
409 409
         //Finish the line
410 410
         //$sOutputItem .= '], ';
411 411
         if ($getItemInList === true) {
@@ -414,17 +414,17 @@  discard block
 block discarded – undo
414 414
             --$iTotal;
415 415
         }
416 416
     }
417
-    if (! empty($sOutputConst)) {
417
+    if (!empty($sOutputConst)) {
418 418
         $sOutput .= substr_replace($sOutputConst, '', -2);
419 419
     }
420 420
     $sOutput .= '], ';
421
-    $sOutput .= '"recordsTotal": ' . $iTotal . ', ';
422
-    $sOutput .= '"recordsFiltered": ' . $iTotal . ' }';
421
+    $sOutput .= '"recordsTotal": '.$iTotal.', ';
422
+    $sOutput .= '"recordsFiltered": '.$iTotal.' }';
423 423
     // file deepcode ignore XSS: data is secured
424 424
     echo ($sOutput);
425 425
 } elseif (null !== $request->query->get('type') && ($request->query->get('type') === 'search_for_items' || $request->query->get('type') === 'search_for_items_with_tags')) {
426 426
     include_once 'main.functions.php';
427
-    include_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $session->get('user-language') . '.php';
427
+    include_once $SETTINGS['cpassman_dir'].'/includes/language/'.$session->get('user-language').'.php';
428 428
 
429 429
     $totalItems = $request->query->filter('totalItems', null, FILTER_SANITIZE_NUMBER_INT);
430 430
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         $arr_data[$record['id']]['tree_id'] = (int) $record['id_tree'];
436 436
         $arr_data[$record['id']]['label'] = (string) $record['label'];
437 437
         $arr_data[$record['id']]['desc'] = (string) strip_tags(explode('<br>', $record['description'])[0]);
438
-        $arr_data[$record['id']]['folder'] = (string)$record['folder'];
438
+        $arr_data[$record['id']]['folder'] = (string) $record['folder'];
439 439
         $arr_data[$record['id']]['login'] = (string) strtr($record['login'], '"', '&quot;');
440 440
         $arr_data[$record['id']]['item_key'] = (string) $record['item_key'];
441 441
         $arr_data[$record['id']]['link'] = (string) $record['url'] !== '0' && empty($record['url']) === false ? filter_var($record['url'], FILTER_SANITIZE_URL) : '';
@@ -455,8 +455,8 @@  discard block
 block discarded – undo
455 455
 
456 456
         $dataItem = DB::query(
457 457
             'SELECT i.anyone_can_modify, i.perso, r.role_id 
458
-            FROM ' . prefixTable('items') . ' i
459
-            LEFT JOIN ' . prefixTable('restriction_to_roles') . ' r ON i.id = r.item_id
458
+            FROM ' . prefixTable('items').' i
459
+            LEFT JOIN ' . prefixTable('restriction_to_roles').' r ON i.id = r.item_id
460 460
             WHERE i.id = %i',
461 461
             $record['id']
462 462
         );
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
             if (empty($restrictedTo)) {
513 513
                 $restrictedTo = $session->get('user-id');
514 514
             } else {
515
-                $restrictedTo .= ',' . $session->get('user-id');
515
+                $restrictedTo .= ','.$session->get('user-id');
516 516
             }
517 517
         }
518 518
         $arr_data[$record['id']]['restricted'] = $restrictedTo;
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
             $arrTmp = [];
626 626
             foreach (explode(';', $session->get('user-roles')) as $role) {
627 627
                 $access = DB::queryFirstRow(
628
-                    'SELECT type FROM ' . prefixTable('roles_values') . ' WHERE role_id = %i AND folder_id = %i',
628
+                    'SELECT type FROM '.prefixTable('roles_values').' WHERE role_id = %i AND folder_id = %i',
629 629
                     $role,
630 630
                     $record['id_tree']
631 631
                 );
@@ -676,8 +676,8 @@  discard block
 block discarded – undo
676 676
         ) {
677 677
             $data_item = DB::queryFirstRow(
678 678
                 'SELECT i.pw AS pw, s.share_key AS share_key
679
-                FROM ' . prefixTable('items') . ' AS i
680
-                INNER JOIN ' . prefixTable('sharekeys_items') . ' AS s ON (s.object_id = i.id)
679
+                FROM ' . prefixTable('items').' AS i
680
+                INNER JOIN ' . prefixTable('sharekeys_items').' AS s ON (s.object_id = i.id)
681 681
                 WHERE i.id = %i AND s.user_id = %i',
682 682
                 $record['id'],
683 683
                 $session->get('user-id')
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +182 added lines, -182 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 csrfProtector::init();
73 73
 
74 74
 // Load functions
75
-require_once __DIR__. '/includes/config/include.php';
75
+require_once __DIR__.'/includes/config/include.php';
76 76
 require_once __DIR__.'/sources/main.functions.php';
77 77
 
78 78
 // init
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 $SETTINGS = $antiXss->xss_clean($SETTINGS);
107 107
 
108 108
 // Load Core library
109
-require_once $SETTINGS['cpassman_dir'] . '/sources/core.php';
109
+require_once $SETTINGS['cpassman_dir'].'/sources/core.php';
110 110
 // Prepare POST variables
111 111
 $post_language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
112 112
 $session_user_language = $session->get('user-language');
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 if ($hasSuperPrivilege > 0) {
161 161
     if (defined('MYSQL_LOG') && MYSQL_LOG === true) {
162 162
         DB::query("SET GLOBAL general_log = 'ON'");
163
-        DB::query("SET GLOBAL general_log_file = " . (defined('MYSQL_LOG_FILE') ? MYSQL_LOG_FILE : "'/var/log/teampass_mysql_query.log'"));
163
+        DB::query("SET GLOBAL general_log_file = ".(defined('MYSQL_LOG_FILE') ? MYSQL_LOG_FILE : "'/var/log/teampass_mysql_query.log'"));
164 164
     } else {
165 165
         DB::query("SET GLOBAL general_log = 'OFF'");
166 166
     }
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
     //get default language
172 172
     $dataLanguage = DB::queryFirstRow(
173 173
         'SELECT m.valeur AS valeur, l.flag AS flag
174
-        FROM ' . prefixTable('misc') . ' AS m
175
-        INNER JOIN ' . prefixTable('languages') . ' AS l ON (m.valeur = l.name)
174
+        FROM ' . prefixTable('misc').' AS m
175
+        INNER JOIN ' . prefixTable('languages').' AS l ON (m.valeur = l.name)
176 176
         WHERE m.type=%s_type AND m.intitule=%s_intitule',
177 177
         [
178 178
             'type' => 'admin',
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $session_user_language = $SETTINGS['default_language'];
204 204
     }
205 205
 }
206
-$lang = new Language($session_user_language, __DIR__. '/includes/language/'); 
206
+$lang = new Language($session_user_language, __DIR__.'/includes/language/'); 
207 207
 
208 208
 if (isset($SETTINGS['cpassman_dir']) === false || $SETTINGS['cpassman_dir'] === '') {
209 209
     $SETTINGS['cpassman_dir'] = __DIR__;
@@ -277,29 +277,29 @@  discard block
 block discarded – undo
277 277
     </script>
278 278
 
279 279
     <!-- IonIcons -->
280
-    <link rel="stylesheet" href="includes/css/ionicons.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
280
+    <link rel="stylesheet" href="includes/css/ionicons.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
281 281
     <!-- Theme style -->
282
-    <link rel="stylesheet" href="plugins/adminlte/css/adminlte.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
283
-    <link rel="stylesheet" href="plugins/pace-progress/themes/corner-indicator.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
284
-    <link rel="stylesheet" href="plugins/select2/css/select2.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
285
-    <link rel="stylesheet" href="plugins/select2/theme/select2-bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
282
+    <link rel="stylesheet" href="plugins/adminlte/css/adminlte.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
283
+    <link rel="stylesheet" href="plugins/pace-progress/themes/corner-indicator.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
284
+    <link rel="stylesheet" href="plugins/select2/css/select2.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
285
+    <link rel="stylesheet" href="plugins/select2/theme/select2-bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
286 286
     <!-- Theme style -->
287
-    <link rel="stylesheet" href="includes/css/teampass.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
287
+    <link rel="stylesheet" href="includes/css/teampass.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
288 288
     <!-- Google Font: Source Sans Pro -->
289
-    <link rel="stylesheet" type="text/css" href="includes/fonts/fonts.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
289
+    <link rel="stylesheet" type="text/css" href="includes/fonts/fonts.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
290 290
     <!-- Altertify -->
291
-    <link rel="stylesheet" href="plugins/alertifyjs/css/alertify.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
292
-    <link rel="stylesheet" href="plugins/alertifyjs/css/themes/bootstrap.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
291
+    <link rel="stylesheet" href="plugins/alertifyjs/css/alertify.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
292
+    <link rel="stylesheet" href="plugins/alertifyjs/css/themes/bootstrap.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
293 293
     <!-- Toastr -->
294
-    <link rel="stylesheet" href="plugins/toastr/toastr.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
294
+    <link rel="stylesheet" href="plugins/toastr/toastr.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
295 295
     <!-- favicon -->
296
-    <link rel="shortcut icon" type="image/png" href="<?php echo $favicon;?>"/>
296
+    <link rel="shortcut icon" type="image/png" href="<?php echo $favicon; ?>"/>
297 297
     <!-- manifest (PWA) -->
298
-    <link rel="manifest" href="manifest.json?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
298
+    <link rel="manifest" href="manifest.json?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
299 299
     <!-- Custom style -->
300 300
     <?php
301
-    if (file_exists(__DIR__ . '/includes/css/custom.css') === true) {?>
302
-        <link rel="stylesheet" href="includes/css/custom.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
301
+    if (file_exists(__DIR__.'/includes/css/custom.css') === true) {?>
302
+        <link rel="stylesheet" href="includes/css/custom.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
303 303
     <?php
304 304
     } ?>
305 305
 </head>
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
                         <div class="dropdown show">
347 347
                             <a class="btn btn-primary dropdown-toggle" href="#" data-toggle="dropdown">
348 348
                                 <?php
349
-                                    echo $session_name . '&nbsp;' . $session_lastname; ?>
349
+                                    echo $session_name.'&nbsp;'.$session_lastname; ?>
350 350
                             </a>
351 351
 
352 352
                             <div class="dropdown-menu dropdown-menu-right">
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                                     </a>
371 371
                                 <?php
372 372
                                     } ?>
373
-                                <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : '';?>" href="#" data-name="generate-new_keys">
373
+                                <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : ''; ?>" href="#" data-name="generate-new_keys">
374 374
                                     <i class="fa-solid fa-spray-can-sparkles fa-fw mr-2"></i><?php echo $lang->get('generate_new_keys'); ?>
375 375
                                 </a>
376 376
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             <!-- Main Sidebar Container -->
405 405
             <aside class="main-sidebar sidebar-dark-primary elevation-4">
406 406
                 <!-- Brand Logo -->
407
-                <a href="<?php echo $cpassman_url . '/index.php?page=' . ((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link">
407
+                <a href="<?php echo $cpassman_url.'/index.php?page='.((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link">
408 408
                     <img src="includes/images/teampass-logo2-home.png" alt="Teampass Logo" class="brand-image">
409 409
                     <span class="brand-text font-weight-light"><?php echo TP_TOOL_NAME; ?></span>
410 410
                 </a>
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
                         <a href="#" data-name="items" class="nav-link', $get['page'] === 'items' ? ' active' : '', '">
423 423
                         <i class="nav-icon fa-solid fa-key"></i>
424 424
                         <p>
425
-                            ' . $lang->get('pw') . '
425
+                            ' . $lang->get('pw').'
426 426
                         </p>
427 427
                         </a>
428 428
                     </li>';
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                         <a href="#" data-name="import" class="nav-link', $get['page'] === 'import' ? ' active' : '', '">
436 436
                         <i class="nav-icon fa-solid fa-file-import"></i>
437 437
                         <p>
438
-                            ' . $lang->get('import') . '
438
+                            ' . $lang->get('import').'
439 439
                         </p>
440 440
                         </a>
441 441
                     </li>';
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                         <a href="#" data-name="export" class="nav-link', $get['page'] === 'export' ? ' active' : '', '">
457 457
                         <i class="nav-icon fa-solid fa-file-export"></i>
458 458
                         <p>
459
-                            ' . $lang->get('export') . '
459
+                            ' . $lang->get('export').'
460 460
                         </p>
461 461
                         </a>
462 462
                     </li>';
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
                         <a href="#" data-name="search" class="nav-link', $get['page'] === 'search' ? ' active' : '', '">
484 484
                         <i class="nav-icon fa-solid fa-search"></i>
485 485
                         <p>
486
-                            ' . $lang->get('find') . '
486
+                            ' . $lang->get('find').'
487 487
                         </p>
488 488
                         </a>
489 489
                     </li>';
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
                         <a href="#" data-name="favourites" class="nav-link', $get['page'] === 'favourites' ? ' active' : '', '">
500 500
                         <i class="nav-icon fa-solid fa-star"></i>
501 501
                         <p>
502
-                            ' . $lang->get('favorites') . '
502
+                            ' . $lang->get('favorites').'
503 503
                         </p>
504 504
                         </a>
505 505
                     </li>';
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
                         <a href="#" data-name="suggestion" class="nav-link', $get['page'] === 'suggestion' ? ' active' : '', '">
530 530
                         <i class="nav-icon fa-solid fa-lightbulb"></i>
531 531
                         <p>
532
-                            ' . $lang->get('suggestion_menu') . '
532
+                            ' . $lang->get('suggestion_menu').'
533 533
                         </p>
534 534
                         </a>
535 535
                     </li>';
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
                         <a href="#" data-name="admin" class="nav-link', $get['page'] === 'admin' ? ' active' : '', '">
543 543
                         <i class="nav-icon fa-solid fa-info"></i>
544 544
                         <p>
545
-                            ' . $lang->get('admin_main') . '
545
+                            ' . $lang->get('admin_main').'
546 546
                         </p>
547 547
                         </a>
548 548
                     </li>
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
                         <a href="#" class="nav-link">
551 551
                             <i class="nav-icon fa-solid fa-wrench"></i>
552 552
                             <p>
553
-                                ' . $lang->get('admin_settings') . '
553
+                                ' . $lang->get('admin_settings').'
554 554
                                 <i class="fa-solid fa-angle-left right"></i>
555 555
                             </p>
556 556
                         </a>
@@ -558,63 +558,63 @@  discard block
 block discarded – undo
558 558
                             <li class="nav-item">
559 559
                                 <a href="#" data-name="options" class="nav-link', $get['page'] === 'options' ? ' active' : '', '">
560 560
                                     <i class="fa-solid fa-check-double nav-icon"></i>
561
-                                    <p>' . $lang->get('options') . '</p>
561
+                                    <p>' . $lang->get('options').'</p>
562 562
                                 </a>
563 563
                             </li>
564 564
                             <li class="nav-item">
565 565
                                 <a href="#" data-name="2fa" class="nav-link', $get['page'] === '2fa' ? ' active' : '', '">
566 566
                                     <i class="fa-solid fa-qrcode nav-icon"></i>
567
-                                    <p>' . $lang->get('mfa_short') . '</p>
567
+                                    <p>' . $lang->get('mfa_short').'</p>
568 568
                                 </a>
569 569
                             </li>
570 570
                             <li class="nav-item">
571 571
                                 <a href="#" data-name="api" class="nav-link', $get['page'] === 'api' ? ' active' : '', '">
572 572
                                     <i class="fa-solid fa-cubes nav-icon"></i>
573
-                                    <p>' . $lang->get('api') . '</p>
573
+                                    <p>' . $lang->get('api').'</p>
574 574
                                 </a>
575 575
                             </li>
576 576
                             <li class="nav-item">
577 577
                                 <a href="#" data-name="backups" class="nav-link', $get['page'] === 'backups' ? ' active' : '', '">
578 578
                                     <i class="fa-solid fa-database nav-icon"></i>
579
-                                    <p>' . $lang->get('backups') . '</p>
579
+                                    <p>' . $lang->get('backups').'</p>
580 580
                                 </a>
581 581
                             </li>
582 582
                             <li class="nav-item">
583 583
                                 <a href="#" data-name="emails" class="nav-link', $get['page'] === 'emails' ? ' active' : '', '">
584 584
                                     <i class="fa-solid fa-envelope nav-icon"></i>
585
-                                    <p>' . $lang->get('emails') . '</p>
585
+                                    <p>' . $lang->get('emails').'</p>
586 586
                                 </a>
587 587
                             </li>
588 588
                             <li class="nav-item">
589 589
                                 <a href="#" data-name="fields" class="nav-link', $get['page'] === 'fields' ? ' active' : '', '">
590 590
                                     <i class="fa-solid fa-keyboard nav-icon"></i>
591
-                                    <p>' . $lang->get('fields') . '</p>
591
+                                    <p>' . $lang->get('fields').'</p>
592 592
                                 </a>
593 593
                             </li>
594 594
                             <li class="nav-item">
595 595
                                 <a href="#" data-name="ldap" class="nav-link', $get['page'] === 'ldap' ? ' active' : '', '">
596 596
                                     <i class="fa-solid fa-id-card nav-icon"></i>
597
-                                    <p>' . $lang->get('ldap') . '</p>
597
+                                    <p>' . $lang->get('ldap').'</p>
598 598
                                 </a>
599 599
                             </li>
600 600
 
601 601
                             <li class="nav-item">
602 602
                                 <a href="#" data-name="oauth" class="nav-link', $get['page'] === 'oauth' ? ' active' : '', '">
603 603
                                     <i class="fa-solid fa-plug nav-icon"></i>
604
-                                    <p>' . $lang->get('oauth') . '</p>
604
+                                    <p>' . $lang->get('oauth').'</p>
605 605
                                 </a>
606 606
                             </li>
607 607
                             
608 608
                             <li class="nav-item">
609 609
                                 <a href="#" data-name="uploads" class="nav-link', $get['page'] === 'uploads' ? ' active' : '', '">
610 610
                                     <i class="fa-solid fa-file-upload nav-icon"></i>
611
-                                    <p>' . $lang->get('uploads') . '</p>
611
+                                    <p>' . $lang->get('uploads').'</p>
612 612
                                 </a>
613 613
                             </li>
614 614
                             <li class="nav-item">
615 615
                                 <a href="#" data-name="statistics" class="nav-link', $get['page'] === 'statistics' ? ' active' : '', '">
616 616
                                     <i class="fa-solid fa-chart-bar nav-icon"></i>
617
-                                    <p>' . $lang->get('statistics') . '</p>
617
+                                    <p>' . $lang->get('statistics').'</p>
618 618
                                 </a>
619 619
                             </li>
620 620
                         </ul>
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
                     <li class="nav-item">
626 626
                         <a href="#" data-name="tasks" class="nav-link', $get['page'] === 'tasks' ? ' active' : '', '">
627 627
                         <i class="fa-solid fa-tasks nav-icon"></i>
628
-                        <p>' . $lang->get('tasks') . '</p>
628
+                        <p>' . $lang->get('tasks').'</p>
629 629
                         </a>
630 630
                     </li>';
631 631
         }
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
                         <a href="#" data-name="tools" class="nav-link', $get['page'] === 'tools' ? ' active' : '', '">
637 637
                         <i class="nav-icon fa-solid fa-person-drowning"></i>
638 638
                         <p>
639
-                            ' . $lang->get('tools') . '
639
+                            ' . $lang->get('tools').'
640 640
                         </p>
641 641
                         </a>
642 642
                     </li>';
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
                         <a href="#" data-name="import" class="nav-link', $get['page'] === 'import' ? ' active' : '', '">
647 647
                         <i class="nav-icon fa-solid fa-file-import"></i>
648 648
                         <p>
649
-                            ' . $lang->get('import') . '
649
+                            ' . $lang->get('import').'
650 650
                         </p>
651 651
                         </a>
652 652
                     </li>';
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
                         <a href="#" data-name="folders" class="nav-link', $get['page'] === 'folders' ? ' active' : '', '">
663 663
                         <i class="nav-icon fa-solid fa-folder-open"></i>
664 664
                         <p>
665
-                            ' . $lang->get('folders') . '
665
+                            ' . $lang->get('folders').'
666 666
                         </p>
667 667
                         </a>
668 668
                     </li>
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
                         <a href="#" data-name="roles" class="nav-link', $get['page'] === 'roles' ? ' active' : '', '">
671 671
                         <i class="nav-icon fa-solid fa-graduation-cap"></i>
672 672
                         <p>
673
-                            ' . $lang->get('roles') . '
673
+                            ' . $lang->get('roles').'
674 674
                         </p>
675 675
                         </a>
676 676
                     </li>
@@ -678,38 +678,38 @@  discard block
 block discarded – undo
678 678
                         <a href="#" data-name="users" class="nav-link', $get['page'] === 'users' ? ' active' : '', '">
679 679
                         <i class="nav-icon fa-solid fa-users"></i>
680 680
                         <p>
681
-                            ' . $lang->get('users') . '
681
+                            ' . $lang->get('users').'
682 682
                         </p>
683 683
                         </a>
684 684
                     </li>
685 685
                     <li class="nav-item has-treeview', $menuUtilities === true ? ' menu-open' : '', '">
686 686
                         <a href="#" class="nav-link">
687 687
                         <i class="nav-icon fa-solid fa-cubes"></i>
688
-                        <p>' . $lang->get('admin_views') . '<i class="fa-solid fa-angle-left right"></i></p>
688
+                        <p>' . $lang->get('admin_views').'<i class="fa-solid fa-angle-left right"></i></p>
689 689
                         </a>
690 690
                         <ul class="nav nav-treeview">
691 691
                             <li class="nav-item">
692 692
                                 <a href="#" data-name="utilities.renewal" class="nav-link', $get['page'] === 'utilities.renewal' ? ' active' : '', '">
693 693
                                 <i class="far fa-calendar-alt nav-icon"></i>
694
-                                <p>' . $lang->get('renewal') . '</p>
694
+                                <p>' . $lang->get('renewal').'</p>
695 695
                                 </a>
696 696
                             </li>
697 697
                             <li class="nav-item">
698 698
                                 <a href="#" data-name="utilities.deletion" class="nav-link', $get['page'] === 'utilities.deletion' ? ' active' : '', '">
699 699
                                 <i class="fa-solid fa-trash-alt nav-icon"></i>
700
-                                <p>' . $lang->get('deletion') . '</p>
700
+                                <p>' . $lang->get('deletion').'</p>
701 701
                                 </a>
702 702
                             </li>
703 703
                             <li class="nav-item">
704 704
                                 <a href="#" data-name="utilities.logs" class="nav-link', $get['page'] === 'utilities.logs' ? ' active' : '', '">
705 705
                                 <i class="fa-solid fa-history nav-icon"></i>
706
-                                <p>' . $lang->get('logs') . '</p>
706
+                                <p>' . $lang->get('logs').'</p>
707 707
                                 </a>
708 708
                             </li>
709 709
                             <li class="nav-item">
710 710
                                 <a href="#" data-name="utilities.database" class="nav-link', $get['page'] === 'utilities.database' ? ' active' : '', '">
711 711
                                 <i class="fa-solid fa-database nav-icon"></i>
712
-                                <p>' . $lang->get('database') . '</p>
712
+                                <p>' . $lang->get('database').'</p>
713 713
                                 </a>
714 714
                             </li>
715 715
                         </ul>
@@ -720,10 +720,10 @@  discard block
 block discarded – undo
720 720
                     <!-- /.sidebar-menu -->
721 721
                 <div class="menu-footer">
722 722
                     <div class="" id="sidebar-footer">
723
-                        <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo htmlspecialchars($lang->get('server_time') . ' ' .
724
-                            date($date_format, (int) $server['request_time']) . ' - ' .
723
+                        <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo htmlspecialchars($lang->get('server_time').' '.
724
+                            date($date_format, (int) $server['request_time']).' - '.
725 725
                             date($time_format, (int) $server['request_time']), ENT_QUOTES, 'UTF-8'); ?>"></i>
726
-                        <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online . ' ' . $lang->get('users_online'); ?>"></i>
726
+                        <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online.' '.$lang->get('users_online'); ?>"></i>
727 727
                         <a href="<?php echo DOCUMENTATION_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-book mr-2 infotip" title="<?php echo $lang->get('documentation_canal'); ?>"></i></a>
728 728
                         <a href="<?php echo HELP_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-life-ring mr-2 infotip" title="<?php echo $lang->get('admin_help'); ?>"></i></a>
729 729
                         <?php if ($session_user_admin === 1) : ?><i class="fa-solid fa-bug infotip pointer text-info" title="<?php echo $lang->get('bugs_page'); ?>" onclick="generateBugReport()"></i><?php endif; ?>
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
                                 </div>
881 881
                                 <div class="mt-3">                                    
882 882
                                     <label>
883
-                                        <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password');?></span>
883
+                                        <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password'); ?></span>
884 884
                                         <input type="checkbox" id="dialog-admin-change-user-password-do-show-password" class="pointer">
885 885
                                     </label>
886 886
                                 </div>
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
                                 
1040 1040
                                 <div class="alert alert-danger mt-3" role="alert">                                    
1041 1041
                                     <label>
1042
-                                        <span class="mr-2 pointer fw-normal"><?php echo $lang->get('ignore_this_password_is_lost');?></span>
1042
+                                        <span class="mr-2 pointer fw-normal"><?php echo $lang->get('ignore_this_password_is_lost'); ?></span>
1043 1043
                                         <input type="checkbox" id="depiapc-ignore-password" class="pointer flat-blue">
1044 1044
                                     </label>
1045 1045
                                 </div>
@@ -1063,34 +1063,34 @@  discard block
 block discarded – undo
1063 1063
                     if ($get['page'] === 'items') {
1064 1064
                         // SHow page with Items
1065 1065
                         if ((int) $session_user_admin !== 1) {
1066
-                            include $SETTINGS['cpassman_dir'] . '/pages/items.php';
1066
+                            include $SETTINGS['cpassman_dir'].'/pages/items.php';
1067 1067
                         } elseif ((int) $session_user_admin === 1) {
1068
-                            include $SETTINGS['cpassman_dir'] . '/pages/admin.php';
1068
+                            include $SETTINGS['cpassman_dir'].'/pages/admin.php';
1069 1069
                         } else {
1070 1070
                             $session->set('system-error_code', ERR_NOT_ALLOWED);
1071 1071
                             //not allowed page
1072
-                            include $SETTINGS['cpassman_dir'] . '/error.php';
1072
+                            include $SETTINGS['cpassman_dir'].'/error.php';
1073 1073
                         }
1074 1074
                     } elseif (in_array($get['page'], array_keys($mngPages)) === true) {
1075 1075
                         // Define if user is allowed to see management pages
1076 1076
                         if ($session_user_admin === 1) {
1077 1077
                             // deepcode ignore FileInclusion: $get['page'] is secured through usage of array_keys test bellow
1078
-                            include $SETTINGS['cpassman_dir'] . '/pages/' . basename($mngPages[$get['page']]);
1078
+                            include $SETTINGS['cpassman_dir'].'/pages/'.basename($mngPages[$get['page']]);
1079 1079
                         } elseif ($session_user_manager === 1 || $session_user_human_resources === 1) {
1080 1080
                             if ($get['page'] === 'manage_main' || $get['page'] === 'manage_settings'
1081 1081
                             ) {
1082 1082
                                 $session->set('system-error_code', ERR_NOT_ALLOWED);
1083 1083
                                 //not allowed page
1084
-                                include $SETTINGS['cpassman_dir'] . '/error.php';
1084
+                                include $SETTINGS['cpassman_dir'].'/error.php';
1085 1085
                             }
1086 1086
                         } else {
1087 1087
                             $session->set('system-error_code', ERR_NOT_ALLOWED);
1088 1088
                             //not allowed page
1089
-                            include $SETTINGS['cpassman_dir'] . '/error.php';
1089
+                            include $SETTINGS['cpassman_dir'].'/error.php';
1090 1090
                         }
1091
-                    } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'] . '/pages/' . $get['page'] . '.php') === true) {
1091
+                    } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'].'/pages/'.$get['page'].'.php') === true) {
1092 1092
                         // deepcode ignore FileInclusion: $get['page'] is tested against file_exists just below
1093
-                        include $SETTINGS['cpassman_dir'] . '/pages/' . basename($get['page'] . '.php');
1093
+                        include $SETTINGS['cpassman_dir'].'/pages/'.basename($get['page'].'.php');
1094 1094
                     } else {
1095 1095
                         $session->set('system-array_roles', ERR_NOT_EXIST);
1096 1096
                         //page doesn't exist
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
             <footer class="main-footer">
1120 1120
                 <!-- To the right -->
1121 1121
                 <div class="float-right d-none d-sm-inline">
1122
-                    <?php echo $lang->get('version_alone'); ?>&nbsp;<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>
1122
+                    <?php echo $lang->get('version_alone'); ?>&nbsp;<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>
1123 1123
                 </div>
1124 1124
                 <!-- Default to the left -->
1125 1125
                 <strong>Copyright &copy; <?php echo TP_COPYRIGHT; ?> <a href="<?php echo TEAMPASS_URL; ?>"><?php echo TP_TOOL_NAME; ?></a>.</strong> All rights reserved.
@@ -1133,7 +1133,7 @@  discard block
 block discarded – undo
1133 1133
         echo '
1134 1134
 <input type="hidden" id="temps_restant" value="', $session->get('user-session_duration') ?? '', '" />';
1135 1135
 // display an item in the context of OTV link
1136
-} elseif ((null === $session->get('user-validite_pw')|| empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true)
1136
+} elseif ((null === $session->get('user-validite_pw') || empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true)
1137 1137
     && empty($get['otv']) === false
1138 1138
 ) {
1139 1139
     // case where one-shot viewer
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
                 FILTER_SANITIZE_URL
1153 1153
             )
1154 1154
         );
1155
-        include $SETTINGS['cpassman_dir'] . '/error.php';
1155
+        include $SETTINGS['cpassman_dir'].'/error.php';
1156 1156
     }
1157 1157
 } elseif (//(empty($session->get('user-id')) === false && $session->get('user-id') !== null) ||
1158 1158
         empty($session->get('user-id')) === true
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
     }
1178 1178
     
1179 1179
     // LOGIN form  
1180
-    include $SETTINGS['cpassman_dir'] . '/includes/core/login.php';
1180
+    include $SETTINGS['cpassman_dir'].'/includes/core/login.php';
1181 1181
     
1182 1182
 } else {
1183 1183
     // Clear session
@@ -1210,153 +1210,153 @@  discard block
 block discarded – undo
1210 1210
     <!-- REQUIRED SCRIPTS -->
1211 1211
 
1212 1212
     <!-- Font Awesome Icons -->
1213
-    <link href="plugins/fontawesome-free-6/css/fontawesome.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1214
-    <link href="plugins/fontawesome-free-6/css/solid.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1215
-    <link href="plugins/fontawesome-free-6/css/regular.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1216
-    <link href="plugins/fontawesome-free-6/css/brands.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet">
1217
-    <link href="plugins/fontawesome-free-6/css/v5-font-face.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet" /> 
1213
+    <link href="plugins/fontawesome-free-6/css/fontawesome.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1214
+    <link href="plugins/fontawesome-free-6/css/solid.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1215
+    <link href="plugins/fontawesome-free-6/css/regular.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1216
+    <link href="plugins/fontawesome-free-6/css/brands.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet">
1217
+    <link href="plugins/fontawesome-free-6/css/v5-font-face.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet" /> 
1218 1218
     <!-- jQuery -->
1219
-    <script src="plugins/jquery/jquery.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1220
-    <script src="plugins/jquery/jquery.cookie.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1219
+    <script src="plugins/jquery/jquery.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1220
+    <script src="plugins/jquery/jquery.cookie.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1221 1221
     <!-- jQuery UI -->
1222
-    <script src="plugins/jqueryUI/jquery-ui.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1223
-    <link rel="stylesheet" href="plugins/jqueryUI/jquery-ui.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1222
+    <script src="plugins/jqueryUI/jquery-ui.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1223
+    <link rel="stylesheet" href="plugins/jqueryUI/jquery-ui.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1224 1224
     <!-- Popper -->
1225
-    <script src="plugins/popper/umd/popper.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1225
+    <script src="plugins/popper/umd/popper.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1226 1226
     <!-- Bootstrap -->
1227
-    <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1227
+    <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1228 1228
     <!-- AdminLTE -->
1229
-    <script src="plugins/adminlte/js/adminlte.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1229
+    <script src="plugins/adminlte/js/adminlte.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1230 1230
     <!-- Altertify -->
1231 1231
     <!--<script type="text/javascript" src="plugins/alertifyjs/alertify.min.js"></script>-->
1232 1232
     <!-- Toastr -->
1233
-    <script type="text/javascript" src="plugins/toastr/toastr.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1233
+    <script type="text/javascript" src="plugins/toastr/toastr.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1234 1234
     <!-- STORE.JS -->
1235
-    <script type="text/javascript" src="plugins/store.js/dist/store.everything.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1235
+    <script type="text/javascript" src="plugins/store.js/dist/store.everything.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1236 1236
     <!-- cryptojs-aesphp -->
1237
-    <script type="text/javascript" src="includes/libraries/cryptojs/crypto-js.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1238
-    <script type="text/javascript" src="includes/libraries/cryptojs/encryption.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1237
+    <script type="text/javascript" src="includes/libraries/cryptojs/crypto-js.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1238
+    <script type="text/javascript" src="includes/libraries/cryptojs/encryption.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1239 1239
     <!-- pace -->
1240
-    <script type="text/javascript" data-pace-options='{ "ajax": true, "eventLag": false }' src="plugins/pace-progress/pace.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1240
+    <script type="text/javascript" data-pace-options='{ "ajax": true, "eventLag": false }' src="plugins/pace-progress/pace.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1241 1241
     <!-- select2 -->
1242
-    <script type="text/javascript" src="plugins/select2/js/select2.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1242
+    <script type="text/javascript" src="plugins/select2/js/select2.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1243 1243
     <!-- simplePassMeter -->
1244
-    <link rel="stylesheet" href="plugins/simplePassMeter/simplePassMeter.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
1245
-    <script type="text/javascript" src="plugins/simplePassMeter/simplePassMeter.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1244
+    <link rel="stylesheet" href="plugins/simplePassMeter/simplePassMeter.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
1245
+    <script type="text/javascript" src="plugins/simplePassMeter/simplePassMeter.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1246 1246
     <!-- platform -->
1247
-    <script type="text/javascript" src="plugins/platform/platform.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1247
+    <script type="text/javascript" src="plugins/platform/platform.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1248 1248
     <!-- radiobuttons -->
1249
-    <link rel="stylesheet" href="plugins/radioforbuttons/bootstrap-buttons.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" />
1250
-    <script type="text/javascript" src="plugins/radioforbuttons/jquery.radiosforbuttons.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1249
+    <link rel="stylesheet" href="plugins/radioforbuttons/bootstrap-buttons.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" />
1250
+    <script type="text/javascript" src="plugins/radioforbuttons/jquery.radiosforbuttons.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1251 1251
     <!-- ICHECK -->
1252 1252
     <!--<link rel="stylesheet" href="./plugins/icheck-material/icheck-material.min.css">-->
1253
-    <link rel="stylesheet" href="./plugins/icheck/skins/all.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1254
-    <script type="text/javascript" src="./plugins/icheck/icheck.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1253
+    <link rel="stylesheet" href="./plugins/icheck/skins/all.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1254
+    <script type="text/javascript" src="./plugins/icheck/icheck.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1255 1255
     <!-- bootstrap-add-clear -->
1256
-    <script type="text/javascript" src="plugins/bootstrap-add-clear/bootstrap-add-clear.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1256
+    <script type="text/javascript" src="plugins/bootstrap-add-clear/bootstrap-add-clear.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1257 1257
     <!-- DOMPurify -->
1258
-    <script type="text/javascript" src="plugins/DOMPurify/purify.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1258
+    <script type="text/javascript" src="plugins/DOMPurify/purify.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1259 1259
 
1260 1260
     <?php
1261 1261
     $get['page'] = $request->query->filter('page', null, FILTER_SANITIZE_SPECIAL_CHARS);
1262 1262
     if ($menuAdmin === true) {
1263 1263
         ?>
1264
-        <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1265
-        <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1266
-        <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1264
+        <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1265
+        <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1266
+        <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1267 1267
         <!-- InputMask -->
1268
-        <script src="./plugins/inputmask/jquery.inputmask.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1268
+        <script src="./plugins/inputmask/jquery.inputmask.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1269 1269
         <!-- Sortable -->
1270 1270
         <!--<script src="./plugins/sortable/jquery.sortable.js"></script>-->
1271 1271
         <!-- PLUPLOAD -->
1272
-        <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1272
+        <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1273 1273
         <!-- DataTables -->
1274
-        <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1275
-        <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1276
-        <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1277
-        <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1278
-        <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1279
-        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1280
-        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1281
-        <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1282
-        <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1283
-        <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1274
+        <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1275
+        <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1276
+        <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1277
+        <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1278
+        <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1279
+        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1280
+        <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1281
+        <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1282
+        <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1283
+        <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1284 1284
     <?php
1285 1285
     } elseif (isset($get['page']) === true) {
1286 1286
         if (in_array($get['page'], ['items', 'import']) === true) {
1287 1287
             ?>
1288
-            <link rel="stylesheet" href="./plugins/jstree/themes/default/style.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1289
-            <link rel="stylesheet" href="./plugins/jstree/themes/default-dark/style.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1290
-            <script src="./plugins/jstree/jstree.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1288
+            <link rel="stylesheet" href="./plugins/jstree/themes/default/style.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1289
+            <link rel="stylesheet" href="./plugins/jstree/themes/default-dark/style.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1290
+            <script src="./plugins/jstree/jstree.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1291 1291
             <!-- countdownTimer -->
1292
-            <script src="./plugins/jquery.countdown360/jquery.countdown360.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1292
+            <script src="./plugins/jquery.countdown360/jquery.countdown360.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1293 1293
             <!-- SUMMERNOTE -->
1294
-            <link rel="stylesheet" href="./plugins/summernote/summernote-bs4.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1295
-            <script src="./plugins/summernote/summernote-bs4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1294
+            <link rel="stylesheet" href="./plugins/summernote/summernote-bs4.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1295
+            <script src="./plugins/summernote/summernote-bs4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1296 1296
             <!-- date-picker -->
1297
-            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1298
-            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1297
+            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1298
+            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1299 1299
             <!-- time-picker -->
1300
-            <link rel="stylesheet" href="./plugins/timepicker/bootstrap-timepicker.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1301
-            <script src="./plugins/timepicker/bootstrap-timepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1300
+            <link rel="stylesheet" href="./plugins/timepicker/bootstrap-timepicker.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1301
+            <script src="./plugins/timepicker/bootstrap-timepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1302 1302
             <!-- PLUPLOAD -->
1303
-            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1303
+            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1304 1304
             <!-- VALIDATE -->
1305
-            <script type="text/javascript" src="plugins/jquery-validation/jquery.validate.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1305
+            <script type="text/javascript" src="plugins/jquery-validation/jquery.validate.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1306 1306
             <!-- PWSTRENGHT -->
1307
-            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1308
-            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1307
+            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1308
+            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1309 1309
             <!-- TOGGLE -->
1310
-            <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1311
-            <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" />
1312
-            <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1310
+            <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1311
+            <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" />
1312
+            <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script>
1313 1313
         <?php
1314 1314
         } elseif (in_array($get['page'], ['search', 'folders', 'users', 'roles', 'utilities.deletion', 'utilities.logs', 'utilities.database', 'utilities.renewal', 'tasks']) === true) {
1315 1315
             ?>
1316 1316
             <!-- DataTables -->
1317
-            <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1318
-            <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1319
-            <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1320
-            <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1321
-            <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1322
-            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1323
-            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1324
-            <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1325
-            <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1326
-            <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1317
+            <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1318
+            <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1319
+            <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1320
+            <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1321
+            <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1322
+            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1323
+            <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1324
+            <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1325
+            <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1326
+            <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1327 1327
             <!-- dater picker -->
1328
-            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1329
-            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1328
+            <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1329
+            <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1330 1330
             <!-- daterange picker -->
1331
-            <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>">
1332
-            <script src="./plugins/moment/moment.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1333
-            <script src="./plugins/daterangepicker/daterangepicker.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1331
+            <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>">
1332
+            <script src="./plugins/moment/moment.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1333
+            <script src="./plugins/daterangepicker/daterangepicker.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1334 1334
             <!-- SlimScroll -->
1335
-            <script src="./plugins/slimScroll/jquery.slimscroll.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1335
+            <script src="./plugins/slimScroll/jquery.slimscroll.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1336 1336
             <!-- FastClick -->
1337
-            <script src="./plugins/fastclick/fastclick.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1337
+            <script src="./plugins/fastclick/fastclick.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1338 1338
         <?php
1339 1339
         } elseif ($get['page'] === 'profile') {
1340 1340
             ?>
1341 1341
             <!-- FILESAVER -->
1342
-            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1342
+            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1343 1343
             <!-- PLUPLOAD -->
1344
-            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1344
+            <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1345 1345
         <?php
1346 1346
         } elseif ($get['page'] === 'export') {
1347 1347
             ?>
1348 1348
             <!-- FILESAVER -->
1349
-            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1349
+            <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1350 1350
             <!-- PWSTRENGHT -->
1351
-            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1352
-            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1351
+            <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1352
+            <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1353 1353
         <?php
1354 1354
         }
1355 1355
     }
1356 1356
     ?>
1357 1357
     <!-- functions -->
1358
-    <script type="text/javascript" src="includes/js/functions.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1359
-    <script type="text/javascript" src="includes/js/CreateRandomString.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1358
+    <script type="text/javascript" src="includes/js/functions.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1359
+    <script type="text/javascript" src="includes/js/CreateRandomString.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1360 1360
     <input type="hidden" id="encryptClientServerStatus" value="<?php echo $SETTINGS['encryptClientServer'] ?? 1; ?>" />
1361 1361
 
1362 1362
     </body>
@@ -1398,7 +1398,7 @@  discard block
 block discarded – undo
1398 1398
     };
1399 1399
 </script>
1400 1400
 
1401
-<script type="text/javascript" src="includes/js/secure-clipboard-cleaner.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script>
1401
+<script type="text/javascript" src="includes/js/secure-clipboard-cleaner.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script>
1402 1402
 
1403 1403
 <script>
1404 1404
     $(document).ready(function() {
@@ -1457,65 +1457,65 @@  discard block
 block discarded – undo
1457 1457
 
1458 1458
 // Load links, css and javascripts
1459 1459
 if (isset($SETTINGS['cpassman_dir']) === true) {
1460
-    include_once $SETTINGS['cpassman_dir'] . '/includes/core/load.js.php';
1460
+    include_once $SETTINGS['cpassman_dir'].'/includes/core/load.js.php';
1461 1461
     if ($menuAdmin === true) {
1462
-        include_once $SETTINGS['cpassman_dir'] . '/pages/admin.js.php';
1462
+        include_once $SETTINGS['cpassman_dir'].'/pages/admin.js.php';
1463 1463
         if ($get['page'] === '2fa') {
1464
-            include_once $SETTINGS['cpassman_dir'] . '/pages/2fa.js.php';
1464
+            include_once $SETTINGS['cpassman_dir'].'/pages/2fa.js.php';
1465 1465
         } elseif ($get['page'] === 'api') {
1466
-            include_once $SETTINGS['cpassman_dir'] . '/pages/api.js.php';
1466
+            include_once $SETTINGS['cpassman_dir'].'/pages/api.js.php';
1467 1467
         } elseif ($get['page'] === 'backups') {
1468
-            include_once $SETTINGS['cpassman_dir'] . '/pages/backups.js.php';
1468
+            include_once $SETTINGS['cpassman_dir'].'/pages/backups.js.php';
1469 1469
         } elseif ($get['page'] === 'emails') {
1470
-            include_once $SETTINGS['cpassman_dir'] . '/pages/emails.js.php';
1470
+            include_once $SETTINGS['cpassman_dir'].'/pages/emails.js.php';
1471 1471
         } elseif ($get['page'] === 'ldap') {
1472
-            include_once $SETTINGS['cpassman_dir'] . '/pages/ldap.js.php';
1472
+            include_once $SETTINGS['cpassman_dir'].'/pages/ldap.js.php';
1473 1473
         } elseif ($get['page'] === 'uploads') {
1474
-            include_once $SETTINGS['cpassman_dir'] . '/pages/uploads.js.php';
1474
+            include_once $SETTINGS['cpassman_dir'].'/pages/uploads.js.php';
1475 1475
         } elseif ($get['page'] === 'fields') {
1476
-            include_once $SETTINGS['cpassman_dir'] . '/pages/fields.js.php';
1476
+            include_once $SETTINGS['cpassman_dir'].'/pages/fields.js.php';
1477 1477
         } elseif ($get['page'] === 'options') {
1478
-            include_once $SETTINGS['cpassman_dir'] . '/pages/options.js.php';
1478
+            include_once $SETTINGS['cpassman_dir'].'/pages/options.js.php';
1479 1479
         } elseif ($get['page'] === 'statistics') {
1480
-            include_once $SETTINGS['cpassman_dir'] . '/pages/statistics.js.php';
1480
+            include_once $SETTINGS['cpassman_dir'].'/pages/statistics.js.php';
1481 1481
         } elseif ($get['page'] === 'tasks') {
1482
-            include_once $SETTINGS['cpassman_dir'] . '/pages/tasks.js.php';
1482
+            include_once $SETTINGS['cpassman_dir'].'/pages/tasks.js.php';
1483 1483
         } elseif ($get['page'] === 'oauth') {
1484
-            include_once $SETTINGS['cpassman_dir'] . '/pages/oauth.js.php';        
1484
+            include_once $SETTINGS['cpassman_dir'].'/pages/oauth.js.php';        
1485 1485
         } elseif ($get['page'] === 'tools') {
1486
-            include_once $SETTINGS['cpassman_dir'] . '/pages/tools.js.php';
1486
+            include_once $SETTINGS['cpassman_dir'].'/pages/tools.js.php';
1487 1487
         }
1488 1488
     } elseif (isset($get['page']) === true && $get['page'] !== '') {
1489 1489
         if ($get['page'] === 'items') {
1490
-            include_once $SETTINGS['cpassman_dir'] . '/pages/items.js.php';
1490
+            include_once $SETTINGS['cpassman_dir'].'/pages/items.js.php';
1491 1491
         } elseif ($get['page'] === 'import') {
1492
-            include_once $SETTINGS['cpassman_dir'] . '/pages/import.js.php';
1492
+            include_once $SETTINGS['cpassman_dir'].'/pages/import.js.php';
1493 1493
         } elseif ($get['page'] === 'export') {
1494
-            include_once $SETTINGS['cpassman_dir'] . '/pages/export.js.php';
1494
+            include_once $SETTINGS['cpassman_dir'].'/pages/export.js.php';
1495 1495
         } elseif ($get['page'] === 'offline') {
1496
-            include_once $SETTINGS['cpassman_dir'] . '/pages/offline.js.php';
1496
+            include_once $SETTINGS['cpassman_dir'].'/pages/offline.js.php';
1497 1497
         } elseif ($get['page'] === 'search') {
1498
-            include_once $SETTINGS['cpassman_dir'] . '/pages/search.js.php';
1498
+            include_once $SETTINGS['cpassman_dir'].'/pages/search.js.php';
1499 1499
         } elseif ($get['page'] === 'profile') {
1500
-            include_once $SETTINGS['cpassman_dir'] . '/pages/profile.js.php';
1500
+            include_once $SETTINGS['cpassman_dir'].'/pages/profile.js.php';
1501 1501
         } elseif ($get['page'] === 'favourites') {
1502
-            include_once $SETTINGS['cpassman_dir'] . '/pages/favorites.js.php';
1502
+            include_once $SETTINGS['cpassman_dir'].'/pages/favorites.js.php';
1503 1503
         } elseif ($get['page'] === 'folders') {
1504
-            include_once $SETTINGS['cpassman_dir'] . '/pages/folders.js.php';
1504
+            include_once $SETTINGS['cpassman_dir'].'/pages/folders.js.php';
1505 1505
         } elseif ($get['page'] === 'users') {
1506
-            include_once $SETTINGS['cpassman_dir'] . '/pages/users.js.php';
1506
+            include_once $SETTINGS['cpassman_dir'].'/pages/users.js.php';
1507 1507
         } elseif ($get['page'] === 'roles') {
1508
-            include_once $SETTINGS['cpassman_dir'] . '/pages/roles.js.php';
1508
+            include_once $SETTINGS['cpassman_dir'].'/pages/roles.js.php';
1509 1509
         } elseif ($get['page'] === 'utilities.deletion') {
1510
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.deletion.js.php';
1510
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.deletion.js.php';
1511 1511
         } elseif ($get['page'] === 'utilities.logs') {
1512
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.logs.js.php';
1512
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.logs.js.php';
1513 1513
         } elseif ($get['page'] === 'utilities.database') {
1514
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.database.js.php';
1514
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.database.js.php';
1515 1515
         } elseif ($get['page'] === 'utilities.renewal') {
1516
-            include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.renewal.js.php';
1516
+            include_once $SETTINGS['cpassman_dir'].'/pages/utilities.renewal.js.php';
1517 1517
         }
1518 1518
     } else {
1519
-        include_once $SETTINGS['cpassman_dir'] . '/includes/core/login.js.php';
1519
+        include_once $SETTINGS['cpassman_dir'].'/includes/core/login.js.php';
1520 1520
     }
1521 1521
 }
Please login to merge, or discard this patch.
pages/fields.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('fields') === false) {
70 70
     // Not allowed page
71 71
     $session->set('system-error_code', ERR_NOT_ALLOWED);
72
-    include $SETTINGS['cpassman_dir'] . '/error.php';
72
+    include $SETTINGS['cpassman_dir'].'/error.php';
73 73
     exit;
74 74
 }
75 75
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                                         $folders = $tree->getDescendants();
182 182
 foreach ($folders as $folder) {
183 183
     DB::query(
184
-        'SELECT * FROM ' . prefixTable('nested_tree') . '
184
+        'SELECT * FROM '.prefixTable('nested_tree').'
185 185
                                         WHERE personal_folder = %i AND id = %i',
186 186
         '0',
187 187
         $folder->id
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             $ident .= '-';
194 194
         }
195 195
         echo '
196
-                                        <option value="' . $folder->id . '">' . $ident . '&nbsp;' . str_replace('&', '&amp;', $folder->title) . '</option>';
196
+                                        <option value="' . $folder->id.'">'.$ident.'&nbsp;'.str_replace('&', '&amp;', $folder->title).'</option>';
197 197
     }
198 198
 }
199 199
                                         ?>
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
                                     <select class="form-control form-item-control select2" style="width:100%;" id="form-field-type">
225 225
                                         <?php
226 226
                                         // Build list of Types
227
-                                        echo '<option value="">-- ' . $lang->get('select') . ' --</option>
228
-                                            <option value="text">' . $lang->get('text') . '</option>
229
-                                            <option value="textarea">' . $lang->get('textarea') . '</option>';
227
+                                        echo '<option value="">-- '.$lang->get('select').' --</option>
228
+                                            <option value="text">' . $lang->get('text').'</option>
229
+                                            <option value="textarea">' . $lang->get('textarea').'</option>';
230 230
                                         ?>
231 231
                                     </select>
232 232
                                 </div>
@@ -259,14 +259,14 @@  discard block
 block discarded – undo
259 259
                                     <select class="form-control form-item-control select2 no-save" multiple="multiple" style="width:100%;" id="form-field-roles">
260 260
                                         <?php
261 261
                                         // Build list of Roles
262
-                                        echo '<option value="all">' . $lang->get('every_roles') . '</option>';
262
+                                        echo '<option value="all">'.$lang->get('every_roles').'</option>';
263 263
 $rows = DB::query(
264 264
     'SELECT id, title
265
-                                    FROM ' . prefixTable('roles_title') . '
265
+                                    FROM ' . prefixTable('roles_title').'
266 266
                                     ORDER BY title ASC'
267 267
 );
268 268
 foreach ($rows as $record) {
269
-    echo '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>';
269
+    echo '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>';
270 270
 }
271 271
                                         ?>
272 272
                                     </select>
Please login to merge, or discard this patch.
sources/folders.queries.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
                     && $t->personal_folder == 0
138 138
                 ) {
139 139
                     // get $t->parent_id
140
-                    $data = DB::queryFirstRow('SELECT title FROM ' . prefixTable('nested_tree') . ' WHERE id = %i', $t->parent_id);
140
+                    $data = DB::queryFirstRow('SELECT title FROM '.prefixTable('nested_tree').' WHERE id = %i', $t->parent_id);
141 141
                     if ($t->nlevel == 1) {
142 142
                         $data['title'] = $lang->get('root');
143 143
                     }
144 144
 
145 145
                     // get rights on this folder
146 146
                     $arrayRights = array();
147
-                    $rows = DB::query('SELECT fonction_id  FROM ' . prefixTable('rights') . ' WHERE authorized=%i AND tree_id = %i', 1, $t->id);
147
+                    $rows = DB::query('SELECT fonction_id  FROM '.prefixTable('rights').' WHERE authorized=%i AND tree_id = %i', 1, $t->id);
148 148
                     foreach ($rows as $record) {
149 149
                         array_push($arrayRights, $record['fonction_id']);
150 150
                     }
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
                         'SELECT m.valeur AS valeur, n.renewal_period AS renewal_period,
163 163
                         n.bloquer_creation AS bloquer_creation, n.bloquer_modification AS bloquer_modification,
164 164
                         n.fa_icon AS fa_icon, n.fa_icon_selected AS fa_icon_selected
165
-                        FROM ' . prefixTable('misc') . ' AS m,
166
-                        ' . prefixTable('nested_tree') . ' AS n
165
+                        FROM ' . prefixTable('misc').' AS m,
166
+                        ' . prefixTable('nested_tree').' AS n
167 167
                         WHERE m.type=%s AND m.intitule = n.id AND m.intitule = %i',
168 168
                         'complex',
169 169
                         $t->id
@@ -191,16 +191,16 @@  discard block
 block discarded – undo
191 191
                         $arrayColumns['folderComplexity'] = '';
192 192
                     }
193 193
 
194
-                    if (is_null($node_data)=== false) {
194
+                    if (is_null($node_data) === false) {
195 195
                         $arrayColumns['renewalPeriod'] = (int) $node_data['renewal_period'];
196 196
                     } else {
197
-                        $arrayColumns['renewalPeriod']=0;
197
+                        $arrayColumns['renewalPeriod'] = 0;
198 198
                     }
199 199
 
200 200
                     //col7
201 201
                     $data7 = DB::queryFirstRow(
202 202
                         'SELECT bloquer_creation,bloquer_modification
203
-                        FROM ' . prefixTable('nested_tree') . '
203
+                        FROM ' . prefixTable('nested_tree').'
204 204
                         WHERE id = %i',
205 205
                         intval($t->id)
206 206
                     );
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
             // Get info about this folder
359 359
             $dataFolder = DB::queryFirstRow(
360 360
                 'SELECT *
361
-                FROM ' . prefixTable('nested_tree') . '
361
+                FROM ' . prefixTable('nested_tree').'
362 362
                 WHERE id = %i',
363 363
                 $inputData['id']
364 364
             );
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             //check if parent folder is personal
395 395
             $dataParent = DB::queryFirstRow(
396 396
                 'SELECT personal_folder, bloquer_creation, bloquer_modification
397
-                FROM ' . prefixTable('nested_tree') . '
397
+                FROM ' . prefixTable('nested_tree').'
398 398
                 WHERE id = %i',
399 399
                 $inputData['parentId']
400 400
             );
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
                     // get complexity level for this folder
424 424
                     $data = DB::queryFirstRow(
425 425
                         'SELECT valeur
426
-                        FROM ' . prefixTable('misc') . '
426
+                        FROM ' . prefixTable('misc').'
427 427
                         WHERE intitule = %i AND type = %s',
428 428
                         $inputData['parentId'],
429 429
                         'complex'
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
                             array(
435 435
                                 'error' => true,
436 436
                                 'message' => $lang->get('error_folder_complexity_lower_than_top_folder')
437
-                                    . ' [<b>' . TP_PW_COMPLEXITY[$data['valeur']][1] . '</b>]',
437
+                                    . ' [<b>'.TP_PW_COMPLEXITY[$data['valeur']][1].'</b>]',
438 438
                             ),
439 439
                             'encode'
440 440
                         );
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
             // Check if parent folder is personal
595 595
             $dataParent = DB::queryFirstRow(
596 596
                 'SELECT personal_folder
597
-                FROM ' . prefixTable('nested_tree') . '
597
+                FROM ' . prefixTable('nested_tree').'
598 598
                 WHERE id = %i',
599 599
                 $inputData['parentId']
600 600
             );
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
             echo prepareExchangedData(
642 642
                 array(
643 643
                     'error' => $creationStatus['error'],
644
-                    'message' => $creationStatus['error'] === true ? $lang->get('error_not_allowed_to') : $lang->get('folder_created') ,
644
+                    'message' => $creationStatus['error'] === true ? $lang->get('error_not_allowed_to') : $lang->get('folder_created'),
645 645
                     'newId' => $creationStatus['newId'],
646 646
                 ),
647 647
                 'encode'
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
                 echo prepareExchangedData(
690 690
                     array(
691 691
                         'error' => true,
692
-                        'message' => $lang->get('error_not_allowed_to'). " (You can't delete the root folder)",
692
+                        'message' => $lang->get('error_not_allowed_to')." (You can't delete the root folder)",
693 693
                     ),
694 694
                     'encode'
695 695
                 );
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
             // Ensure that user has access to all folders
700 700
             $foldersAccessible = DB::query(
701 701
                 'SELECT id
702
-                FROM ' . prefixTable('nested_tree') . '
702
+                FROM ' . prefixTable('nested_tree').'
703 703
                 WHERE id IN %li AND id IN %li',
704 704
                 $post_folders,
705 705
                 $session->get('user-accessible_folders')
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
                 echo prepareExchangedData(
714 714
                     array(
715 715
                         'error' => true,
716
-                        'message' => $lang->get('error_not_allowed_to') . ' (The following folders are not accessible or do not exist: ' . implode(', ', $missingFolders) . ')',
716
+                        'message' => $lang->get('error_not_allowed_to').' (The following folders are not accessible or do not exist: '.implode(', ', $missingFolders).')',
717 717
                     ),
718 718
                     'encode'
719 719
                 );
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
                 // Check if parent folder is personal
731 731
                 $dataParent = DB::queryFirstRow(
732 732
                     'SELECT personal_folder
733
-                    FROM ' . prefixTable('nested_tree') . '
733
+                    FROM ' . prefixTable('nested_tree').'
734 734
                     WHERE id = %i',
735 735
                     $folderId
736 736
                 );
@@ -776,10 +776,10 @@  discard block
 block discarded – undo
776 776
                                 prefixTable('misc'),
777 777
                                 array(
778 778
                                     'type' => 'folder_deleted',
779
-                                    'intitule' => 'f' . $thisSubFolders->id,
780
-                                    'valeur' => $thisSubFolders->id . ', ' . $thisSubFolders->parent_id . ', ' .
781
-                                        $thisSubFolders->title . ', ' . $thisSubFolders->nleft . ', ' . $thisSubFolders->nright . ', ' .
782
-                                        $thisSubFolders->nlevel . ', 0, 0, 0, 0',
779
+                                    'intitule' => 'f'.$thisSubFolders->id,
780
+                                    'valeur' => $thisSubFolders->id.', '.$thisSubFolders->parent_id.', '.
781
+                                        $thisSubFolders->title.', '.$thisSubFolders->nleft.', '.$thisSubFolders->nright.', '.
782
+                                        $thisSubFolders->nlevel.', 0, 0, 0, 0',
783 783
                                     'created_at' => time(),
784 784
                                 )
785 785
                             );
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
 
789 789
                             //delete items & logs
790 790
                             $itemsInSubFolder = DB::query(
791
-                                'SELECT id FROM ' . prefixTable('items') . ' 
791
+                                'SELECT id FROM '.prefixTable('items').' 
792 792
                                 WHERE id_tree=%i', 
793 793
                                 $thisSubFolders->id
794 794
                             );
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
                                 }
819 819
 
820 820
                                 //Update CACHE table
821
-                                updateCacheTable('delete_value',(int) $item['id']);
821
+                                updateCacheTable('delete_value', (int) $item['id']);
822 822
                             }
823 823
 
824 824
                             //Actualize the variable
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
             // Check if target parent folder is personal
931 931
             $dataParent = DB::queryFirstRow(
932 932
                 'SELECT personal_folder
933
-                FROM ' . prefixTable('nested_tree') . '
933
+                FROM ' . prefixTable('nested_tree').'
934 934
                 WHERE id = %i',
935 935
                 $post_target_folder_id
936 936
             );
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
                 // get complexity of current node
985 985
                 $nodeComplexity = DB::queryFirstRow(
986 986
                     'SELECT valeur
987
-                    FROM ' . prefixTable('misc') . '
987
+                    FROM ' . prefixTable('misc').'
988 988
                     WHERE intitule = %i AND type= %s',
989 989
                     $nodeInfo->id,
990 990
                     'complex'
@@ -1064,7 +1064,7 @@  discard block
 block discarded – undo
1064 1064
                 // If it is a subfolder, then give access to it for all roles that allows the parent folder
1065 1065
                 $rows = DB::query(
1066 1066
                     'SELECT role_id, type
1067
-                    FROM ' . prefixTable('roles_values') . '
1067
+                    FROM ' . prefixTable('roles_values').'
1068 1068
                     WHERE folder_id = %i',
1069 1069
                     $parentId
1070 1070
                 );
@@ -1083,7 +1083,7 @@  discard block
 block discarded – undo
1083 1083
                 // if parent folder has Custom Fields Categories then add to this child one too
1084 1084
                 $rows = DB::query(
1085 1085
                     'SELECT id_category
1086
-                    FROM ' . prefixTable('categories_folders') . '
1086
+                    FROM ' . prefixTable('categories_folders').'
1087 1087
                     WHERE id_folder = %i',
1088 1088
                     $nodeInfo->id
1089 1089
                 );
@@ -1108,7 +1108,7 @@  discard block
 block discarded – undo
1108 1108
                     // We will use TP_USER in order to decrypt and crypt passwords
1109 1109
                     $userTpInfo = DB::queryFirstRow(
1110 1110
                         'SELECT pw, public_key, private_key, login, name
1111
-                        FROM ' . prefixTable('users') . '
1111
+                        FROM ' . prefixTable('users').'
1112 1112
                         WHERE id = %i',
1113 1113
                         TP_USER_ID
1114 1114
                     );
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
                     $errorItems = [];
1120 1120
                     $rows = DB::query(
1121 1121
                         'SELECT *
1122
-                        FROM ' . prefixTable('items') . '
1122
+                        FROM ' . prefixTable('items').'
1123 1123
                         WHERE id_tree = %i',
1124 1124
                         $nodeInfo->id
1125 1125
                     );
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
                         // if it is then don't copy it
1129 1129
                         $item_deleted = DB::queryFirstRow(
1130 1130
                             'SELECT *
1131
-                            FROM ' . prefixTable('log_items') . '
1131
+                            FROM ' . prefixTable('log_items').'
1132 1132
                             WHERE id_item = %i AND action = %s
1133 1133
                             ORDER BY date DESC
1134 1134
                             LIMIT 0, 1',
@@ -1139,7 +1139,7 @@  discard block
 block discarded – undo
1139 1139
 
1140 1140
                         $item_restored = DB::queryFirstRow(
1141 1141
                             'SELECT *
1142
-                            FROM ' . prefixTable('log_items') . '
1142
+                            FROM ' . prefixTable('log_items').'
1143 1143
                             WHERE id_item = %i AND action = %s
1144 1144
                             ORDER BY date DESC
1145 1145
                             LIMIT 0, 1',
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
                              // Get the ITEM object key for the user
1155 1155
                             $itemUserTpKey = DB::queryFirstRow(
1156 1156
                                 'SELECT share_key
1157
-                                FROM ' . prefixTable('sharekeys_items') . '
1157
+                                FROM ' . prefixTable('sharekeys_items').'
1158 1158
                                 WHERE user_id = %i AND object_id = %i',
1159 1159
                                 TP_USER_ID,
1160 1160
                                 $record['id']
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
                     // Get path
1313 1313
                     $text = '';
1314 1314
                     foreach ($tree->getPath($folder->id, false) as $fld) {
1315
-                        $text .= empty($text) === true ? '     [<i>' . $fld->title : ' > ' . $fld->title;
1315
+                        $text .= empty($text) === true ? '     [<i>'.$fld->title : ' > '.$fld->title;
1316 1316
                     }
1317 1317
 
1318 1318
                     // Save array
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
                             'id' => (int) $folder->id,
1323 1323
                             'label' => $folder->title,
1324 1324
                             'level' => $folder->nlevel,
1325
-                            'path' => empty($text) === true ? '' : $text . '</i>]'
1325
+                            'path' => empty($text) === true ? '' : $text.'</i>]'
1326 1326
                         )
1327 1327
                     );
1328 1328
                 }
Please login to merge, or discard this patch.
sources/identify.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     $sessionPwdAttempts = $session->get('pwd_attempts');
148 148
     $sessionUrl = $session->get('user-initial_url');
149 149
     $server = [];
150
-    $server['PHP_AUTH_USER'] =  $request->getUser();
150
+    $server['PHP_AUTH_USER'] = $request->getUser();
151 151
     $server['PHP_AUTH_PW'] = $request->getPassword();
152 152
     
153 153
     // decrypt and retreive data in JSON format
@@ -167,18 +167,18 @@  discard block
 block discarded – undo
167 167
     }
168 168
 
169 169
     // Check if Duo auth is in progress and pass the pw and login back to the standard login process
170
-    if(
170
+    if (
171 171
         isKeyExistingAndEqual('duo', 1, $SETTINGS) === true
172 172
         && $dataReceived['user_2fa_selection'] === 'duo'
173 173
         && $session->get('user-duo_status') === 'IN_PROGRESS'
174 174
         && !empty($dataReceived['duo_state'])
175
-    ){
175
+    ) {
176 176
         $key = hash('sha256', $dataReceived['duo_state']);
177 177
         $iv = substr(hash('sha256', $dataReceived['duo_state']), 0, 16);
178 178
         $duo_data_dec = openssl_decrypt(base64_decode($session->get('user-duo_data')), 'AES-256-CBC', $key, 0, $iv);
179 179
         // Clear the data from the Duo process to continue clean with the standard login process
180
-        $session->set('user-duo_data','');
181
-        if($duo_data_dec === false) {
180
+        $session->set('user-duo_data', '');
181
+        if ($duo_data_dec === false) {
182 182
             // Add failed authentication log
183 183
             addFailedAuthentication(filter_var($dataReceived['login'], FILTER_SANITIZE_FULL_SPECIAL_CHARS), getClientIpServer());
184 184
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $dataReceived['login'] = $duo_data['duo_login'];
197 197
     }
198 198
 
199
-    if(isset($dataReceived['pw']) === false || isset($dataReceived['login']) === false) {
199
+    if (isset($dataReceived['pw']) === false || isset($dataReceived['login']) === false) {
200 200
         echo json_encode([
201 201
             'data' => prepareExchangedData(
202 202
                 [
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
         }
560 560
         // Append with roles from AD groups
561 561
         if (is_null($userInfo['roles_from_ad_groups']) === false) {
562
-            $userInfo['fonction_id'] = empty($userInfo['fonction_id'])  === true ? $userInfo['roles_from_ad_groups'] : $userInfo['fonction_id']. ';' . $userInfo['roles_from_ad_groups'];
562
+            $userInfo['fonction_id'] = empty($userInfo['fonction_id']) === true ? $userInfo['roles_from_ad_groups'] : $userInfo['fonction_id'].';'.$userInfo['roles_from_ad_groups'];
563 563
         }
564 564
         // store
565 565
         $session->set('user-roles', $userInfo['fonction_id']);
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         if (count($session->get('user-roles_array')) > 0) {
572 572
             $rolesList = DB::query(
573 573
                 'SELECT id, title, complexity
574
-                FROM ' . prefixTable('roles_title') . '
574
+                FROM ' . prefixTable('roles_title').'
575 575
                 WHERE id IN %li',
576 576
                 $session->get('user-roles_array')
577 577
             );
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
             if ($adjustPermissions) {
618 618
                 $session->set('user-admin', (int) $userInfo['admin']);
619 619
                 $session->set('user-manager', (int) $userInfo['gestionnaire']);
620
-                $session->set('user-can_manage_all_users',(int)  $userInfo['can_manage_all_users']);
620
+                $session->set('user-can_manage_all_users', (int) $userInfo['can_manage_all_users']);
621 621
                 $session->set('user-read_only', (int) $userInfo['read_only']);
622 622
                 DB::update(
623 623
                     prefixTable('users'),
@@ -686,10 +686,10 @@  discard block
 block discarded – undo
686 686
         // Get last seen items
687 687
         $session->set('user-nb_roles', 0);
688 688
         foreach ($session->get('user-latest_items') as $item) {
689
-            if (! empty($item)) {
689
+            if (!empty($item)) {
690 690
                 $dataLastItems = DB::queryFirstRow(
691 691
                     'SELECT id,label,id_tree
692
-                    FROM ' . prefixTable('items') . '
692
+                    FROM ' . prefixTable('items').'
693 693
                     WHERE id=%i',
694 694
                     $item
695 695
                 );
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
         // Get cahce tree info
700 700
         $cacheTreeData = DB::queryFirstRow(
701 701
             'SELECT visible_folders
702
-            FROM ' . prefixTable('cache_tree') . '
702
+            FROM ' . prefixTable('cache_tree').'
703 703
             WHERE user_id=%i',
704 704
             (int) $session->get('user-id')
705 705
         );
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
             && (int) $sessionAdmin !== 1
732 732
         ) {
733 733
             // get all Admin users
734
-            $val = DB::queryFirstRow('SELECT email FROM ' . prefixTable('users') . " WHERE admin = %i and email != ''", 1);
734
+            $val = DB::queryFirstRow('SELECT email FROM '.prefixTable('users')." WHERE admin = %i and email != ''", 1);
735 735
             if (DB::count() > 0) {
736 736
                 // Add email to table
737 737
                 prepareSendingEmail(
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
                             '#tp_time#',
744 744
                         ],
745 745
                         [
746
-                            ' ' . $session->get('user-login') . ' (IP: ' . getClientIpServer() . ')',
746
+                            ' '.$session->get('user-login').' (IP: '.getClientIpServer().')',
747 747
                             date($SETTINGS['date_format'], (int) $session->get('user-last_connection')),
748 748
                             date($SETTINGS['time_format'], (int) $session->get('user-last_connection')),
749 749
                         ],
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 {
856 856
     $rows = DB::query(
857 857
         'SELECT date
858
-        FROM ' . prefixTable('log_system') . "
858
+        FROM ' . prefixTable('log_system')."
859 859
         WHERE field_1 = %s
860 860
         AND type = 'failed_auth'
861 861
         AND label = 'password_is_not_correct'
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
         foreach ($rows as $record) {
870 870
             array_push(
871 871
                 $arrAttempts,
872
-                date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['date'])
872
+                date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['date'])
873 873
             );
874 874
         }
875 875
     }
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
     $ldapConnection
905 905
 ) : bool
906 906
 {
907
-    include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
907
+    include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
908 908
 
909 909
     if ((int) $userInfoDisabled === 1) {
910 910
         return false;
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
         // If user has seed but no backup, create it on first successful login
993 993
         if (!empty($userInfo['user_derivation_seed']) && empty($userInfo['private_key_backup'])) {
994 994
             if (defined('LOG_TO_SERVER') && LOG_TO_SERVER === true) {
995
-                error_log('TEAMPASS Transparent Recovery - Creating backup for user ' . ($userInfo['login'] ?? 'unknown'));
995
+                error_log('TEAMPASS Transparent Recovery - Creating backup for user '.($userInfo['login'] ?? 'unknown'));
996 996
             }
997 997
 
998 998
             $derivedKey = deriveBackupKey($userInfo['user_derivation_seed'], $userInfo['public_key'], $SETTINGS);
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
     } catch (Exception $e) {
1164 1164
         return [
1165 1165
             'error' => true,
1166
-            'message' => "Error: " . $e->getMessage(),
1166
+            'message' => "Error: ".$e->getMessage(),
1167 1167
         ];
1168 1168
     }
1169 1169
 }
@@ -1194,7 +1194,7 @@  discard block
 block discarded – undo
1194 1194
                 'type' => 'OpenLDAP'
1195 1195
             ];
1196 1196
         default:
1197
-            throw new Exception("Unsupported LDAP type: " . $SETTINGS['ldap_type']);
1197
+            throw new Exception("Unsupported LDAP type: ".$SETTINGS['ldap_type']);
1198 1198
     }
1199 1199
 }
1200 1200
 
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
         );
1332 1332
     }
1333 1333
     
1334
-    throw new Exception("Unsupported LDAP type: " . $ldapHandler['type']);
1334
+    throw new Exception("Unsupported LDAP type: ".$ldapHandler['type']);
1335 1335
 }
1336 1336
 
1337 1337
 /**
@@ -1348,12 +1348,12 @@  discard block
 block discarded – undo
1348 1348
     if (isset($SETTINGS['enable_ad_users_with_ad_groups']) === true && (int) $SETTINGS['enable_ad_users_with_ad_groups'] === 1) {
1349 1349
         // Get user groups from AD
1350 1350
         $user_ad_groups = [];
1351
-        foreach($groups as $group) {
1351
+        foreach ($groups as $group) {
1352 1352
             //print_r($group);
1353 1353
             // get relation role id for AD group
1354 1354
             $role = DB::queryFirstRow(
1355 1355
                 'SELECT lgr.role_id
1356
-                FROM ' . prefixTable('ldap_groups_roles') . ' AS lgr
1356
+                FROM ' . prefixTable('ldap_groups_roles').' AS lgr
1357 1357
                 WHERE lgr.ldap_group_id = %s',
1358 1358
                 $group
1359 1359
             );
@@ -1416,7 +1416,7 @@  discard block
 block discarded – undo
1416 1416
     $passwordManager = new PasswordManager();
1417 1417
     
1418 1418
     // Migrate password if needed
1419
-    $result  = $passwordManager->migratePassword(
1419
+    $result = $passwordManager->migratePassword(
1420 1420
         $userInfo['pw'],
1421 1421
         $passwordClear,
1422 1422
         (int) $userInfo['id']
@@ -1490,7 +1490,7 @@  discard block
 block discarded – undo
1490 1490
             // Check if exists in DB
1491 1491
             $groupData = DB::queryFirstRow(
1492 1492
                 'SELECT id
1493
-                FROM ' . prefixTable('roles_title') . '
1493
+                FROM ' . prefixTable('roles_title').'
1494 1494
                 WHERE title = %s',
1495 1495
                 $group["displayName"]
1496 1496
             );
@@ -1639,7 +1639,7 @@  discard block
 block discarded – undo
1639 1639
             
1640 1640
             // generate new QR
1641 1641
             $new_2fa_qr = $tfa->getQRCodeImageAsDataUri(
1642
-                'Teampass - ' . $username,
1642
+                'Teampass - '.$username,
1643 1643
                 $userInfo['ga']
1644 1644
             );
1645 1645
             // clear temporary code from DB
@@ -1652,7 +1652,7 @@  discard block
 block discarded – undo
1652 1652
                 $userInfo['id']
1653 1653
             );
1654 1654
             $firstTime = [
1655
-                'value' => '<img src="' . $new_2fa_qr . '">',
1655
+                'value' => '<img src="'.$new_2fa_qr.'">',
1656 1656
                 'user_admin' => isset($sessionAdmin) ? (int) $sessionAdmin : '',
1657 1657
                 'initial_url' => isset($sessionUrl) === true ? $sessionUrl : '',
1658 1658
                 'pwd_attempts' => (int) $sessionPwdAttempts,
@@ -1808,7 +1808,7 @@  discard block
 block discarded – undo
1808 1808
         }*/
1809 1809
         return [
1810 1810
             'error' => true,
1811
-            'message' => $duo_error . $lang->get('duo_error_check_config'),
1811
+            'message' => $duo_error.$lang->get('duo_error_check_config'),
1812 1812
             'pwd_attempts' => (int) $sessionPwdAttempts,
1813 1813
             'debug_message' => $e->getMessage(),
1814 1814
             'proceedIdentification' => false,
@@ -1824,7 +1824,7 @@  discard block
 block discarded – undo
1824 1824
         } catch (DuoException $e) {
1825 1825
             return [
1826 1826
                 'error' => true,
1827
-                'message' => $duo_error . $lang->get('duo_error_url'),
1827
+                'message' => $duo_error.$lang->get('duo_error_url'),
1828 1828
                 'pwd_attempts' => (int) $sessionPwdAttempts,
1829 1829
                 'debug_message' => $e->getMessage(),
1830 1830
                 'proceedIdentification' => false,
@@ -1832,7 +1832,7 @@  discard block
 block discarded – undo
1832 1832
         }
1833 1833
         
1834 1834
         // Somethimes Duo return success but fail to return a URL, double check if the URL has been created
1835
-        if (!empty($duo_redirect_url) && filter_var($duo_redirect_url,FILTER_SANITIZE_URL)) {
1835
+        if (!empty($duo_redirect_url) && filter_var($duo_redirect_url, FILTER_SANITIZE_URL)) {
1836 1836
             // Since Duo Universal requires a redirect, let's store some info when the user get's back after completing the Duo prompt
1837 1837
             $key = hash('sha256', $duo_state);
1838 1838
             $iv = substr(hash('sha256', $duo_state), 0, 16);
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
         } else {
1861 1861
             return [
1862 1862
                 'error' => true,
1863
-                'message' => $duo_error . $lang->get('duo_error_url'),
1863
+                'message' => $duo_error.$lang->get('duo_error_url'),
1864 1864
                 'pwd_attempts' => (int) $sessionPwdAttempts,
1865 1865
                 'proceedIdentification' => false,
1866 1866
             ];
@@ -1881,8 +1881,8 @@  discard block
 block discarded – undo
1881 1881
         // return the response (which should be the user name)
1882 1882
         if ($decoded_token['preferred_username'] === $username) {
1883 1883
             $session->set('user-duo_status', 'COMPLET');
1884
-            $session->set('user-duo_state','');
1885
-            $session->set('user-duo_data','');
1884
+            $session->set('user-duo_state', '');
1885
+            $session->set('user-duo_data', '');
1886 1886
             $session->set('user-login', $username);
1887 1887
 
1888 1888
             return [
@@ -1893,9 +1893,9 @@  discard block
 block discarded – undo
1893 1893
             ];
1894 1894
         } else {
1895 1895
             // Something wrong, username from the original Duo request is different than the one received now
1896
-            $session->set('user-duo_status','');
1897
-            $session->set('user-duo_state','');
1898
-            $session->set('user-duo_data','');
1896
+            $session->set('user-duo_status', '');
1897
+            $session->set('user-duo_state', '');
1898
+            $session->set('user-duo_data', '');
1899 1899
 
1900 1900
             return [
1901 1901
                 'error' => true,
@@ -1906,9 +1906,9 @@  discard block
 block discarded – undo
1906 1906
         }
1907 1907
     }
1908 1908
     // If we are here something wrong
1909
-    $session->set('user-duo_status','');
1910
-    $session->set('user-duo_state','');
1911
-    $session->set('user-duo_data','');
1909
+    $session->set('user-duo_status', '');
1910
+    $session->set('user-duo_state', '');
1911
+    $session->set('user-duo_data', '');
1912 1912
     return [
1913 1913
         'error' => true,
1914 1914
         'message' => $lang->get('duo_login_mismatch'),
@@ -2027,7 +2027,7 @@  discard block
 block discarded – undo
2027 2027
         // Check for existing lock
2028 2028
         $unlock_at = DB::queryFirstField(
2029 2029
             'SELECT MAX(unlock_at)
2030
-             FROM ' . prefixTable('auth_failures') . '
2030
+             FROM ' . prefixTable('auth_failures').'
2031 2031
              WHERE unlock_at > %s
2032 2032
              AND ((source = %s AND value = %s) OR (source = %s AND value = %s))',
2033 2033
             date('Y-m-d H:i:s', time()),
@@ -2049,8 +2049,8 @@  discard block
 block discarded – undo
2049 2049
         // Get user info from DB
2050 2050
         $data = DB::queryFirstRow(
2051 2051
             'SELECT u.*, a.value AS api_key
2052
-            FROM ' . prefixTable('users') . ' AS u
2053
-            LEFT JOIN ' . prefixTable('api') . ' AS a ON (u.id = a.user_id)
2052
+            FROM ' . prefixTable('users').' AS u
2053
+            LEFT JOIN ' . prefixTable('api').' AS a ON (u.id = a.user_id)
2054 2054
             WHERE login = %s AND deleted_at IS NULL',
2055 2055
             $login
2056 2056
         );
@@ -2168,7 +2168,7 @@  discard block
 block discarded – undo
2168 2168
             'array' => [
2169 2169
                 'value' => 'bruteforce_wait',
2170 2170
                 'error' => true,
2171
-                'message' => $lang->get('bruteforce_wait') . (string) $e->getMessage(),
2171
+                'message' => $lang->get('bruteforce_wait').(string) $e->getMessage(),
2172 2172
             ]
2173 2173
         ];
2174 2174
     }
@@ -2273,7 +2273,7 @@  discard block
 block discarded – undo
2273 2273
     // Clean previous failed attempts
2274 2274
     $failedTasks = DB::query(
2275 2275
         'SELECT increment_id
2276
-        FROM ' . prefixTable('background_tasks') . '
2276
+        FROM ' . prefixTable('background_tasks').'
2277 2277
         WHERE process_type = %s
2278 2278
         AND JSON_EXTRACT(arguments, "$.new_user_id") = %i
2279 2279
         AND status = %s',
@@ -2390,7 +2390,7 @@  discard block
 block discarded – undo
2390 2390
                         $userKeys['public_key']
2391 2391
                     );
2392 2392
                 }*/
2393
-                    error_log('Switch user ' . $username . ' auth_type to oauth2');
2393
+                    error_log('Switch user '.$username.' auth_type to oauth2');
2394 2394
                 // Update user in database:
2395 2395
                 DB::update(
2396 2396
                     prefixTable('users'),
@@ -2614,12 +2614,12 @@  discard block
 block discarded – undo
2614 2614
 {
2615 2615
     // Find the latest "create_user_keys" task for the given user_id
2616 2616
     $latestTask = DB::queryFirstRow(
2617
-        'SELECT arguments, status FROM ' . prefixTable('background_tasks') . '
2617
+        'SELECT arguments, status FROM '.prefixTable('background_tasks').'
2618 2618
         WHERE process_type = %s
2619 2619
         AND arguments LIKE %s
2620 2620
         ORDER BY increment_id DESC
2621 2621
         LIMIT 1',
2622
-        'create_user_keys', '%"new_user_id":' . $userId . '%'
2622
+        'create_user_keys', '%"new_user_id":'.$userId.'%'
2623 2623
     );
2624 2624
 
2625 2625
     // If a failed task is found, return an error message
@@ -2831,15 +2831,15 @@  discard block
 block discarded – undo
2831 2831
 
2832 2832
             if ($ret['error'] !== false) {
2833 2833
                 logEvents($SETTINGS, 'failed_auth', 'bad_duo_mfa', '', stripslashes($username), stripslashes($username));
2834
-                $session->set('user-duo_status','');
2835
-                $session->set('user-duo_state','');
2836
-                $session->set('user-duo_data','');
2834
+                $session->set('user-duo_status', '');
2835
+                $session->set('user-duo_state', '');
2836
+                $session->set('user-duo_data', '');
2837 2837
                 return [
2838 2838
                     'error' => true,
2839 2839
                     'mfaData' => $ret,
2840 2840
                     'mfaQRCodeInfos' => false,
2841 2841
                 ];
2842
-            } else if ($ret['duo_url_ready'] === true){
2842
+            } else if ($ret['duo_url_ready'] === true) {
2843 2843
                 return [
2844 2844
                     'error' => false,
2845 2845
                     'mfaData' => $ret,
@@ -2903,7 +2903,7 @@  discard block
 block discarded – undo
2903 2903
     // Count failed attempts from this source
2904 2904
     $count = DB::queryFirstField(
2905 2905
         'SELECT COUNT(*)
2906
-        FROM ' . prefixTable('auth_failures') . '
2906
+        FROM ' . prefixTable('auth_failures').'
2907 2907
         WHERE source = %s AND value = %s',
2908 2908
         $source,
2909 2909
         $value
Please login to merge, or discard this patch.
sources/tools.queries.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('tools') === false) {
71 71
     // Not allowed page
72 72
     $session->set('system-error_code', ERR_NOT_ALLOWED);
73
-    include $SETTINGS['cpassman_dir'] . '/error.php';
73
+    include $SETTINGS['cpassman_dir'].'/error.php';
74 74
     exit;
75 75
 }
76 76
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         // Get TP_USER info
336 336
         $userInfo = DB::queryFirstRow(
337 337
             'SELECT pw, public_key, private_key, login, name
338
-            FROM ' . prefixTable('users') . '
338
+            FROM ' . prefixTable('users').'
339 339
             WHERE id = %i',
340 340
             TP_USER_ID
341 341
         );
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
         // Get one itemKey from current user
373 373
         $currentUserKey = DB::queryFirstRow(
374 374
             'SELECT ski.share_key, ski.increment_id AS increment_id, l.id_user
375
-            FROM ' . prefixTable('sharekeys_items') . ' AS ski
376
-            INNER JOIN ' . prefixTable('log_items') . ' AS l ON ski.object_id = l.id_item
375
+            FROM ' . prefixTable('sharekeys_items').' AS ski
376
+            INNER JOIN ' . prefixTable('log_items').' AS l ON ski.object_id = l.id_item
377 377
             WHERE ski.user_id = %i
378 378
             ORDER BY RAND()
379 379
             LIMIT 1',
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
                 echo  prepareExchangedData(
393 393
                     array(
394 394
                         'error' => true,
395
-                        'message' => 'No issue found, normal process should work. This process is now finished. (item id : ' . $currentUserKey['increment_id'] . ')',
395
+                        'message' => 'No issue found, normal process should work. This process is now finished. (item id : '.$currentUserKey['increment_id'].')',
396 396
                     ),
397 397
                     'encode'
398 398
                 );
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
         // Get user info
453 453
         $userInfo = DB::queryFirstRow(
454 454
             'SELECT public_key, private_key
455
-            FROM ' . prefixTable('users') . '
455
+            FROM ' . prefixTable('users').'
456 456
             WHERE id = %i',
457 457
             $userId
458 458
         );
@@ -475,8 +475,8 @@  discard block
 block discarded – undo
475 475
         // Get one itemKey from current user
476 476
         $currentUserKey = DB::queryFirstRow(
477 477
             'SELECT ski.share_key, ski.increment_id AS increment_id, l.id_user
478
-            FROM ' . prefixTable('sharekeys_items') . ' AS ski
479
-            INNER JOIN ' . prefixTable('log_items') . ' AS l ON ski.object_id = l.id_item
478
+            FROM ' . prefixTable('sharekeys_items').' AS ski
479
+            INNER JOIN ' . prefixTable('log_items').' AS l ON ski.object_id = l.id_item
480 480
             WHERE ski.user_id = %i
481 481
             ORDER BY RAND()
482 482
             LIMIT 1',
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
                 // Get number of users to treat
515 515
                 DB::query(
516 516
                     'SELECT i.id 
517
-                    FROM ' . prefixTable('items') . ' AS i
518
-                    INNER JOIN ' . prefixTable('sharekeys_items') . ' AS si ON i.id = si.object_id
517
+                    FROM ' . prefixTable('items').' AS i
518
+                    INNER JOIN ' . prefixTable('sharekeys_items').' AS si ON i.id = si.object_id
519 519
                     WHERE i.perso = %i AND si.user_id = %i;',
520 520
                     0,
521 521
                     $userId
@@ -597,11 +597,11 @@  discard block
 block discarded – undo
597 597
             // Loop on items
598 598
             $rows = DB::query(
599 599
                 'SELECT si.object_id AS object_id, si.share_key AS share_key, i.pw AS pw, si.increment_id as increment_id
600
-                FROM ' . prefixTable('sharekeys_items') . ' AS si
601
-                INNER JOIN ' . prefixTable('items') . ' AS i ON (i.id = si.object_id)
600
+                FROM ' . prefixTable('sharekeys_items').' AS si
601
+                INNER JOIN ' . prefixTable('items').' AS i ON (i.id = si.object_id)
602 602
                 WHERE si.user_id = %i
603 603
                 ORDER BY si.increment_id ASC
604
-                LIMIT ' . $startIndex . ', ' . $limit,
604
+                LIMIT ' . $startIndex.', '.$limit,
605 605
                 $userId
606 606
             );        
607 607
             
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
                     // It will be updated if already exists
626 626
                     $currentTPUserKey = DB::queryFirstRow(
627 627
                         'SELECT increment_id, user_id, share_key
628
-                        FROM ' . prefixTable('sharekeys_items') . '
628
+                        FROM ' . prefixTable('sharekeys_items').'
629 629
                         WHERE object_id = %i AND user_id = %i',
630 630
                         $record['object_id'],
631 631
                         TP_USER_ID
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
             DB::commit();
662 662
         } catch (Exception $e) {
663 663
             DB::rollback();
664
-            error_log("Teampass - Error: Keys treatment: " . $e->getMessage());
664
+            error_log("Teampass - Error: Keys treatment: ".$e->getMessage());
665 665
         }
666 666
 
667 667
         $nextIndex = (int) $startIndex + (int) $limit;
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
             // Get PT_USER info
718 718
             DB::queryFirstRow(
719 719
                 'SELECT operation_code
720
-                FROM ' . prefixTable('sharekeys_backup') . '
720
+                FROM ' . prefixTable('sharekeys_backup').'
721 721
                 WHERE operation_code = %s',
722 722
                 $operationCode
723 723
             );
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
                 // using increment_id_value in order to update the correct record
728 728
                 $rows = DB::query(
729 729
                     'SELECT *
730
-                    FROM ' . prefixTable('sharekeys_backup') . '
730
+                    FROM ' . prefixTable('sharekeys_backup').'
731 731
                     WHERE operation_code = %s',
732 732
                     $operationCode
733 733
                 );
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
 
747 747
                 // Delete all sharekeys for this operation
748 748
                 DB::query(
749
-                    'DELETE FROM ' . prefixTable('sharekeys_backup') . '
749
+                    'DELETE FROM '.prefixTable('sharekeys_backup').'
750 750
                     WHERE operation_code = %i',
751 751
                     $operationCode
752 752
                 );
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
             // Get operation info
810 810
             DB::query(
811 811
                 'SELECT operation_code
812
-                FROM ' . prefixTable('sharekeys_backup') . '
812
+                FROM ' . prefixTable('sharekeys_backup').'
813 813
                 WHERE operation_code = %s',
814 814
                 $operationCode
815 815
             );
@@ -818,7 +818,7 @@  discard block
 block discarded – undo
818 818
             if ($nbKeys > 0) {
819 819
                 // Delete all sharekeys for this operation
820 820
                 DB::query(
821
-                    'DELETE FROM ' . prefixTable('sharekeys_backup') . '
821
+                    'DELETE FROM '.prefixTable('sharekeys_backup').'
822 822
                     WHERE operation_code = %s',
823 823
                     $operationCode
824 824
                 );
Please login to merge, or discard this patch.