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.
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 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1151,7 +1151,7 @@
 block discarded – undo
1151 1151
                             (int) $dataDeleted !== 1
1152 1152
                             || (isset($item_restored['date']) === true && (int) $item_deleted['date'] < (int) $item_restored['date'])
1153 1153
                         ) {
1154
-                             // Get the ITEM object key for the user
1154
+                                // Get the ITEM object key for the user
1155 1155
                             $itemUserTpKey = DB::queryFirstRow(
1156 1156
                                 'SELECT share_key
1157 1157
                                 FROM ' . prefixTable('sharekeys_items') . '
Please login to merge, or discard this 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/utilities.queries.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 ) {
78 78
     // Not allowed page
79 79
     $session->set('system-error_code', ERR_NOT_ALLOWED);
80
-    include $SETTINGS['cpassman_dir'] . '/error.php';
80
+    include $SETTINGS['cpassman_dir'].'/error.php';
81 81
     exit;
82 82
 }
83 83
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $arrFolders = array();
129 129
             $rows = DB::query(
130 130
                 'SELECT valeur, intitule
131
-                FROM ' . prefixTable('misc') . '
131
+                FROM ' . prefixTable('misc').'
132 132
                 WHERE type  = %s',
133 133
                 'folder_deleted'
134 134
             );
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
                 i.id as id, i.label as label,
152 152
                 i.id_tree as id_tree, l.date as date, n.title as folder_title,
153 153
                 a.del_enabled as del_enabled, a.del_value as del_value, a.del_type as del_type
154
-                FROM ' . prefixTable('log_items') . ' as l
155
-                INNER JOIN ' . prefixTable('items') . ' as i ON (l.id_item=i.id)
156
-                LEFT JOIN ' . prefixTable('users') . ' as u ON (l.id_user=u.id)
157
-                LEFT JOIN ' . prefixTable('nested_tree') . ' as n ON (i.id_tree=n.id)
158
-                LEFT JOIN ' . prefixTable('automatic_del') . ' as a ON (l.id_item = a.item_id)
154
+                FROM ' . prefixTable('log_items').' as l
155
+                INNER JOIN ' . prefixTable('items').' as i ON (l.id_item=i.id)
156
+                LEFT JOIN ' . prefixTable('users').' as u ON (l.id_user=u.id)
157
+                LEFT JOIN ' . prefixTable('nested_tree').' as n ON (i.id_tree=n.id)
158
+                LEFT JOIN ' . prefixTable('automatic_del').' as a ON (l.id_item = a.item_id)
159 159
                 WHERE l.action = %s
160 160
                 AND i.perso = %i
161 161
                 AND TRIM(COALESCE(i.deleted_at, "")) <> ""
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                             'label' => $record['label'],
180 180
                             'date' => date($SETTINGS['date_format'], (int) $record['date']),
181 181
                             'login' => $record['login'],
182
-                            'name' => $record['name'] . ' ' . $record['lastname'],
182
+                            'name' => $record['name'].' '.$record['lastname'],
183 183
                             'folder_label' => $record['folder_title'],
184 184
                             'folder_deleted' => $thisFolder,
185 185
                             'del_enabled' => (bool) $record['del_enabled'],
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
             foreach ($post_folders as $folderId) {
241 241
                 $data = DB::queryFirstRow(
242 242
                     'SELECT valeur
243
-                    FROM ' . prefixTable('misc') . "
243
+                    FROM ' . prefixTable('misc')."
244 244
                     WHERE type = 'folder_deleted'
245 245
                     AND intitule = %s",
246
-                    'f' . $folderId
246
+                    'f'.$folderId
247 247
                 );
248 248
                 if ((int) $data['valeur'] !== 0) {
249 249
                     $folderData = explode(', ', $data['valeur']);
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                         prefixTable('misc'),
271 271
                         'type = %s AND intitule = %s',
272 272
                         'folder_deleted',
273
-                        'f' . $folderId
273
+                        'f'.$folderId
274 274
                     );
275 275
 
276 276
                     // Restore all items in this folder
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                     // Get list of all items in thos folder
288 288
                     $items = DB::query(
289 289
                         'SELECT id
290
-                        FROM ' . prefixTable('items') . '
290
+                        FROM ' . prefixTable('items').'
291 291
                         WHERE id_tree = %i',
292 292
                         $folderId
293 293
                     );
@@ -377,10 +377,10 @@  discard block
 block discarded – undo
377 377
             foreach ($post_folders as $folderId) {
378 378
                 $data = DB::queryFirstRow(
379 379
                     'SELECT valeur
380
-                    FROM ' . prefixTable('misc') . "
380
+                    FROM ' . prefixTable('misc')."
381 381
                     WHERE type = 'folder_deleted'
382 382
                     AND intitule = %s",
383
-                    'f' . $folderId
383
+                    'f'.$folderId
384 384
                 );
385 385
                 if ((int) $data['valeur'] !== 0) {
386 386
                     $exploded = explode(',', $data['valeur']);
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
                         prefixTable('misc'),
392 392
                         'type = %s AND intitule = %s',
393 393
                         'folder_deleted',
394
-                        'f' . $folderData[0]
394
+                        'f'.$folderData[0]
395 395
                     );
396 396
 
397 397
                     // Delete all items in this folder
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
                     // Get list of all items in thos folder
406 406
                     $items = DB::query(
407 407
                         'SELECT id
408
-                        FROM ' . prefixTable('items') . '
408
+                        FROM ' . prefixTable('items').'
409 409
                         WHERE id_tree = %i',
410 410
                         $folderData[0]
411 411
                     );
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
                         // Delete all fields
423 423
                         $fields = DB::query(
424 424
                             'SELECT id
425
-                            FROM ' . prefixTable('categories_items') . '
425
+                            FROM ' . prefixTable('categories_items').'
426 426
                             WHERE item_id = %i',
427 427
                             $folderData[0]
428 428
                         );
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
                         // Delete all files
443 443
                         $files = DB::query(
444 444
                             'SELECT id
445
-                            FROM ' . prefixTable('files') . '
445
+                            FROM ' . prefixTable('files').'
446 446
                             WHERE id_item = %i',
447 447
                             $folderData[0]
448 448
                         );
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
                 // Delete sharekey fields
500 500
                 $itemFields = DB::query(
501 501
                     'SELECT id
502
-                    FROM ' . prefixTable('categories_items') . '
502
+                    FROM ' . prefixTable('categories_items').'
503 503
                     WHERE item_id = %i',
504 504
                     $itemId
505 505
                 );
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
                 // Delete sharekey files
515 515
                 $itemFiles = DB::query(
516 516
                     'SELECT id
517
-                    FROM ' . prefixTable('files') . '
517
+                    FROM ' . prefixTable('files').'
518 518
                     WHERE id_item = %i',
519 519
                     $itemId
520 520
                 );
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
             ) {
592 592
                 if ($post_log_type === 'items') {
593 593
                     DB::query(
594
-                        'SELECT * FROM ' . prefixTable('log_items') . '
594
+                        'SELECT * FROM '.prefixTable('log_items').'
595 595
                         WHERE (date BETWEEN %i AND %i)'
596 596
                         . ($post_filter_action === 'all' ? '' : ' AND action = "'.$post_filter_action.'"')
597 597
                         . ((int) $post_filter_user === -1 ? '' : ' AND id_user = '.(int) $post_filter_user),
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
                 } elseif ($post_log_type === 'connections') {
612 612
                     //db::debugmode(true);
613 613
                     DB::query(
614
-                        'SELECT * FROM ' . prefixTable('log_system') . '
614
+                        'SELECT * FROM '.prefixTable('log_system').'
615 615
                         WHERE type=%s '
616 616
                         . 'AND (date BETWEEN %i AND %i)'
617 617
                         . ($post_filter_action === 'all' ? '' : ' AND action = '.$post_filter_action)
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                     );
635 635
                 } elseif ($post_log_type === 'errors') {
636 636
                     DB::query(
637
-                        'SELECT * FROM ' . prefixTable('log_system') . ' WHERE type=%s ' .
637
+                        'SELECT * FROM '.prefixTable('log_system').' WHERE type=%s '.
638 638
                             'AND (date BETWEEN %i AND %i)',
639 639
                         'error',
640 640
                         $post_date_from,
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
                     );
652 652
                 } elseif ($post_log_type === 'copy') {
653 653
                     DB::query(
654
-                        'SELECT * FROM ' . prefixTable('log_items') . ' WHERE action=%s ' .
654
+                        'SELECT * FROM '.prefixTable('log_items').' WHERE action=%s '.
655 655
                             'AND (date BETWEEN %i AND %i)',
656 656
                         'at_copy',
657 657
                         $post_date_from,
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
                     );
669 669
                 } elseif ($post_log_type === 'admin') {
670 670
                     DB::query(
671
-                        'SELECT * FROM ' . prefixTable('log_system') . ' WHERE type=%s ' .
671
+                        'SELECT * FROM '.prefixTable('log_system').' WHERE type=%s '.
672 672
                             'AND (date BETWEEN %i AND %i)',
673 673
                         'admin_action',
674 674
                         $post_date_from,
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
                     );
686 686
                 } elseif ($post_log_type === 'failed') {
687 687
                     DB::query(
688
-                        'SELECT * FROM ' . prefixTable('log_system') . ' WHERE type=%s ' .
688
+                        'SELECT * FROM '.prefixTable('log_system').' WHERE type=%s '.
689 689
                             'AND (date BETWEEN %i AND %i)',
690 690
                         'failed_auth',
691 691
                         $post_date_from,
@@ -756,19 +756,19 @@  discard block
 block discarded – undo
756 756
             // Get info about task
757 757
             $taskInfo = DB::queryFirstRow(
758 758
                 'SELECT p.process_type as process_type
759
-                FROM ' . prefixTable('background_tasks') . ' as p
759
+                FROM ' . prefixTable('background_tasks').' as p
760 760
                 WHERE p.increment_id = %i',
761 761
                 $post_id
762 762
             );
763 763
             if ($taskInfo !== null) {
764 764
                 // delete task
765 765
                 DB::query(
766
-                    'DELETE FROM ' . prefixTable('background_subtasks') . '
766
+                    'DELETE FROM '.prefixTable('background_subtasks').'
767 767
                     WHERE task_id = %i',
768 768
                     $post_id
769 769
                 );
770 770
                 DB::query(
771
-                    'DELETE FROM ' . prefixTable('background_tasks') . '
771
+                    'DELETE FROM '.prefixTable('background_tasks').'
772 772
                     WHERE increment_id = %i',
773 773
                     $post_id
774 774
                 );
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
                         ->setDayOfMonth('*')
836 836
                         ->setMonths('*')
837 837
                         ->setDayOfWeek('*')
838
-                        ->setTaskCommandLine($phpBinaryPath . ' ' . $SETTINGS['cpassman_dir'] . '/sources/scheduler.php')
838
+                        ->setTaskCommandLine($phpBinaryPath.' '.$SETTINGS['cpassman_dir'].'/sources/scheduler.php')
839 839
                         ->setComments('Teampass scheduler');
840 840
                     
841 841
                     $crontabRepository->addJob($crontabJob);
Please login to merge, or discard this patch.
pages/users.php 1 patch
Spacing   +11 added lines, -11 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('users') === 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
 
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 // If administrator then all roles are shown
93 93
 // else only the Roles the users is associated to.
94 94
 if ((int) $session->get('user-admin') === 1) {
95
-    $optionsManagedBy .= '<option value="0">' . $lang->get('administrators_only') . '</option>';
95
+    $optionsManagedBy .= '<option value="0">'.$lang->get('administrators_only').'</option>';
96 96
 }
97 97
 
98 98
 $rows = DB::query(
99 99
     'SELECT id, title, creator_id
100
-    FROM ' . prefixTable('roles_title') . '
100
+    FROM ' . prefixTable('roles_title').'
101 101
     ORDER BY title ASC'
102 102
 );
103 103
 foreach ($rows as $record) {
104 104
     if ((int) $session->get('user-admin') === 1 || in_array($record['id'], $session->get('user-roles_array')) === true) {
105
-        $optionsManagedBy .= '<option value="' . $record['id'] . '">' . $lang->get('managers_of') . ' ' . addslashes($record['title']) . '</option>';
105
+        $optionsManagedBy .= '<option value="'.$record['id'].'">'.$lang->get('managers_of').' '.addslashes($record['title']).'</option>';
106 106
     }
107 107
     if (
108 108
         (int) $session->get('user-admin') === 1
109 109
         || (((int) $session->get('user-manager') === 1 || (int) $session->get('user-can_manage_all_users') === 1)
110 110
             && (in_array($record['id'], $userRoles) === true) || (int) $record['creator_id'] === (int) $session->get('user-id'))
111 111
     ) {
112
-        $optionsRoles .= '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>';
112
+        $optionsRoles .= '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>';
113 113
     }
114 114
 }
115 115
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         for ($y = 1; $y < $t->nlevel; ++$y) {
125 125
             $ident .= '&nbsp;&nbsp;';
126 126
         }
127
-        $foldersList .= '<option value="' . $t->id . '">' . $ident . htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8') . '</option>';
127
+        $foldersList .= '<option value="'.$t->id.'">'.$ident.htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8').'</option>';
128 128
     }
129 129
 }
130 130
 
@@ -161,13 +161,13 @@  discard block
 block discarded – undo
161 161
                         </button><?php
162 162
                                     echo isset($SETTINGS['ldap_mode']) === true && (int) $SETTINGS['ldap_mode'] === 1 && (int) $session->get('user-admin') === 1 ?
163 163
                                         '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="ldap-sync">
164
-                            <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization') . '
164
+                            <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization').'
165 165
                         </button>' : '';
166 166
                                     ?>
167 167
                         </button><?php
168 168
                                     echo isset($SETTINGS['oauth2_enabled']) === true && (int) $SETTINGS['oauth2_enabled'] === 1 && (int) $session->get('user-admin') === 1 ?
169 169
                                         '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="oauth2-sync">
170
-                            <i class="fa-solid fa-plug mr-2"></i>' . $lang->get('oauth2_synchronization') . '
170
+                            <i class="fa-solid fa-plug mr-2"></i>' . $lang->get('oauth2_synchronization').'
171 171
                         </button>' : '';
172 172
                                     ?>
173 173
                         <button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="deleted-users">
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
                 <!-- /.card-header -->
179 179
                 <div class="card-body form user-content with-header-menu" id="users-list" data-content="refresh">
180
-                    <label><input type="checkbox" id="warnings_display" class="tp-action pointer" data-action="refresh"><span class="ml-2 pointer"><?php echo $lang->get('display_warning_icons');?></span></label>
180
+                    <label><input type="checkbox" id="warnings_display" class="tp-action pointer" data-action="refresh"><span class="ml-2 pointer"><?php echo $lang->get('display_warning_icons'); ?></span></label>
181 181
                     <table id="table-users" class="table table-striped nowrap table-responsive-sm">
182 182
                         <thead>
183 183
                             <tr>
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                                             <?php
242 242
                                             foreach (TP_PW_COMPLEXITY as $entry) {
243 243
                                                 echo '
244
-                                            <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>';
244
+                                            <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>';
245 245
                                             }
246 246
                                             ?>
247 247
                                         </select>
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                                             <?php
319 319
                                             foreach (TP_PW_COMPLEXITY as $entry) {
320 320
                                                 echo '
321
-                                            <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>';
321
+                                            <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>';
322 322
                                             }
323 323
                                             ?>
324 324
                                         </select>
Please login to merge, or discard this patch.
pages/items.js.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('items') === false) {
73 73
     // Not allowed page
74 74
     $session->set('system-error_code', ERR_NOT_ALLOWED);
75
-    include $SETTINGS['cpassman_dir'] . '/error.php';
75
+    include $SETTINGS['cpassman_dir'].'/error.php';
76 76
     exit;
77 77
 }
78 78
 
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
             //
1077 1077
         } else if ($(this).data('item-action') === 'link') {
1078 1078
             // Add link to clipboard.
1079
-            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url'];?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1079
+            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url']; ?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1080 1080
 
1081 1081
             // Display message.
1082 1082
             toastr.remove();
@@ -2904,7 +2904,7 @@  discard block
 block discarded – undo
2904 2904
                 progress: "#form-item-password-strength",
2905 2905
                 score: "#form-item-password-strength"
2906 2906
             },
2907
-            scores: [<?php echo TP_PW_STRENGTH_1;?>, <?php echo TP_PW_STRENGTH_2;?>, <?php echo TP_PW_STRENGTH_3;?>, <?php echo TP_PW_STRENGTH_4;?>, <?php echo TP_PW_STRENGTH_5;?>],
2907
+            scores: [<?php echo TP_PW_STRENGTH_1; ?>, <?php echo TP_PW_STRENGTH_2; ?>, <?php echo TP_PW_STRENGTH_3; ?>, <?php echo TP_PW_STRENGTH_4; ?>, <?php echo TP_PW_STRENGTH_5; ?>],
2908 2908
         },
2909 2909
         i18n : {
2910 2910
             t: function (key) {
@@ -2931,7 +2931,7 @@  discard block
 block discarded – undo
2931 2931
     <?php
2932 2932
     $max_file_size = '';
2933 2933
     if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) {
2934
-        $max_file_size = $SETTINGS['upload_maxfilesize'] . 'mb';
2934
+        $max_file_size = $SETTINGS['upload_maxfilesize'].'mb';
2935 2935
     } else {
2936 2936
         $max_file_size = $SETTINGS['upload_maxfilesize'];
2937 2937
     }
@@ -3921,7 +3921,7 @@  discard block
 block discarded – undo
3921 3921
     function displaySubfolders(folders, parentId) {
3922 3922
         // Manage case where no folders
3923 3923
         if (folders === '' || folders === undefined) {
3924
-            $('#teampass_subfolders_list').html('<tr><td colspan="2" class="text-center text-muted"><?php echo $lang->get('no_folder_selected');?></td></tr>');
3924
+            $('#teampass_subfolders_list').html('<tr><td colspan="2" class="text-center text-muted"><?php echo $lang->get('no_folder_selected'); ?></td></tr>');
3925 3925
             return false;
3926 3926
         }
3927 3927
         
@@ -4912,7 +4912,7 @@  discard block
 block discarded – undo
4912 4912
                         (retData.edition_locked_delay === null ? 
4913 4913
                         '' 
4914 4914
                         :
4915
-                        ' : ' + retData.edition_locked_delay + ' <?php echo $lang->get('seconds');?>'),
4915
+                        ' : ' + retData.edition_locked_delay + ' <?php echo $lang->get('seconds'); ?>'),
4916 4916
                     '', {
4917 4917
                         timeOut: 5000,
4918 4918
                         progressBar: true
@@ -5069,7 +5069,7 @@  discard block
 block discarded – undo
5069 5069
 
5070 5070
                             // Show passwords inputs and form
5071 5071
                             $('#dialog-ldap-user-change-password-info')
5072
-                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
5072
+                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
5073 5073
                                 .removeClass('hidden');
5074 5074
                             $('#dialog-ldap-user-change-password').removeClass('hidden');
5075 5075
                         } else if (data.error_type !== 'undefined') {
@@ -5088,7 +5088,7 @@  discard block
 block discarded – undo
5088 5088
 
5089 5089
                                 // Show passwords inputs and form
5090 5090
                                 $('#dialog-ldap-user-change-password-info')
5091
-                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
5091
+                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
5092 5092
                                     .removeClass('hidden');
5093 5093
                                 $('#dialog-ldap-user-change-password').removeClass('hidden');
5094 5094
                             });
Please login to merge, or discard this patch.