Passed
Branch — 3.1.3-preparation (56a0b7)
by Nils
12:02
created
sources/tree.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 ) {
65 65
     // Not allowed page
66 66
     $session->set('system-error_code', ERR_NOT_ALLOWED);
67
-    include $SETTINGS['cpassman_dir'] . '/error.php';
67
+    include $SETTINGS['cpassman_dir'].'/error.php';
68 68
     exit;
69 69
 }
70 70
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 );
126 126
 
127 127
 $lastFolderChange = DB::queryfirstrow(
128
-    'SELECT valeur FROM ' . prefixTable('misc') . '
128
+    'SELECT valeur FROM '.prefixTable('misc').'
129 129
     WHERE type = %s AND intitule = %s',
130 130
     'timestamp',
131 131
     'last_folder_change'
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         foreach ($currentNode->children as $child) {
460 460
             recursiveTree(
461 461
                 (int) $child,
462
-                $tree->getNode($child),// get node info for this child
462
+                $tree->getNode($child), // get node info for this child
463 463
                 /** @scrutinizer ignore-type */ $tree,
464 464
                 $listFoldersLimitedKeys,
465 465
                 $listRestrictedFoldersForItemsKeys,
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
     $lang = new Language($session->get('user-language') ?? 'english');
507 507
 
508 508
     // prepare json return for current node
509
-    $parent = $currentNode->parent_id === '0' ? '#' : 'li_' . $currentNode->parent_id;
509
+    $parent = $currentNode->parent_id === '0' ? '#' : 'li_'.$currentNode->parent_id;
510 510
 
511 511
     // handle displaying
512 512
     if (isKeyExistingAndEqual('show_only_accessible_folders', 1, $SETTINGS) === true) {
@@ -523,17 +523,17 @@  discard block
 block discarded – undo
523 523
         array_push(
524 524
             $ret_json,
525 525
             array(
526
-                'id' => 'li_' . $nodeId,
526
+                'id' => 'li_'.$nodeId,
527 527
                 'parent' => $last_visible_parent === -1 ? $parent : $last_visible_parent,
528 528
                 'text' => '<i class="'.$currentNode->fa_icon.' tree-folder mr-2" data-folder="'.$currentNode->fa_icon.'"  data-folder-selected="'.$currentNode->fa_icon_selected.'"></i>'.$text.htmlspecialchars($currentNode->title).$nodeData['html'],
529 529
                 'li_attr' => array(
530 530
                     'class' => 'jstreeopen',
531
-                    'title' => 'ID [' . $nodeId . '] ' . $nodeData['title'],
531
+                    'title' => 'ID ['.$nodeId.'] '.$nodeData['title'],
532 532
                 ),
533 533
                 'a_attr' => array(
534
-                    'id' => 'fld_' . $nodeId,
534
+                    'id' => 'fld_'.$nodeId,
535 535
                     'class' => $nodeData['folderClass'],
536
-                    'onclick' => 'ListerItems(' . $nodeId . ', ' . $nodeData['restricted'] . ', 0, 1)',
536
+                    'onclick' => 'ListerItems('.$nodeId.', '.$nodeData['restricted'].', 0, 1)',
537 537
                     'data-title' => htmlspecialchars($currentNode->title),
538 538
                 ),
539 539
                 'is_pf' => in_array($nodeId, $inputData['personalFolders']) === true ? 1 : 0,
@@ -549,12 +549,12 @@  discard block
 block discarded – undo
549 549
         array_push(
550 550
             $ret_json,
551 551
             array(
552
-                'id' => 'li_' . $nodeId,
552
+                'id' => 'li_'.$nodeId,
553 553
                 'parent' => $last_visible_parent === -1 ? $parent : $last_visible_parent,
554 554
                 'text' => '<i class="'.$currentNode->fa_icon.' tree-folder mr-2" data-folder="'.$currentNode->fa_icon.'"  data-folder-selected="'.$currentNode->fa_icon_selected.'"></i>'.'<i class="fas fa-times fa-xs text-danger mr-1 ml-1"></i>'.$text.htmlspecialchars($currentNode->title).$nodeData['html'],
555 555
                 'li_attr' => array(
556 556
                     'class' => '',
557
-                    'title' => 'ID [' . $nodeId . '] ' . $lang->get('no_access'),
557
+                    'title' => 'ID ['.$nodeId.'] '.$lang->get('no_access'),
558 558
                 ),
559 559
             )
560 560
         );
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
         if (in_array($nodeId, $session_read_only_folders) === true) {
617 617
             return [
618 618
                 'html' => '<i class="far fa-eye fa-xs mr-1 ml-1"></i>'.
619
-                    ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_' . $nodeId . '">' . $nbItemsInFolder .'/'.$nbItemsInSubfolders .'/'.$nbSubfolders. '</span>'  : ''),
619
+                    ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_'.$nodeId.'">'.$nbItemsInFolder.'/'.$nbItemsInSubfolders.'/'.$nbSubfolders.'</span>' : ''),
620 620
                 'title' => $lang->get('read_only_account'),
621 621
                 'restricted' => 1,
622 622
                 'folderClass' => 'folder_not_droppable',
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
         ) {
632 632
             return [
633 633
                 'html' => '<i class="far fa-eye fa-xs mr-1"></i>'.
634
-                    ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_' . $nodeId . '">' . $nbItemsInFolder .'/'.$nbItemsInSubfolders .'/'.$nbSubfolders. '</span>'  : ''),
634
+                    ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_'.$nodeId.'">'.$nbItemsInFolder.'/'.$nbItemsInSubfolders.'/'.$nbSubfolders.'</span>' : ''),
635 635
                 'title' => $lang->get('read_only_account'),
636 636
                 'restricted' => 0,
637 637
                 'folderClass' => 'folder',
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
         }
643 643
         
644 644
         return [
645
-            'html' => ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_' . $nodeId . '">' . $nbItemsInFolder .'/'.$nbItemsInSubfolders .'/'.$nbSubfolders. '</span>'  : ''),
645
+            'html' => ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_'.$nodeId.'">'.$nbItemsInFolder.'/'.$nbItemsInSubfolders.'/'.$nbSubfolders.'</span>' : ''),
646 646
             'title' => '',
647 647
             'restricted' => 0,
648 648
             'folderClass' => 'folder',
@@ -653,8 +653,8 @@  discard block
 block discarded – undo
653 653
 
654 654
     } elseif (in_array($nodeId, $listFoldersLimitedKeys) === true) {
655 655
         return [
656
-            'html' => ($session_user_read_only === true ? '<i class="far fa-eye fa-xs mr-1"></i>' : '') .
657
-                ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_' . $nodeId . '">' . count($session_list_folders_limited[$nodeId]) . '</span>' : ''),
656
+            'html' => ($session_user_read_only === true ? '<i class="far fa-eye fa-xs mr-1"></i>' : '').
657
+                ($tree_counters === 1 ? '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_'.$nodeId.'">'.count($session_list_folders_limited[$nodeId]).'</span>' : ''),
658 658
             'title' => '',
659 659
             'restricted' => 1,
660 660
             'folderClass' => 'folder',
@@ -665,8 +665,8 @@  discard block
 block discarded – undo
665 665
 
666 666
     } elseif (in_array($nodeId, $listRestrictedFoldersForItemsKeys) === true) {
667 667
         return [
668
-            'html' => $session_user_read_only === true ? '<i class="far fa-eye fa-xs mr-1"></i>' : '' .
669
-                '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_' . $nodeId . '">' . count($session_list_restricted_folders_for_items[$nodeId]) . '</span>',
668
+            'html' => $session_user_read_only === true ? '<i class="far fa-eye fa-xs mr-1"></i>' : ''.
669
+                '<span class="badge badge-pill badge-light ml-2 items_count" id="itcount_'.$nodeId.'">'.count($session_list_restricted_folders_for_items[$nodeId]).'</span>',
670 670
             'title' => '',
671 671
             'restricted' => 1,
672 672
             'folderClass' => 'folder',
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
     // Does this user has a tree cache
777 777
     $userCacheTree = DB::queryfirstrow(
778 778
         'SELECT data
779
-        FROM ' . prefixTable('cache_tree') . '
779
+        FROM ' . prefixTable('cache_tree').'
780 780
         WHERE user_id = %i',
781 781
         $userId
782 782
     );
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,
@@ -238,16 +238,16 @@  discard block
 block discarded – undo
238 238
     if (empty($sWhere) === false) {
239 239
         $sWhere .= ' AND ';
240 240
     }
241
-    $sWhere = 'WHERE ' . $sWhere . 'c.id_tree NOT IN %ls_pf ';
241
+    $sWhere = 'WHERE '.$sWhere.'c.id_tree NOT IN %ls_pf ';
242 242
 } else {
243
-    $sWhere = 'WHERE ' . $sWhere;
243
+    $sWhere = 'WHERE '.$sWhere;
244 244
 }
245 245
 
246 246
 // Do queries
247 247
 DB::query(
248 248
     "SELECT c.id
249
-    FROM " . prefixTable('cache') . " AS c
250
-    LEFT JOIN " . prefixTable('categories_items') . " AS ci ON (ci.item_id = c.id)
249
+    FROM " . prefixTable('cache')." AS c
250
+    LEFT JOIN " . prefixTable('categories_items')." AS ci ON (ci.item_id = c.id)
251 251
     {$sWhere}
252 252
     {$sOrder}",
253 253
     $crit
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
 $iTotal = DB::count();
256 256
 $rows = DB::query(
257 257
     "SELECT c.*, ci.data, i.item_key
258
-    FROM " . prefixTable('cache') . " AS c
259
-    LEFT JOIN " . prefixTable('categories_items') . " AS ci ON (ci.item_id = c.id)
260
-    INNER JOIN " . prefixTable('items') . " AS i ON (i.id = c.id)
258
+    FROM " . prefixTable('cache')." AS c
259
+    LEFT JOIN " . prefixTable('categories_items')." AS ci ON (ci.item_id = c.id)
260
+    INNER JOIN " . prefixTable('items')." AS i ON (i.id = c.id)
261 261
     {$sWhere}
262 262
     {$sOrder}
263 263
     {$sLimit}",
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 if (null === $request->query->get('type')) {
283 283
     $sOutput = '{';
284 284
     if (null !== $request->query->get('draw')) {
285
-        $sOutput .= '"draw": ' . $request->query->filter('draw', FILTER_SANITIZE_NUMBER_INT) . ', ';
285
+        $sOutput .= '"draw": '.$request->query->filter('draw', FILTER_SANITIZE_NUMBER_INT).', ';
286 286
     }
287 287
     $sOutput .= '"data": [';
288 288
     $sOutputConst = '';
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
             foreach (explode(';', $session->get('user-roles')) as $role) {
300 300
                 //db::debugmode(true);
301 301
                 $access = DB::queryFirstRow(
302
-                    'SELECT type FROM ' . prefixTable('roles_values') . ' WHERE role_id = %i AND folder_id = %i',
302
+                    'SELECT type FROM '.prefixTable('roles_values').' WHERE role_id = %i AND folder_id = %i',
303 303
                     $role,
304 304
                     $record['id_tree']
305 305
                 );
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             }
320 320
             $accessLevel = count($arrTmp) > 0 ? min($arrTmp) : $accessLevel;
321 321
             if ($accessLevel === 0) {
322
-                $checkbox = '<input type=\"checkbox\" value=\"0\" class=\"mass_op_cb\" data-id=\"' . $record['id'] . '\">';
322
+                $checkbox = '<input type=\"checkbox\" value=\"0\" class=\"mass_op_cb\" data-id=\"'.$record['id'].'\">';
323 323
             }
324 324
 
325 325
             if ((int) $accessLevel === 0) {
@@ -359,22 +359,22 @@  discard block
 block discarded – undo
359 359
             if (empty($restrictedTo)) {
360 360
                 $restrictedTo = $session->get('user-id');
361 361
             } else {
362
-                $restrictedTo .= ',' . $session->get('user-id');
362
+                $restrictedTo .= ','.$session->get('user-id');
363 363
             }
364 364
         }
365 365
         
366 366
         //col1
367
-        $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>' .
368
-        '<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 . '",' ;
367
+        $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>'.
368
+        '<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.'",';
369 369
         //col2
370
-        $sOutputItem .= '"'.base64_encode('<span id=\"item_label-' . $record['id'] . '\">' . (str_replace("\\", "&#92;", (string) $record['label'])) . '</span>').'", ';   // replace backslash #3015
370
+        $sOutputItem .= '"'.base64_encode('<span id=\"item_label-'.$record['id'].'\">'.(str_replace("\\", "&#92;", (string) $record['label'])).'</span>').'", '; // replace backslash #3015
371 371
         //col3
372
-        $sOutputItem .= '"' . base64_encode(str_replace('&amp;', '&', htmlspecialchars(stripslashes((string) $record['login']), ENT_QUOTES))) . '", ';
372
+        $sOutputItem .= '"'.base64_encode(str_replace('&amp;', '&', htmlspecialchars(stripslashes((string) $record['login']), ENT_QUOTES))).'", ';
373 373
         //col4
374 374
         //get restriction from ROles
375 375
         $restrictedToRole = false;
376 376
         $rTmp = DB::queryFirstColumn(
377
-            'SELECT role_id FROM ' . prefixTable('restriction_to_roles') . ' WHERE item_id = %i',
377
+            'SELECT role_id FROM '.prefixTable('restriction_to_roles').' WHERE item_id = %i',
378 378
             $record['id']
379 379
         );
380 380
         // We considere here that if user has at least one group similar to the object ones
@@ -392,14 +392,14 @@  discard block
 block discarded – undo
392 392
         } else {
393 393
             $txt = str_replace(['\n', '<br />', '\\'], [' ', ' ', '', ' '], strip_tags($record['description']));
394 394
             if (strlen($txt) > 50) {
395
-                $sOutputItem .= '"' . base64_encode(substr(stripslashes(preg_replace('~/<[\/]{0,1}[^>]*>\//|[ \t]/~', '', $txt)), 0, 50)) . '", ';
395
+                $sOutputItem .= '"'.base64_encode(substr(stripslashes(preg_replace('~/<[\/]{0,1}[^>]*>\//|[ \t]/~', '', $txt)), 0, 50)).'", ';
396 396
             } else {
397
-                $sOutputItem .= '"' . base64_encode(stripslashes(preg_replace('~/<[^>]*>|[ \t]/~', '', $txt))) . '", ';
397
+                $sOutputItem .= '"'.base64_encode(stripslashes(preg_replace('~/<[^>]*>|[ \t]/~', '', $txt))).'", ';
398 398
             }
399 399
         }
400 400
 
401 401
         //col5 - TAGS
402
-        $sOutputItem .= '"' . base64_encode(htmlspecialchars(stripslashes((string) $record['tags']), ENT_QUOTES)) . '", ';
402
+        $sOutputItem .= '"'.base64_encode(htmlspecialchars(stripslashes((string) $record['tags']), ENT_QUOTES)).'", ';
403 403
         // col6 - URL
404 404
         if ($record['url'] !== '0') {
405 405
             $sOutputItem .= '"'.htmlspecialchars(filter_var($record['url'], FILTER_SANITIZE_URL)).'", ';
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         }
409 409
 
410 410
         //col7 - Prepare the Treegrid
411
-        $sOutputItem .= '"' . base64_encode(stripslashes((string) $record['folder'])) . '"';
411
+        $sOutputItem .= '"'.base64_encode(stripslashes((string) $record['folder'])).'"';
412 412
         //Finish the line
413 413
         //$sOutputItem .= '], ';
414 414
         if ($getItemInList === true) {
@@ -417,17 +417,17 @@  discard block
 block discarded – undo
417 417
             --$iTotal;
418 418
         }
419 419
     }
420
-    if (! empty($sOutputConst)) {
420
+    if (!empty($sOutputConst)) {
421 421
         $sOutput .= substr_replace($sOutputConst, '', -2);
422 422
     }
423 423
     $sOutput .= '], ';
424
-    $sOutput .= '"recordsTotal": ' . $iTotal . ', ';
425
-    $sOutput .= '"recordsFiltered": ' . $iTotal . ' }';
424
+    $sOutput .= '"recordsTotal": '.$iTotal.', ';
425
+    $sOutput .= '"recordsFiltered": '.$iTotal.' }';
426 426
     // file deepcode ignore XSS: data is secured
427 427
     echo ($sOutput);
428 428
 } elseif (null !== $request->query->get('type') && ($request->query->get('type') === 'search_for_items' || $request->query->get('type') === 'search_for_items_with_tags')) {
429 429
     include_once 'main.functions.php';
430
-    include_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $session->get('user-language') . '.php';
430
+    include_once $SETTINGS['cpassman_dir'].'/includes/language/'.$session->get('user-language').'.php';
431 431
 
432 432
     $arr_data = [];
433 433
     foreach ($rows as $record) {
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
         $arr_data[$record['id']]['tree_id'] = (int) $record['id_tree'];
437 437
         $arr_data[$record['id']]['label'] = (string) $record['label'];
438 438
         $arr_data[$record['id']]['desc'] = (string) strip_tags(explode('<br>', $record['description'])[0]);
439
-        $arr_data[$record['id']]['folder'] = (string)$record['folder'];
439
+        $arr_data[$record['id']]['folder'] = (string) $record['folder'];
440 440
         $arr_data[$record['id']]['login'] = (string) strtr($record['login'], '"', '&quot;');
441 441
         $arr_data[$record['id']]['item_key'] = (string) $record['item_key'];
442 442
         $arr_data[$record['id']]['link'] = (string) $record['url'] !== '0' && empty($record['url']) === false ? filter_var($record['url'], FILTER_SANITIZE_URL) : '';
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 
450 450
         // Anyone can modify?
451 451
         $tmp = DB::queryfirstrow(
452
-            'SELECT anyone_can_modify FROM ' . prefixTable('items') . ' WHERE id = %i',
452
+            'SELECT anyone_can_modify FROM '.prefixTable('items').' WHERE id = %i',
453 453
             $record['id']
454 454
         );
455 455
         if (count($tmp) > 0) {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
         // => récupérer un tableau contenant les roles associés à cet ID (a partir table restriction_to_roles)
481 481
         $user_is_included_in_role = 0;
482 482
         $roles = DB::query(
483
-            'SELECT role_id FROM ' . prefixTable('restriction_to_roles') . ' WHERE item_id=%i',
483
+            'SELECT role_id FROM '.prefixTable('restriction_to_roles').' WHERE item_id=%i',
484 484
             $record['id']
485 485
         );
486 486
         if (count($roles) > 0) {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
             if (empty($restrictedTo)) {
504 504
                 $restrictedTo = $session->get('user-id');
505 505
             } else {
506
-                $restrictedTo .= ',' . $session->get('user-id');
506
+                $restrictedTo .= ','.$session->get('user-id');
507 507
             }
508 508
         }
509 509
 
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
             $arrTmp = [];
602 602
             foreach (explode(';', $session->get('user-roles')) as $role) {
603 603
                 $access = DB::queryFirstRow(
604
-                    'SELECT type FROM ' . prefixTable('roles_values') . ' WHERE role_id = %i AND folder_id = %i',
604
+                    'SELECT type FROM '.prefixTable('roles_values').' WHERE role_id = %i AND folder_id = %i',
605 605
                     $role,
606 606
                     $record['id_tree']
607 607
                 );
@@ -652,8 +652,8 @@  discard block
 block discarded – undo
652 652
         ) {
653 653
             $data_item = DB::queryFirstRow(
654 654
                 'SELECT i.pw AS pw, s.share_key AS share_key
655
-                FROM ' . prefixTable('items') . ' AS i
656
-                INNER JOIN ' . prefixTable('sharekeys_items') . ' AS s ON (s.object_id = i.id)
655
+                FROM ' . prefixTable('items').' AS i
656
+                INNER JOIN ' . prefixTable('sharekeys_items').' AS s ON (s.object_id = i.id)
657 657
                 WHERE i.id = %i AND s.user_id = %i',
658 658
                 $record['id'],
659 659
                 $session->get('user-id')
Please login to merge, or discard this patch.
pages/import.js.php 1 patch
Spacing   +2 added lines, -2 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('import') === 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
 ?>
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
                                     // Isolate first item
724 724
                                     if (itemsList.length > 0) {
725 725
                                         $('#import-feedback-progress-text')
726
-                                            .html('<i class="fas fa-cog fa-spin ml-4 mr-2"></i><?php echo $lang->get('operation_progress');?> ('+((counter*100)/itemsNumber).toFixed(2)+'%) - <i id="item-title"></i>');
726
+                                            .html('<i class="fas fa-cog fa-spin ml-4 mr-2"></i><?php echo $lang->get('operation_progress'); ?> ('+((counter*100)/itemsNumber).toFixed(2)+'%) - <i id="item-title"></i>');
727 727
 
728 728
                                         // XSS Filtering :
729 729
                                         $('#import-feedback-progress-text').text(itemsList[0].Title);
Please login to merge, or discard this patch.
pages/favourites.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     || (int) $session_user_admin === 1) {
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
 
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
                             if (empty($fav) === false) {
126 126
                                 $data = DB::queryFirstRow(
127 127
                                     'SELECT i.label, i.description, i.id, i.id_tree, t.title
128
-                                    FROM ' . prefixTable('items') . ' as i
129
-                                    INNER JOIN ' . prefixTable('nested_tree') . ' as t ON (t.id = i.id_tree)
128
+                                    FROM ' . prefixTable('items').' as i
129
+                                    INNER JOIN ' . prefixTable('nested_tree').' as t ON (t.id = i.id_tree)
130 130
                                     WHERE i.id = %i',
131 131
                                     $fav
132 132
                                 );
133
-                                if (! empty($data['label'])) {
133
+                                if (!empty($data['label'])) {
134 134
                                     ?>
135 135
                                     <tr>
136 136
                                         <td>
Please login to merge, or discard this patch.
pages/export.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 ) {
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
 
Please login to merge, or discard this patch.
pages/import.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     || isset($SETTINGS['allow_import']) === false || (int) $SETTINGS['allow_import'] !== 1) {
72 72
     // Not allowed page
73 73
     $session->set('system-error_code', ERR_NOT_ALLOWED);
74
-    include $SETTINGS['cpassman_dir'] . '/error.php';
74
+    include $SETTINGS['cpassman_dir'].'/error.php';
75 75
     exit;
76 76
 }
77 77
 
Please login to merge, or discard this patch.
pages/items.js.php 1 patch
Spacing   +6 added lines, -6 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
 
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
             //
1031 1031
         } else if ($(this).data('item-action') === 'link') {
1032 1032
             // Add link to clipboard.
1033
-            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url'];?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1033
+            navigator.clipboard.writeText("<?php echo $SETTINGS['cpassman_url']; ?>/index.php?page=items&group="+store.get('teampassItem').folderId+"&id="+store.get('teampassItem').id);
1034 1034
 
1035 1035
             // Display message.
1036 1036
             toastr.remove();
@@ -2649,7 +2649,7 @@  discard block
 block discarded – undo
2649 2649
                 progress: "#form-item-password-strength",
2650 2650
                 score: "#form-item-password-strength"
2651 2651
             },
2652
-            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;?>],
2652
+            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; ?>],
2653 2653
         },
2654 2654
         i18n : {
2655 2655
             t: function (key) {
@@ -2676,7 +2676,7 @@  discard block
 block discarded – undo
2676 2676
     <?php
2677 2677
     $max_file_size = '';
2678 2678
     if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) {
2679
-        $max_file_size = $SETTINGS['upload_maxfilesize'] . 'mb';
2679
+        $max_file_size = $SETTINGS['upload_maxfilesize'].'mb';
2680 2680
     } else {
2681 2681
         $max_file_size = $SETTINGS['upload_maxfilesize'];
2682 2682
     }
@@ -4723,7 +4723,7 @@  discard block
 block discarded – undo
4723 4723
 
4724 4724
                             // Show passwords inputs and form
4725 4725
                             $('#dialog-ldap-user-change-password-info')
4726
-                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4726
+                                .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4727 4727
                                 .removeClass('hidden');
4728 4728
                             $('#dialog-ldap-user-change-password').removeClass('hidden');
4729 4729
                         } else if (data.error_type !== 'undefined') {
@@ -4742,7 +4742,7 @@  discard block
 block discarded – undo
4742 4742
 
4743 4743
                                 // Show passwords inputs and form
4744 4744
                                 $('#dialog-ldap-user-change-password-info')
4745
-                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>')
4745
+                                    .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>')
4746 4746
                                     .removeClass('hidden');
4747 4747
                                 $('#dialog-ldap-user-change-password').removeClass('hidden');
4748 4748
                             });
Please login to merge, or discard this patch.
scripts/task_maintenance_users_personal_folder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     //get through all users with enabled personnal folder.
80 80
     $users = DB::query(
81 81
         'SELECT id, login, email
82
-        FROM ' . prefixTable('users') . '
82
+        FROM ' . prefixTable('users').'
83 83
         WHERE id NOT IN ('.OTV_USER_ID.', '.TP_USER_ID.', '.SSH_USER_ID.', '.API_USER_ID.')
84 84
         AND personal_folder = 1
85 85
         ORDER BY login ASC'
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         //if folder doesn't exist then create it
89 89
         $data = DB::queryfirstrow(
90 90
             'SELECT id
91
-            FROM ' . prefixTable('nested_tree') . '
91
+            FROM ' . prefixTable('nested_tree').'
92 92
             WHERE title = %s AND parent_id = %i',
93 93
             $user['id'],
94 94
             0
Please login to merge, or discard this patch.
pages/items.php 1 patch
Spacing   +34 added lines, -34 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('items') === 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
 // Define Timezone
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 // Get list of users
92 92
 $usersList = [];
93
-$rows = DB::query('SELECT id,login,email FROM ' . prefixTable('users') . ' ORDER BY login ASC');
93
+$rows = DB::query('SELECT id,login,email FROM '.prefixTable('users').' ORDER BY login ASC');
94 94
 foreach ($rows as $record) {
95 95
     $usersList[$record['login']] = [
96 96
         'id' => $record['id'],
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 // Get list of roles
102 102
 $arrRoles = [];
103 103
 $listRoles = '';
104
-$rows = DB::query('SELECT id,title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC');
104
+$rows = DB::query('SELECT id,title FROM '.prefixTable('roles_title').' ORDER BY title ASC');
105 105
 foreach ($rows as $reccord) {
106 106
     $arrRoles[$reccord['title']] = [
107 107
         'id' => $reccord['id'],
108 108
         'title' => $reccord['title'],
109 109
     ];
110 110
     if (empty($listRoles)) {
111
-        $listRoles = $reccord['id'] . '#' . $reccord['title'];
111
+        $listRoles = $reccord['id'].'#'.$reccord['title'];
112 112
     } else {
113
-        $listRoles .= ';' . $reccord['id'] . '#' . $reccord['title'];
113
+        $listRoles .= ';'.$reccord['id'].'#'.$reccord['title'];
114 114
     }
115 115
 }
116 116
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                         <li class="nav-item"><a class="nav-link" href="#tab_3" data-toggle="tab"><i class="fa-solid fa-archive mr-2"></i><?php echo $lang->get('attachments'); ?></a></li>
186 186
                         <?php
187 187
                         echo isset($SETTINGS['item_extra_fields']) === true && (int) $SETTINGS['item_extra_fields'] === 1 ? '
188
-                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields') . '</a></li>' : '';
188
+                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields').'</a></li>' : '';
189 189
                         ?>
190 190
                     </ul>
191 191
                 </div><!-- /.card-header -->
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                                                 <?php
255 255
                                                 for ($i = 4; $i <= $SETTINGS['pwd_maximum_length']; ++$i) {
256 256
                                                     echo '
257
-                                                <option>' . $i . '</option>';
257
+                                                <option>' . $i.'</option>';
258 258
                                                 }
259 259
                                                 ?>
260 260
                                             </select>
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                                     <span class="ml-2 col-md-1 clear-me-html" id="form-item-icon-show"></span>
285 285
                                 </div>
286 286
                                 <small class='form-text text-muted'>
287
-                                    <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
287
+                                    <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
288 288
                                 </small>
289 289
                             </div>
290 290
 
@@ -473,39 +473,39 @@  discard block
 block discarded – undo
473 473
                             <div class="tab-pane" id="tab_4">
474 474
                                 <div id="form-item-field" class="hidden">
475 475
                                     <?php
476
-                                        $session_item_fields = $session->get('system-item_fields');//print_r($session_item_fields);
476
+                                        $session_item_fields = $session->get('system-item_fields'); //print_r($session_item_fields);
477 477
                                         if (isset($session_item_fields) === true) {
478 478
                                             foreach ($session_item_fields as $category) {
479 479
                                                 //print_r($category);
480 480
                                                 echo '
481
-                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'] . '">
482
-                                                <h5>' . $category['title'] . '</h5>
481
+                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'].'">
482
+                                                <h5>' . $category['title'].'</h5>
483 483
                                                 <p>';
484 484
                                                 foreach ($category['fields'] as $field) {
485 485
                                                     if ($field['type'] === 'textarea') {
486 486
                                                         echo '
487
-                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
487
+                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
488 488
                                                         <label>' . $field['title'],
489 489
                                                             $field['is_mandatory'] === '1' ?
490
-                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '',
490
+                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '',
491 491
                                                             '</label>
492
-                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0"></textarea>
492
+                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0"></textarea>
493 493
                                                     </div>';
494 494
                                                     } else {
495 495
                                                         echo '
496
-                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
496
+                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
497 497
                                                         <div class="input-group-prepend">
498 498
                                                             <span class="input-group-text">' . $field['title'],
499 499
                                                             $field['is_mandatory'] === '1' ?
500
-                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '',
500
+                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '',
501 501
                                                             '</span>
502 502
                                                         </div>
503
-                                                        <input type="' . $field['type'] . '" class="form-control form-item-control form-item-field-custom" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0">
503
+                                                        <input type="' . $field['type'].'" class="form-control form-item-control form-item-field-custom" data-field-name="'.$field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0">
504 504
                                                     </div>';
505 505
                                                     }
506 506
                                                     if (!empty($field['regex'])) {
507 507
                                                         echo '
508
-                                                    <div>Regex: '. $field['regex'] .'</div>
508
+                                                    <div>Regex: '. $field['regex'].'</div>
509 509
                                                         ';
510 510
                                                     }
511 511
                                                 }
@@ -516,8 +516,8 @@  discard block
 block discarded – undo
516 516
                                                 ) {
517 517
                                                     echo '
518 518
                                                     <div class="form-check icheck-blue">
519
-                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'] . '" data-change-ongoing="0" data-field-name="template" id="template_' . $category['id'] . '">
520
-                                                        <label class="form-check-label ml-3" for="template_' . $category['id'] . '">' . $lang->get('main_template') . '</label>
519
+                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'].'" data-change-ongoing="0" data-field-name="template" id="template_'.$category['id'].'">
520
+                                                        <label class="form-check-label ml-3" for="template_' . $category['id'].'">'.$lang->get('main_template').'</label>
521 521
                                                     </div>';
522 522
                                                 }
523 523
                                                 echo '
@@ -527,8 +527,8 @@  discard block
 block discarded – undo
527 527
                                         } else {
528 528
                                             echo
529 529
                                             '<div class="alert alert-info">
530
-                                                <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information') . '</h5>
531
-                                                ' . $lang->get('no_fields') . '
530
+                                                <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information').'</h5>
531
+                                                ' . $lang->get('no_fields').'
532 532
                                             </div>';
533 533
                                         } ?>
534 534
                                 </div>
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
                         <p><?php
670 670
                             echo str_replace(
671 671
         ['##otv_expiration_period##', '. '],
672
-        ['<span class="text-bold text-primary">' . $SETTINGS['otv_expiration_period'] . '</span>', '<br>'],
672
+        ['<span class="text-bold text-primary">'.$SETTINGS['otv_expiration_period'].'</span>', '<br>'],
673 673
         $lang->get('otv_message')
674 674
     );
675 675
                             ?></p>
@@ -687,9 +687,9 @@  discard block
 block discarded – undo
687 687
 
688 688
                     <div class="row">
689 689
                         <div class="form-group col-4">
690
-                            <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period'];?>)</label>
690
+                            <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period']; ?>)</label>
691 691
                             <div class="input-group mb-3">
692
-                                <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period'];?>" value="<?php echo $SETTINGS['otv_expiration_period'];?>">
692
+                                <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period']; ?>" value="<?php echo $SETTINGS['otv_expiration_period']; ?>">
693 693
                             </div>
694 694
                         </div>
695 695
 
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
                             <select class="form-control form-folder-control select2" style="width:100%;" id="form-folder-add-complexicity" required>
778 778
                                 <?php
779 779
                                 foreach (TP_PW_COMPLEXITY as $key => $value) {
780
-                                    echo '<option value="' . $key . '">' . $value[1] . '</option>';
780
+                                    echo '<option value="'.$key.'">'.$value[1].'</option>';
781 781
                                 }
782 782
                                 ?>
783 783
                             </select>
@@ -795,14 +795,14 @@  discard block
 block discarded – undo
795 795
                             <label><?php echo $lang->get('icon'); ?></label>
796 796
                             <input type="text" class="form-control form-folder-control" id="form-folder-add-icon">
797 797
                             <small class='form-text text-muted'>
798
-                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
798
+                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
799 799
                             </small>
800 800
                         </div>
801 801
                         <div class="form-group">
802 802
                             <label><?php echo $lang->get('icon_on_selection'); ?></label>
803 803
                             <input type="text" class="form-control form-folder-control" id="form-folder-add-icon-selected">
804 804
                             <small class='form-text text-muted'>
805
-                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
805
+                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
806 806
                             </small>
807 807
                         </div>
808 808
                     </div>
@@ -1213,18 +1213,18 @@  discard block
 block discarded – undo
1213 1213
                                 <?php
1214 1214
                                     foreach ($session_item_fields as $elem) {
1215 1215
                                         echo '
1216
-                                <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'] . '">
1217
-                                    <h5>' . $elem['title'] . '</h5>
1216
+                                <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'].'">
1217
+                                    <h5>' . $elem['title'].'</h5>
1218 1218
                                     <p>
1219 1219
                                         <ul class="list-group list-group-unbordered mb-3">';
1220 1220
                                         foreach ($elem['fields'] as $field) {
1221 1221
                                             echo '
1222
-                                            <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'] . '">
1223
-                                                <span id="card-item-field-title-' . $field['id'] . '"><b>' . $field['title'] . '</b></span>
1224
-                                                <button type="button" class="float-right btn btn-secondary btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'] . '">
1222
+                                            <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'].'">
1223
+                                                <span id="card-item-field-title-' . $field['id'].'"><b>'.$field['title'].'</b></span>
1224
+                                                <button type="button" class="float-right btn btn-secondary btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'].'">
1225 1225
                                                     <i class="fa-solid fa-copy"></i>
1226 1226
                                                 </button>
1227
-                                                <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'] . '"></span>
1227
+                                                <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'].'"></span>
1228 1228
                                             </li>';
1229 1229
                                         }
1230 1230
                                         echo '
Please login to merge, or discard this patch.