@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $ret = []; |
35 | 35 | |
36 | 36 | foreach ($rows as $row) { |
37 | - $isVisible = in_array((int) $row['id'], $foldersId); |
|
37 | + $isVisible = in_array((int) $row['id'], $foldersId); |
|
38 | 38 | $childrens = $this->getFoldersChildren($row['id'], $foldersId); |
39 | 39 | |
40 | 40 | if ($isVisible || count($childrens) > 0) { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | [ |
44 | 44 | 'id' => (int) $row['id'], |
45 | 45 | 'title' => $row['title'], |
46 | - 'isVisible' => $isVisible, |
|
46 | + 'isVisible' => $isVisible, |
|
47 | 47 | 'childrens' => $childrens |
48 | 48 | ] |
49 | 49 | ); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | if ( count($childrens) > 0) { |
65 | 65 | foreach ($childrens as $children) { |
66 | - $isVisible = in_array((int) $children['id'], $foldersId); |
|
66 | + $isVisible = in_array((int) $children['id'], $foldersId); |
|
67 | 67 | $childs = $this->getFoldersChildren($children['id'], $foldersId); |
68 | 68 | |
69 | 69 | if (in_array((int) $children['id'], $foldersId) || count($childs) > 0) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | [ |
73 | 73 | 'id' => (int) $children['id'], |
74 | 74 | 'title' => $children['title'], |
75 | - 'isVisible' => $isVisible, |
|
75 | + 'isVisible' => $isVisible, |
|
76 | 76 | 'childrens' => $childs |
77 | 77 | ] |
78 | 78 | ); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // Get folders |
38 | 38 | $rows = DB::query( |
39 | 39 | 'SELECT id, title |
40 | - FROM ' . prefixTable('nested_tree') . ' |
|
40 | + FROM ' . prefixTable('nested_tree').' |
|
41 | 41 | WHERE nlevel = %i', |
42 | 42 | 1 |
43 | 43 | ); |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | $ret = []; |
70 | 70 | $childrens = DB::query( |
71 | 71 | 'SELECT id, title |
72 | - FROM ' . prefixTable('nested_tree') . ' |
|
72 | + FROM ' . prefixTable('nested_tree').' |
|
73 | 73 | WHERE parent_id = %i', |
74 | 74 | $parentId |
75 | 75 | ); |
76 | 76 | |
77 | - if ( count($childrens) > 0) { |
|
77 | + if (count($childrens) > 0) { |
|
78 | 78 | foreach ($childrens as $children) { |
79 | 79 | $isVisible = in_array((int) $children['id'], $foldersId); |
80 | 80 | $childs = $this->getFoldersChildren($children['id'], $foldersId); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ): array |
117 | 117 | { |
118 | 118 | // Validate inputs |
119 | - include_once API_ROOT_PATH . '/../sources/main.functions.php'; |
|
119 | + include_once API_ROOT_PATH.'/../sources/main.functions.php'; |
|
120 | 120 | $data = [ |
121 | 121 | 'title' => $title, |
122 | 122 | 'parent_id' => $parent_id, |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | 'error' => true, |
182 | 182 | 'error_header' => 'HTTP/1.1 422 Unprocessable Entity', |
183 | 183 | 'error_message' => 'Invalid parameters' |
184 | - ];} |
|
184 | + ]; } |
|
185 | 185 | |
186 | 186 | // Create folder |
187 | 187 | require_once TEAMPASS_ROOT_PATH.'/sources/folders.class.php'; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $arrQueryStringParams = $this->getQueryStringParams(); |
40 | 40 | |
41 | 41 | if (strtoupper($requestMethod) === 'POST') { |
42 | - require API_ROOT_PATH . "/Model/AuthModel.php"; |
|
42 | + require API_ROOT_PATH."/Model/AuthModel.php"; |
|
43 | 43 | try { |
44 | 44 | $authModel = new AuthModel(); |
45 | 45 | $arrUser = $authModel->getUserAuth( |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | if (array_key_exists("token", $arrUser)) { |
51 | 51 | $responseData = json_encode($arrUser); |
52 | 52 | } else { |
53 | - $strErrorDesc = $arrUser['error'] . " (" . $arrUser['info'] . ")"; |
|
53 | + $strErrorDesc = $arrUser['error']." (".$arrUser['info'].")"; |
|
54 | 54 | $strErrorHeader = 'HTTP/1.1 401 Unauthorized'; |
55 | 55 | } |
56 | 56 | } catch (Error $e) { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | "error" => '', |
41 | 41 | ); |
42 | 42 | |
43 | - }catch (Exception $e) { |
|
43 | + } catch (Exception $e) { |
|
44 | 44 | return false; |
45 | 45 | } |
46 | 46 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('statistics') === false) { |
66 | 66 | // Not allowed page |
67 | 67 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
68 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
68 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
69 | 69 | exit; |
70 | 70 | } |
71 | 71 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('folders') === false) { |
67 | 67 | // Not allowed page |
68 | 68 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
69 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
69 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
70 | 70 | exit; |
71 | 71 | } |
72 | 72 | |
@@ -99,28 +99,28 @@ discard block |
||
99 | 99 | $complexityHtml = '<div id="hidden-select-complexity" class="hidden"><select id="select-complexity" class="form-control form-item-control save-me">'; |
100 | 100 | $complexitySelect = ''; |
101 | 101 | foreach (TP_PW_COMPLEXITY as $level) { |
102 | - $complexitySelect .= '<option value="' . $level[0] . '">' . $level[1] . '</option>'; |
|
102 | + $complexitySelect .= '<option value="'.$level[0].'">'.$level[1].'</option>'; |
|
103 | 103 | } |
104 | -$complexityHtml .= $complexitySelect . '</select></div>'; |
|
104 | +$complexityHtml .= $complexitySelect.'</select></div>'; |
|
105 | 105 | |
106 | 106 | /* Get full tree structure */ |
107 | 107 | $tst = $tree->getDescendants(); |
108 | 108 | // prepare options list |
109 | -$droplist = '<option value="na">---' . $lang->get('select') . '---</option>'; |
|
109 | +$droplist = '<option value="na">---'.$lang->get('select').'---</option>'; |
|
110 | 110 | if ((int) $session->get('user-admin') === 1 || (int) $session->get('user-manager') === 1 || (int) $session->get('user-can_create_root_folder') === 1) { |
111 | - $droplist .= '<option value="0">' . $lang->get('root') . '</option>'; |
|
111 | + $droplist .= '<option value="0">'.$lang->get('root').'</option>'; |
|
112 | 112 | } |
113 | 113 | foreach ($tst as $t) { |
114 | 114 | if ( |
115 | 115 | in_array($t->id, $session->get('user-accessible_folders')) === true |
116 | 116 | && in_array($t->id, $session->get('user-personal_visible_folders')) === false |
117 | 117 | ) { |
118 | - $droplist .= '<option value="' . $t->id . '">' . addslashes($t->title); |
|
118 | + $droplist .= '<option value="'.$t->id.'">'.addslashes($t->title); |
|
119 | 119 | $text = ''; |
120 | 120 | foreach ($tree->getPath($t->id, false) as $fld) { |
121 | - $text .= empty($text) === true ? ' [' . $fld->title : ' > ' . $fld->title; |
|
121 | + $text .= empty($text) === true ? ' ['.$fld->title : ' > '.$fld->title; |
|
122 | 122 | } |
123 | - $droplist .= (empty($text) === true ? '' : $text . '</i>]') . '</option>'; |
|
123 | + $droplist .= (empty($text) === true ? '' : $text.'</i>]').'</option>'; |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | |
@@ -199,14 +199,14 @@ discard block |
||
199 | 199 | <label><?php echo $lang->get('icon'); ?></label> |
200 | 200 | <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon" data-field="icon"> |
201 | 201 | <small class='form-text text-muted'> |
202 | - <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
202 | + <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
203 | 203 | </small> |
204 | 204 | </div> |
205 | 205 | <div class="form-group"> |
206 | 206 | <label><?php echo $lang->get('icon_on_selection'); ?></label> |
207 | 207 | <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon-selected" data-field="iconSelected"> |
208 | 208 | <small class='form-text text-muted'> |
209 | - <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
209 | + <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
210 | 210 | </small> |
211 | 211 | </div> |
212 | 212 | <div class="form-group"> |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | <th scope="col" min-width="200px"><?php echo $lang->get('group'); ?></th> |
298 | 298 | <th scope="col" min-width="200px"><?php echo $lang->get('group_parent'); ?></th> |
299 | 299 | <th scope="col" width="50px"><i class="fas fa-gavel fa-lg infotip" title="<?php echo $lang->get('password_strength'); ?>"></i></th> |
300 | - <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo $lang->get('group_pw_duration') . ' ' . $lang->get('group_pw_duration_tip'); ?>"></i></th> |
|
300 | + <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo $lang->get('group_pw_duration').' '.$lang->get('group_pw_duration_tip'); ?>"></i></th> |
|
301 | 301 | <th scope="col" width="50px"><i class="fas fa-pen fa-lg infotip" title="<?php echo $lang->get('auth_creation_without_complexity'); ?>"></i></th> |
302 | 302 | <th scope="col" width="50px"><i class="fas fa-edit fa-lg infotip" title="<?php echo $lang->get('auth_modification_without_complexity'); ?>"></i></th> |
303 | 303 | <th scope="col" width="50px"><i class="fas fa-folder fa-lg infotip" title="<?php echo $lang->get('icon'); ?>"></i></th> |
@@ -62,7 +62,7 @@ |
||
62 | 62 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('uploads') === false) { |
63 | 63 | // Not allowed page |
64 | 64 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
65 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
65 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
66 | 66 | exit; |
67 | 67 | } |
68 | 68 | ?> |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('emails') === false) { |
66 | 66 | // Not allowed page |
67 | 67 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
68 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
68 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | <div class="card-body"> |
245 | 245 | <div id="unsent-emails"> |
246 | 246 | <?php |
247 | - DB::query('SELECT * FROM ' . prefixTable('emails') . ' WHERE status = %s OR status = %s', 'not_sent', ''); |
|
247 | + DB::query('SELECT * FROM '.prefixTable('emails').' WHERE status = %s OR status = %s', 'not_sent', ''); |
|
248 | 248 | echo str_replace('#nb_emails#', (string) DB::count(), $lang->get('email_send_backlog')); |
249 | 249 | ?> |
250 | 250 | </div> |
@@ -67,7 +67,7 @@ |
||
67 | 67 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('statistics') === false) { |
68 | 68 | // Not allowed page |
69 | 69 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
70 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
70 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
71 | 71 | exit; |
72 | 72 | } |
73 | 73 | ?> |
@@ -64,7 +64,7 @@ |
||
64 | 64 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('utilities.database') === false) { |
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 |