@@ -1,6 +1,6 @@ |
||
1 | 1 | <!-- snippets --> |
2 | 2 | <?php |
3 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
4 | 4 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
5 | 5 | } |
6 | 6 |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
6 | 6 | $tpl = array( |
7 | - 'viewForm' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_viewForm.tpl'), |
|
8 | - 'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'), |
|
9 | - 'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'), |
|
10 | - 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'), |
|
11 | - 'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl') |
|
7 | + 'viewForm' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_viewForm.tpl'), |
|
8 | + 'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'), |
|
9 | + 'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'), |
|
10 | + 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'), |
|
11 | + 'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl') |
|
12 | 12 | ); |
13 | 13 | |
14 | 14 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false; |
52 | 52 | |
53 | - if (! is_array($items) || empty($items)) { |
|
53 | + if (!is_array($items) || empty($items)) { |
|
54 | 54 | return $_lang['no_results']; |
55 | 55 | } |
56 | 56 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
71 | 71 | 'tab' => $resourceTable, |
72 | 72 | 'category' => $categories[$catid]['name'], |
73 | - 'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '', |
|
73 | + 'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '', |
|
74 | 74 | 'catid' => $catid, |
75 | 75 | )); |
76 | 76 | |
@@ -112,10 +112,10 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | $tpl = array( |
115 | - 'panelGroup' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelGroup.tpl'), |
|
116 | - 'panelHeading' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelHeading.tpl'), |
|
117 | - 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_panelCollapse.tpl'), |
|
118 | - 'elementsRow' => file_get_contents(MODX_MANAGER_PATH . 'actions/resources/tpl_elementsRow.tpl'), |
|
115 | + 'panelGroup' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelGroup.tpl'), |
|
116 | + 'panelHeading' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelHeading.tpl'), |
|
117 | + 'panelCollapse' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_panelCollapse.tpl'), |
|
118 | + 'elementsRow' => file_get_contents(MODX_MANAGER_PATH.'actions/resources/tpl_elementsRow.tpl'), |
|
119 | 119 | ); |
120 | 120 | |
121 | 121 | // Easily loop through $itemsPerCategory-Array |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
134 | 134 | 'tab' => 'categories_list', |
135 | 135 | 'category' => $categories[$catid], |
136 | - 'categoryid' => $catid != '' ? ' <small>(' . $catid . ')</small>' : '', |
|
136 | + 'categoryid' => $catid != '' ? ' <small>('.$catid.')</small>' : '', |
|
137 | 137 | 'catid' => $catid, |
138 | 138 | )); |
139 | 139 | |
@@ -206,32 +206,32 @@ discard block |
||
206 | 206 | if ($rowLock && $modx->hasPermission('display_locks')) { |
207 | 207 | if ($rowLock['sid'] == $modx->sid) { |
208 | 208 | $title = $modx->parseText($_lang["lock_element_editing"], array( |
209 | - 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
|
209 | + 'element_type' => $_lang["lock_element_type_".$lockElementType], |
|
210 | 210 | 'lasthit_df' => $rowLock['lasthit_df'] |
211 | 211 | )); |
212 | - $lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span> '; |
|
212 | + $lockedByUser = '<span title="'.$title.'" class="editResource" style="cursor:context-menu;">'.$_style['tree_preview_resource'].'</span> '; |
|
213 | 213 | } else { |
214 | 214 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
215 | - 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
|
215 | + 'element_type' => $_lang["lock_element_type_".$lockElementType], |
|
216 | 216 | 'username' => $rowLock['username'], |
217 | 217 | 'lasthit_df' => $rowLock['lasthit_df'] |
218 | 218 | )); |
219 | 219 | if ($modx->hasPermission('remove_locks')) { |
220 | - $lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>'; |
|
220 | + $lockedByUser = '<a href="javascript:;" onclick="unlockElement('.$lockElementType.', '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource"><i class="'.$_style['icons_secured'].'"></i></a>'; |
|
221 | 221 | } else { |
222 | - $lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>'; |
|
222 | + $lockedByUser = '<span title="'.$title.'" class="lockedResource" style="cursor:context-menu;"><i class="'.$_style['icons_secured'].'"></i></span>'; |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
226 | 226 | if ($lockedByUser) { |
227 | - $lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>'; |
|
227 | + $lockedByUser = '<div class="lockCell">'.$lockedByUser.'</div>'; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | // Caption |
231 | 231 | if ($resourceTable == 'site_tmplvars') { |
232 | - $caption = !empty($row['description']) ? ' ' . $row['caption'] . ' <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption']; |
|
232 | + $caption = !empty($row['description']) ? ' '.$row['caption'].' <small>('.$row['description'].')</small>' : ' '.$row['caption']; |
|
233 | 233 | } else { |
234 | - $caption = !empty($row['description']) ? ' ' . $row['description'] : ''; |
|
234 | + $caption = !empty($row['description']) ? ' '.$row['description'] : ''; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | // Special marks |
@@ -242,26 +242,26 @@ discard block |
||
242 | 242 | if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
243 | 243 | $tplInfo[] = $_lang['defaulttemplate_title']; |
244 | 244 | } |
245 | - $marks = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : ''; |
|
245 | + $marks = !empty($tplInfo) ? ' <em>('.implode(', ', $tplInfo).')</em>' : ''; |
|
246 | 246 | |
247 | 247 | /* row buttons */ |
248 | 248 | $buttons = ''; |
249 | 249 | if ($modx->hasPermission($types['actions']['edit'][1])) { |
250 | - $buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>'; |
|
250 | + $buttons .= '<li><a title="'.$_lang["edit_resource"].'" href="index.php?a='.$types['actions']['edit'][0].'&id='.$row['id'].'"><i class="fa fa-edit fa-fw"></i></a></li>'; |
|
251 | 251 | } |
252 | 252 | if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
253 | - $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>'; |
|
253 | + $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_duplicate_record"].'\')" title="'.$_lang["resource_duplicate"].'" href="index.php?a='.$types['actions']['duplicate'][0].'&id='.$row['id'].'"><i class="fa fa-clone fa-fw"></i></a></li>'; |
|
254 | 254 | } |
255 | 255 | if ($modx->hasPermission($types['actions']['remove'][1])) { |
256 | - $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>'; |
|
256 | + $buttons .= '<li><a onclick="return confirm(\''.$_lang["confirm_delete"].'\')" title="'.$_lang["delete"].'" href="index.php?a='.$types['actions']['remove'][0].'&id='.$row['id'].'"><i class="fa fa-trash fa-fw"></i></a></li>'; |
|
257 | 257 | } |
258 | - $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : ''; |
|
258 | + $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">'.$buttons.'</ul></div>' : ''; |
|
259 | 259 | |
260 | 260 | $catid = $row['catid'] ? $row['catid'] : 0; |
261 | 261 | |
262 | 262 | // Placeholders for elements-row |
263 | 263 | return array( |
264 | - 'class' => $class ? ' class="' . $class . '"' : '', |
|
264 | + 'class' => $class ? ' class="'.$class.'"' : '', |
|
265 | 265 | 'lockedByUser' => $lockedByUser, |
266 | 266 | 'name' => $row['name'], |
267 | 267 | 'caption' => $caption, |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | * @param array $ph |
17 | 17 | * @return string |
18 | 18 | */ |
19 | -function parsePh($tpl, $ph) |
|
20 | -{ |
|
19 | +function parsePh($tpl, $ph) |
|
20 | +{ |
|
21 | 21 | $modx = evolutionCMS(); |
22 | 22 | global $_lang; |
23 | 23 | $tpl = $modx->parseText($tpl, $_lang, '[%', '%]'); |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | * @param string|int $cssId |
29 | 29 | * @return string |
30 | 30 | */ |
31 | -function renderViewSwitchButtons($cssId) |
|
32 | -{ |
|
31 | +function renderViewSwitchButtons($cssId) |
|
32 | +{ |
|
33 | 33 | $modx = evolutionCMS(); |
34 | 34 | global $_lang, $tpl; |
35 | 35 | |
@@ -43,21 +43,21 @@ discard block |
||
43 | 43 | * @param mgrResources $resources |
44 | 44 | * @return string |
45 | 45 | */ |
46 | -function createResourceList($resourceTable, $resources) |
|
47 | -{ |
|
46 | +function createResourceList($resourceTable, $resources) |
|
47 | +{ |
|
48 | 48 | $modx = evolutionCMS(); |
49 | 49 | global $_lang, $_style, $modx_textdir, $tpl; |
50 | 50 | |
51 | 51 | $items = isset($resources->items[$resourceTable]) ? $resources->items[$resourceTable] : false; |
52 | 52 | |
53 | - if (! is_array($items) || empty($items)) { |
|
53 | + if (! is_array($items) || empty($items)) { |
|
54 | 54 | return $_lang['no_results']; |
55 | 55 | } |
56 | 56 | |
57 | 57 | // Prepare elements- and categories-list |
58 | 58 | $elements = array(); |
59 | 59 | $categories = array(); |
60 | - foreach ($items as $row) { |
|
60 | + foreach ($items as $row) { |
|
61 | 61 | $catid = $row['catid'] ? $row['catid'] : 0; |
62 | 62 | $categories[$catid] = array('name' => stripslashes($row['category'])); |
63 | 63 | $elements[$catid][] = prepareElementRowPh($row, $resourceTable, $resources); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | // Now render categories / panel-collapse |
67 | 67 | $panelGroup = ''; |
68 | - foreach ($elements as $catid => $elList) { |
|
68 | + foreach ($elements as $catid => $elList) { |
|
69 | 69 | // Add panel-heading / category-collapse to output |
70 | 70 | $panelGroup .= parsePh($tpl['panelHeading'], array( |
71 | 71 | 'tab' => $resourceTable, |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | // Prepare content for panel-collapse |
78 | 78 | $panelCollapse = ''; |
79 | - foreach ($elList as $el) { |
|
79 | + foreach ($elList as $el) { |
|
80 | 80 | $panelCollapse .= parsePh($tpl['elementsRow'], $el); |
81 | 81 | } |
82 | 82 | |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | * @param mgrResources $resources |
99 | 99 | * @return string |
100 | 100 | */ |
101 | -function createCombinedView($resources) |
|
102 | -{ |
|
101 | +function createCombinedView($resources) |
|
102 | +{ |
|
103 | 103 | $modx = evolutionCMS(); |
104 | 104 | global $_lang, $_style, $modx_textdir; |
105 | 105 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $types = isset($resources->types) ? $resources->types : false; |
108 | 108 | $categories = isset($resources->categories) ? $resources->categories : false; |
109 | 109 | |
110 | - if (!$itemsPerCategory) { |
|
110 | + if (!$itemsPerCategory) { |
|
111 | 111 | return $_lang['no_results']; |
112 | 112 | } |
113 | 113 | |
@@ -120,10 +120,10 @@ discard block |
||
120 | 120 | |
121 | 121 | // Easily loop through $itemsPerCategory-Array |
122 | 122 | $panelGroup = ''; |
123 | - foreach ($categories as $catid => $category) { |
|
123 | + foreach ($categories as $catid => $category) { |
|
124 | 124 | // Prepare collapse content / elements-list |
125 | 125 | $panelCollapse = ''; |
126 | - foreach ($itemsPerCategory[$catid] as $el) { |
|
126 | + foreach ($itemsPerCategory[$catid] as $el) { |
|
127 | 127 | $resourceTable = $el['type']; |
128 | 128 | $ph = prepareElementRowPh($el, $resourceTable, $resources); |
129 | 129 | $panelCollapse .= parsePh($tpl['elementsRow'], $ph); |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | * @param mgrResources $resources |
158 | 158 | * @return array |
159 | 159 | */ |
160 | -function prepareElementRowPh($row, $resourceTable, $resources) |
|
161 | -{ |
|
160 | +function prepareElementRowPh($row, $resourceTable, $resources) |
|
161 | +{ |
|
162 | 162 | $modx = evolutionCMS(); |
163 | 163 | global $modx_textdir, $_style, $_lang; |
164 | 164 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | $_lang["confirm_delete"] = $_lang["delete"]; |
168 | 168 | |
169 | - switch ($resourceTable) { |
|
169 | + switch ($resourceTable) { |
|
170 | 170 | case 'site_templates': |
171 | 171 | $class = $row['selectable'] ? '' : 'disabledPlugin'; |
172 | 172 | $lockElementType = 1; |
@@ -203,56 +203,56 @@ discard block |
||
203 | 203 | // Prepare displaying user-locks |
204 | 204 | $lockedByUser = ''; |
205 | 205 | $rowLock = $modx->elementIsLocked($lockElementType, $row['id'], true); |
206 | - if ($rowLock && $modx->hasPermission('display_locks')) { |
|
207 | - if ($rowLock['sid'] == $modx->sid) { |
|
206 | + if ($rowLock && $modx->hasPermission('display_locks')) { |
|
207 | + if ($rowLock['sid'] == $modx->sid) { |
|
208 | 208 | $title = $modx->parseText($_lang["lock_element_editing"], array( |
209 | 209 | 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
210 | 210 | 'lasthit_df' => $rowLock['lasthit_df'] |
211 | 211 | )); |
212 | 212 | $lockedByUser = '<span title="' . $title . '" class="editResource" style="cursor:context-menu;">' . $_style['tree_preview_resource'] . '</span> '; |
213 | - } else { |
|
213 | + } else { |
|
214 | 214 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
215 | 215 | 'element_type' => $_lang["lock_element_type_" . $lockElementType], |
216 | 216 | 'username' => $rowLock['username'], |
217 | 217 | 'lasthit_df' => $rowLock['lasthit_df'] |
218 | 218 | )); |
219 | - if ($modx->hasPermission('remove_locks')) { |
|
219 | + if ($modx->hasPermission('remove_locks')) { |
|
220 | 220 | $lockedByUser = '<a href="javascript:;" onclick="unlockElement(' . $lockElementType . ', ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource"><i class="' . $_style['icons_secured'] . '"></i></a>'; |
221 | - } else { |
|
221 | + } else { |
|
222 | 222 | $lockedByUser = '<span title="' . $title . '" class="lockedResource" style="cursor:context-menu;"><i class="' . $_style['icons_secured'] . '"></i></span>'; |
223 | 223 | } |
224 | 224 | } |
225 | 225 | } |
226 | - if ($lockedByUser) { |
|
226 | + if ($lockedByUser) { |
|
227 | 227 | $lockedByUser = '<div class="lockCell">' . $lockedByUser . '</div>'; |
228 | 228 | } |
229 | 229 | |
230 | 230 | // Caption |
231 | - if ($resourceTable == 'site_tmplvars') { |
|
231 | + if ($resourceTable == 'site_tmplvars') { |
|
232 | 232 | $caption = !empty($row['description']) ? ' ' . $row['caption'] . ' <small>(' . $row['description'] . ')</small>' : ' ' . $row['caption']; |
233 | - } else { |
|
233 | + } else { |
|
234 | 234 | $caption = !empty($row['description']) ? ' ' . $row['description'] : ''; |
235 | 235 | } |
236 | 236 | |
237 | 237 | // Special marks |
238 | 238 | $tplInfo = array(); |
239 | - if ($row['locked']) { |
|
239 | + if ($row['locked']) { |
|
240 | 240 | $tplInfo[] = $_lang['locked']; |
241 | 241 | } |
242 | - if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
|
242 | + if ($row['id'] == $modx->config['default_template'] && $resourceTable == 'site_templates') { |
|
243 | 243 | $tplInfo[] = $_lang['defaulttemplate_title']; |
244 | 244 | } |
245 | 245 | $marks = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : ''; |
246 | 246 | |
247 | 247 | /* row buttons */ |
248 | 248 | $buttons = ''; |
249 | - if ($modx->hasPermission($types['actions']['edit'][1])) { |
|
249 | + if ($modx->hasPermission($types['actions']['edit'][1])) { |
|
250 | 250 | $buttons .= '<li><a title="' . $_lang["edit_resource"] . '" href="index.php?a=' . $types['actions']['edit'][0] . '&id=' . $row['id'] . '"><i class="fa fa-edit fa-fw"></i></a></li>'; |
251 | 251 | } |
252 | - if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
|
252 | + if ($modx->hasPermission($types['actions']['duplicate'][1])) { |
|
253 | 253 | $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_duplicate_record"] . '\')" title="' . $_lang["resource_duplicate"] . '" href="index.php?a=' . $types['actions']['duplicate'][0] . '&id=' . $row['id'] . '"><i class="fa fa-clone fa-fw"></i></a></li>'; |
254 | 254 | } |
255 | - if ($modx->hasPermission($types['actions']['remove'][1])) { |
|
255 | + if ($modx->hasPermission($types['actions']['remove'][1])) { |
|
256 | 256 | $buttons .= '<li><a onclick="return confirm(\'' . $_lang["confirm_delete"] . '\')" title="' . $_lang["delete"] . '" href="index.php?a=' . $types['actions']['remove'][0] . '&id=' . $row['id'] . '"><i class="fa fa-trash fa-fw"></i></a></li>'; |
257 | 257 | } |
258 | 258 | $buttons = $buttons ? '<div class="btnCell"><ul class="elements_buttonbar">' . $buttons . '</ul></div>' : ''; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('edit_web_user')) { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | // context menu |
28 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
28 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0)); |
31 | 31 | $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0)); |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | <div class="row"> |
121 | 121 | <div class="table-responsive"> |
122 | 122 | <?php |
123 | - $ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu |
|
124 | - INNER JOIN " . $modx->getFullTableName("web_user_attributes") . " wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username'); |
|
125 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
123 | + $ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users")." wu |
|
124 | + INNER JOIN " . $modx->getFullTableName("web_user_attributes")." wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username'); |
|
125 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
126 | 126 | $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
127 | 127 | $grd->noRecordMsg = $_lang["no_records_found"]; |
128 | 128 | $grd->cssClass = "table data"; |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | $grd->itemClass = "tableItem"; |
131 | 131 | $grd->altItemClass = "tableAltItem"; |
132 | 132 | $grd->fields = "id,username,fullname,email,gender,blocked"; |
133 | - $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_gender"] . " ," . $_lang["user_block"]; |
|
133 | + $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["user_full_name"]." ,".$_lang["email"]." ,".$_lang["user_gender"]." ,".$_lang["user_block"]; |
|
134 | 134 | $grd->colWidths = "1%,,,,1%,1%"; |
135 | 135 | $grd->colAligns = "center,,,,center,right' nowrap='nowrap"; |
136 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>"; |
|
136 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='".$_style["icons_user"]."'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='".$_lang["click_to_edit_title"]."'>[+value+]</a>"; |
|
137 | 137 | if ($listmode == '1') { |
138 | 138 | $grd->pageSize = 0; |
139 | 139 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('file_manager')) { |
@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | $newToken = makeToken(); |
10 | 10 | |
11 | 11 | // settings |
12 | -$theme_image_path = $modx->config['site_manager_url'] . 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
|
12 | +$theme_image_path = $modx->config['site_manager_url'].'media/style/'.$modx->config['manager_theme'].'/images/'; |
|
13 | 13 | $excludes = array( |
14 | 14 | '.', |
15 | 15 | '..', |
16 | 16 | '.svn' |
17 | 17 | ); |
18 | -$alias_suffix = (!empty($friendly_url_suffix)) ? ',' . ltrim($friendly_url_suffix, '.') : ''; |
|
19 | -$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json,ini' . $alias_suffix); |
|
20 | -$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json,ini' . $alias_suffix); |
|
18 | +$alias_suffix = (!empty($friendly_url_suffix)) ? ','.ltrim($friendly_url_suffix, '.') : ''; |
|
19 | +$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json,ini'.$alias_suffix); |
|
20 | +$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json,ini'.$alias_suffix); |
|
21 | 21 | $viewablefiles = explode(',', 'jpg,gif,png,ico'); |
22 | 22 | |
23 | 23 | $editablefiles = add_dot($editablefiles); |
@@ -30,31 +30,31 @@ discard block |
||
30 | 30 | { |
31 | 31 | */ |
32 | 32 | $protected_path[] = $modx->config['site_manager_path']; |
33 | -$protected_path[] = $modx->config['base_path'] . 'temp/backup'; |
|
34 | -$protected_path[] = $modx->config['base_path'] . 'assets/backup'; |
|
33 | +$protected_path[] = $modx->config['base_path'].'temp/backup'; |
|
34 | +$protected_path[] = $modx->config['base_path'].'assets/backup'; |
|
35 | 35 | |
36 | 36 | if (!$modx->hasPermission('save_plugin')) { |
37 | - $protected_path[] = $modx->config['base_path'] . 'assets/plugins'; |
|
37 | + $protected_path[] = $modx->config['base_path'].'assets/plugins'; |
|
38 | 38 | } |
39 | 39 | if (!$modx->hasPermission('save_snippet')) { |
40 | - $protected_path[] = $modx->config['base_path'] . 'assets/snippets'; |
|
40 | + $protected_path[] = $modx->config['base_path'].'assets/snippets'; |
|
41 | 41 | } |
42 | 42 | if (!$modx->hasPermission('save_template')) { |
43 | - $protected_path[] = $modx->config['base_path'] . 'assets/templates'; |
|
43 | + $protected_path[] = $modx->config['base_path'].'assets/templates'; |
|
44 | 44 | } |
45 | 45 | if (!$modx->hasPermission('save_module')) { |
46 | - $protected_path[] = $modx->config['base_path'] . 'assets/modules'; |
|
46 | + $protected_path[] = $modx->config['base_path'].'assets/modules'; |
|
47 | 47 | } |
48 | 48 | if (!$modx->hasPermission('empty_cache')) { |
49 | - $protected_path[] = $modx->config['base_path'] . 'assets/cache'; |
|
49 | + $protected_path[] = $modx->config['base_path'].'assets/cache'; |
|
50 | 50 | } |
51 | 51 | if (!$modx->hasPermission('import_static')) { |
52 | - $protected_path[] = $modx->config['base_path'] . 'temp/import'; |
|
53 | - $protected_path[] = $modx->config['base_path'] . 'assets/import'; |
|
52 | + $protected_path[] = $modx->config['base_path'].'temp/import'; |
|
53 | + $protected_path[] = $modx->config['base_path'].'assets/import'; |
|
54 | 54 | } |
55 | 55 | if (!$modx->hasPermission('export_static')) { |
56 | - $protected_path[] = $modx->config['base_path'] . 'temp/export'; |
|
57 | - $protected_path[] = $modx->config['base_path'] . 'assets/export'; |
|
56 | + $protected_path[] = $modx->config['base_path'].'temp/export'; |
|
57 | + $protected_path[] = $modx->config['base_path'].'assets/export'; |
|
58 | 58 | } |
59 | 59 | /* |
60 | 60 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | { |
84 | 84 | $count = count($array); |
85 | 85 | for ($i = 0; $i < $count; $i++) { |
86 | - $array[$i] = '.' . strtolower(trim($array[$i])); // add a dot :) |
|
86 | + $array[$i] = '.'.strtolower(trim($array[$i])); // add a dot :) |
|
87 | 87 | } |
88 | 88 | return $array; |
89 | 89 | } |
@@ -108,15 +108,15 @@ discard block |
||
108 | 108 | $rw = realpath('../'); |
109 | 109 | $webstart_path = str_replace('\\', '/', str_replace($rw, '', $rf)); |
110 | 110 | if (substr($webstart_path, 0, 1) == '/') { |
111 | - $webstart_path = '..' . $webstart_path; |
|
111 | + $webstart_path = '..'.$webstart_path; |
|
112 | 112 | } else { |
113 | - $webstart_path = '../' . $webstart_path; |
|
113 | + $webstart_path = '../'.$webstart_path; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | ?> |
117 | 117 | <script type="text/javascript"> |
118 | 118 | |
119 | - var current_path = '<?= $startpath;?>'; |
|
119 | + var current_path = '<?= $startpath; ?>'; |
|
120 | 120 | |
121 | 121 | function viewfile (url) |
122 | 122 | { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | function unzipFile (file) |
153 | 153 | { |
154 | 154 | if (confirmUnzip()) { |
155 | - window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken;?>"; |
|
155 | + window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken; ?>"; |
|
156 | 156 | return false; |
157 | 157 | } |
158 | 158 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | function deleteFolder (folder, status) |
175 | 175 | { |
176 | 176 | if (confirmDeleteFolder(status)) { |
177 | - window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken;?>"; |
|
177 | + window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken; ?>"; |
|
178 | 178 | return false; |
179 | 179 | } |
180 | 180 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | function deleteFile (file) |
183 | 183 | { |
184 | 184 | if (confirmDelete()) { |
185 | - window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken;?>"; |
|
185 | + window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken; ?>"; |
|
186 | 186 | return false; |
187 | 187 | } |
188 | 188 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | { |
192 | 192 | var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file); |
193 | 193 | if (newFilename !== null && newFilename !== file) { |
194 | - window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>"; |
|
194 | + window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>"; |
|
195 | 195 | } |
196 | 196 | } |
197 | 197 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | var newDirname = prompt("<?= $_lang["files_dynamic_new_folder_name"] ?>", dir); |
201 | 201 | if (newDirname !== null && newDirname !== dir) { |
202 | - window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken;?>"; |
|
202 | + window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken; ?>"; |
|
203 | 203 | } |
204 | 204 | } |
205 | 205 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file); |
209 | 209 | if (newFilename !== null && newFilename !== file) { |
210 | - window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>"; |
|
210 | + window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>"; |
|
211 | 211 | } |
212 | 212 | } |
213 | 213 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | <?php endif ?> |
227 | 227 | <?php |
228 | 228 | if (isset($_GET['mode']) && $_GET['mode'] !== 'drill') { |
229 | - $href = 'a=31&path=' . urlencode($_REQUEST['path']); |
|
229 | + $href = 'a=31&path='.urlencode($_REQUEST['path']); |
|
230 | 230 | } else { |
231 | 231 | $href = 'a=2'; |
232 | 232 | } |
@@ -236,12 +236,12 @@ discard block |
||
236 | 236 | $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFolderName(this);"><i class="[+image+]"></i><span>[+subject+]</span></a>'; |
237 | 237 | $ph['image'] = $_style['files_folder-open']; |
238 | 238 | $ph['subject'] = $_lang['add_folder']; |
239 | - $ph['href'] = 'index.php?a=31&mode=newfolder&path=' . urlencode($startpath) . '&name='; |
|
239 | + $ph['href'] = 'index.php?a=31&mode=newfolder&path='.urlencode($startpath).'&name='; |
|
240 | 240 | $_ = parsePlaceholder($tpl, $ph); |
241 | 241 | |
242 | - $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>' . $_lang['files.dynamic.php1'] . '</span></a>'; |
|
242 | + $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>'.$_lang['files.dynamic.php1'].'</span></a>'; |
|
243 | 243 | $ph['image'] = $_style['files_page_html']; |
244 | - $ph['href'] = 'index.php?a=31&mode=newfile&path=' . urlencode($startpath) . '&name='; |
|
244 | + $ph['href'] = 'index.php?a=31&mode=newfile&path='.urlencode($startpath).'&name='; |
|
245 | 245 | $_ .= parsePlaceholder($tpl, $ph); |
246 | 246 | echo $_; |
247 | 247 | } |
@@ -271,12 +271,12 @@ discard block |
||
271 | 271 | $ph = array(); |
272 | 272 | $ph['style_path'] = $theme_image_path; |
273 | 273 | // To Top Level with folder icon to the left |
274 | - if ($startpath == $filemanager_path || $startpath . '/' == $filemanager_path) { |
|
275 | - $ph['image'] = '' . $_style['files_top'] . ''; |
|
274 | + if ($startpath == $filemanager_path || $startpath.'/' == $filemanager_path) { |
|
275 | + $ph['image'] = ''.$_style['files_top'].''; |
|
276 | 276 | $ph['subject'] = '<span>Top</span>'; |
277 | 277 | } else { |
278 | - $ph['image'] = '' . $_style['files_top'] . ''; |
|
279 | - $ph['subject'] = '<a href="index.php?a=31&mode=drill&path=' . $filemanager_path . '">Top</a>/'; |
|
278 | + $ph['image'] = ''.$_style['files_top'].''; |
|
279 | + $ph['subject'] = '<a href="index.php?a=31&mode=drill&path='.$filemanager_path.'">Top</a>/'; |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | echo parsePlaceholder($tpl, $ph); |
@@ -293,12 +293,12 @@ discard block |
||
293 | 293 | if (empty($v)) { |
294 | 294 | continue; |
295 | 295 | } |
296 | - $path .= rtrim($v, '/') . '/'; |
|
296 | + $path .= rtrim($v, '/').'/'; |
|
297 | 297 | if (1 < $count) { |
298 | - $href = 'index.php?a=31&mode=drill&path=' . urlencode($filemanager_path . $path); |
|
299 | - $pieces[$i] = '<a href="' . $href . '">' . trim($v, '/') . '</a>'; |
|
298 | + $href = 'index.php?a=31&mode=drill&path='.urlencode($filemanager_path.$path); |
|
299 | + $pieces[$i] = '<a href="'.$href.'">'.trim($v, '/').'</a>'; |
|
300 | 300 | } else { |
301 | - $pieces[$i] = '<span>' . trim($v, '/') . '</span>'; |
|
301 | + $pieces[$i] = '<span>'.trim($v, '/').'</span>'; |
|
302 | 302 | } |
303 | 303 | $count--; |
304 | 304 | } |
@@ -311,16 +311,16 @@ discard block |
||
311 | 311 | </div> |
312 | 312 | <?php |
313 | 313 | // check to see user isn't trying to move below the document_root |
314 | - if (substr(strtolower(str_replace('//', '/', $startpath . "/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path . '/'))) { |
|
314 | + if (substr(strtolower(str_replace('//', '/', $startpath."/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path.'/'))) { |
|
315 | 315 | $modx->webAlertAndQuit($_lang["files_access_denied"]); |
316 | 316 | } |
317 | 317 | |
318 | 318 | // Unzip .zip files - by Raymond |
319 | 319 | if ($enablefileunzip && $_REQUEST['mode'] == 'unzip' && is_writable($startpath)) { |
320 | - if (!$err = unzip(realpath("{$startpath}/" . $_REQUEST['file']), realpath($startpath))) { |
|
321 | - echo '<span class="warning"><b>' . $_lang['file_unzip_fail'] . ($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '') . '</b></span><br /><br />'; |
|
320 | + if (!$err = unzip(realpath("{$startpath}/".$_REQUEST['file']), realpath($startpath))) { |
|
321 | + echo '<span class="warning"><b>'.$_lang['file_unzip_fail'].($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '').'</b></span><br /><br />'; |
|
322 | 322 | } else { |
323 | - echo '<span class="success"><b>' . $_lang['file_unzip'] . '</b></span><br /><br />'; |
|
323 | + echo '<span class="success"><b>'.$_lang['file_unzip'].'</b></span><br /><br />'; |
|
324 | 324 | } |
325 | 325 | } |
326 | 326 | // End Unzip - Raymond |
@@ -332,9 +332,9 @@ discard block |
||
332 | 332 | if ($_REQUEST['mode'] == 'deletefolder') { |
333 | 333 | $folder = $_REQUEST['folderpath']; |
334 | 334 | if (!$token_check || !@rrmdir($folder)) { |
335 | - echo '<span class="warning"><b>' . $_lang['file_folder_not_deleted'] . '</b></span><br /><br />'; |
|
335 | + echo '<span class="warning"><b>'.$_lang['file_folder_not_deleted'].'</b></span><br /><br />'; |
|
336 | 336 | } else { |
337 | - echo '<span class="success"><b>' . $_lang['file_folder_deleted'] . '</b></span><br /><br />'; |
|
337 | + echo '<span class="success"><b>'.$_lang['file_folder_deleted'].'</b></span><br /><br />'; |
|
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
@@ -345,10 +345,10 @@ discard block |
||
345 | 345 | if (!mkdirs("{$startpath}/{$foldername}", 0777)) { |
346 | 346 | echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />'; |
347 | 347 | } else { |
348 | - if (!@chmod($startpath . '/' . $foldername, $newfolderaccessmode)) { |
|
349 | - echo '<span class="warning"><b>' . $_lang['file_folder_chmod_error'] . '</b></span><br /><br />'; |
|
348 | + if (!@chmod($startpath.'/'.$foldername, $newfolderaccessmode)) { |
|
349 | + echo '<span class="warning"><b>'.$_lang['file_folder_chmod_error'].'</b></span><br /><br />'; |
|
350 | 350 | } else { |
351 | - echo '<span class="success"><b>' . $_lang['file_folder_created'] . '</b></span><br /><br />'; |
|
351 | + echo '<span class="success"><b>'.$_lang['file_folder_created'].'</b></span><br /><br />'; |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | umask($old_umask); |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $filename = $modx->db->escape($filename); |
361 | 361 | |
362 | 362 | if (!checkExtension($filename)) { |
363 | - echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />'; |
|
363 | + echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />'; |
|
364 | 364 | } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $filename) !== 0) { |
365 | 365 | echo $_lang['files.dynamic.php3']; |
366 | 366 | } else { |
@@ -382,11 +382,11 @@ discard block |
||
382 | 382 | $newFilename = $modx->db->escape($newFilename); |
383 | 383 | |
384 | 384 | if (!checkExtension($newFilename)) { |
385 | - echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />'; |
|
385 | + echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />'; |
|
386 | 386 | } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) { |
387 | 387 | echo $_lang['files.dynamic.php3']; |
388 | 388 | } else { |
389 | - if (!copy($filename, MODX_BASE_PATH . $newFilename)) { |
|
389 | + if (!copy($filename, MODX_BASE_PATH.$newFilename)) { |
|
390 | 390 | echo $_lang['files.dynamic.php5']; |
391 | 391 | } |
392 | 392 | umask($old_umask); |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | // Rename folder here |
396 | 396 | if ($_REQUEST['mode'] == 'renameFolder') { |
397 | 397 | $old_umask = umask(0); |
398 | - $dirname = $_REQUEST['path'] . '/' . $_REQUEST['dirname']; |
|
398 | + $dirname = $_REQUEST['path'].'/'.$_REQUEST['dirname']; |
|
399 | 399 | $dirname = $modx->db->escape($dirname); |
400 | 400 | $newDirname = str_replace(array( |
401 | 401 | '..\\', |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | |
408 | 408 | if (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newDirname) !== 0) { |
409 | 409 | echo $_lang['files.dynamic.php3']; |
410 | - } elseif (!rename($dirname, $_REQUEST['path'] . '/' . $newDirname)) { |
|
410 | + } elseif (!rename($dirname, $_REQUEST['path'].'/'.$newDirname)) { |
|
411 | 411 | echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />'; |
412 | 412 | } |
413 | 413 | umask($old_umask); |
@@ -427,11 +427,11 @@ discard block |
||
427 | 427 | $newFilename = $modx->db->escape($newFilename); |
428 | 428 | |
429 | 429 | if (!checkExtension($newFilename)) { |
430 | - echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />'; |
|
430 | + echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />'; |
|
431 | 431 | } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) { |
432 | 432 | echo $_lang['files.dynamic.php3']; |
433 | 433 | } else { |
434 | - if (!rename($filename, $path . '/' . $newFilename)) { |
|
434 | + if (!rename($filename, $path.'/'.$newFilename)) { |
|
435 | 435 | echo $_lang['files.dynamic.php5']; |
436 | 436 | } |
437 | 437 | umask($old_umask); |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | ls($startpath); |
465 | 465 | echo "\n\n\n"; |
466 | 466 | if ($folders == 0 && $files == 0) { |
467 | - echo '<tr><td colspan="4"><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> ' . $_lang['files_directory_is_empty'] . ' </span></td></tr>'; |
|
467 | + echo '<tr><td colspan="4"><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> '.$_lang['files_directory_is_empty'].' </span></td></tr>'; |
|
468 | 468 | } |
469 | 469 | ?> |
470 | 470 | </table> |
@@ -473,10 +473,10 @@ discard block |
||
473 | 473 | <div class="container"> |
474 | 474 | <p> |
475 | 475 | <?php |
476 | - echo $_lang['files_directories'] . ': <b>' . $folders . '</b> '; |
|
477 | - echo $_lang['files_files'] . ': <b>' . $files . '</b> '; |
|
478 | - echo $_lang['files_data'] . ': <b><span dir="ltr">' . $modx->nicesize($filesizes) . '</span></b> '; |
|
479 | - echo $_lang['files_dirwritable'] . ' <b>' . (is_writable($startpath) == 1 ? $_lang['yes'] . '.' : $_lang['no']) . '.</b>' |
|
476 | + echo $_lang['files_directories'].': <b>'.$folders.'</b> '; |
|
477 | + echo $_lang['files_files'].': <b>'.$files.'</b> '; |
|
478 | + echo $_lang['files_data'].': <b><span dir="ltr">'.$modx->nicesize($filesizes).'</span></b> '; |
|
479 | + echo $_lang['files_dirwritable'].' <b>'.(is_writable($startpath) == 1 ? $_lang['yes'].'.' : $_lang['no']).'.</b>' |
|
480 | 480 | ?> |
481 | 481 | </p> |
482 | 482 | |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | </form> |
501 | 501 | <?php |
502 | 502 | } else { |
503 | - echo "<p>" . $_lang['files_upload_inhibited_msg'] . "</p>"; |
|
503 | + echo "<p>".$_lang['files_upload_inhibited_msg']."</p>"; |
|
504 | 504 | } |
505 | 505 | ?> |
506 | 506 | <div id="imageviewer"></div> |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | if ($file == $selFile) { |
584 | 584 | $icon = isset($icons[$mode]) ? $icons[$mode] : $icons['default']; |
585 | 585 | } |
586 | - return '<i class="' . $icon . ' FilesPage"></i>'; |
|
586 | + return '<i class="'.$icon.' FilesPage"></i>'; |
|
587 | 587 | } |
588 | 588 | |
589 | 589 | /** |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | ); |
602 | 602 | if ($file == $selFile) { |
603 | 603 | $class = isset($classNames[$mode]) ? $classNames[$mode] : $classNames['default']; |
604 | - return ' class="' . $class . '"'; |
|
604 | + return ' class="'.$class.'"'; |
|
605 | 605 | } |
606 | 606 | return ''; |
607 | 607 | } |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | global $excludes, $protected_path, $editablefiles, $inlineviewablefiles, $viewablefiles, $enablefileunzip, $enablefiledownload, $uploadablefiles, $folders, $files, $filesizes, $len, $dirs_array, $files_array, $webstart_path, $modx; |
616 | 616 | $dircounter = 0; |
617 | 617 | $filecounter = 0; |
618 | - $curpath = str_replace('//', '/', $curpath . '/'); |
|
618 | + $curpath = str_replace('//', '/', $curpath.'/'); |
|
619 | 619 | |
620 | 620 | if (!is_dir($curpath)) { |
621 | 621 | echo 'Invalid path "', $curpath, '"<br />'; |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | |
626 | 626 | // first, get info |
627 | 627 | foreach ($dir as $file) { |
628 | - $newpath = $curpath . $file; |
|
628 | + $newpath = $curpath.$file; |
|
629 | 629 | if ($file === '..' || $file === '.') { |
630 | 630 | continue; |
631 | 631 | } |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | if ($file === '..' || $file === '.') { |
636 | 636 | continue; |
637 | 637 | } elseif (!in_array($file, $excludes) && !in_array($newpath, $protected_path)) { |
638 | - $dirs_array[$dircounter]['text'] = '<i class="' . $_style['files_folder'] . ' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path=' . urlencode($newpath) . '"><b>' . $file . '</b></a>'; |
|
638 | + $dirs_array[$dircounter]['text'] = '<i class="'.$_style['files_folder'].' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path='.urlencode($newpath).'"><b>'.$file.'</b></a>'; |
|
639 | 639 | |
640 | 640 | $dfiles = scandir($newpath); |
641 | 641 | foreach ($dfiles as $i => $infile) { |
@@ -648,13 +648,13 @@ discard block |
||
648 | 648 | } |
649 | 649 | $file_exists = (0 < count($dfiles)) ? 'file_exists' : ''; |
650 | 650 | |
651 | - $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\'' . urlencode($file) . '\',\'' . $file_exists . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></a>' : ''; |
|
651 | + $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\''.urlencode($file).'\',\''.$file_exists.'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></a>' : ''; |
|
652 | 652 | } else { |
653 | - $dirs_array[$dircounter]['text'] = '<span><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> ' . $file . '</span>'; |
|
654 | - $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></span>' : ''; |
|
653 | + $dirs_array[$dircounter]['text'] = '<span><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> '.$file.'</span>'; |
|
654 | + $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></span>' : ''; |
|
655 | 655 | } |
656 | 656 | |
657 | - $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" title="' . $_lang['rename'] . '"></i></a> ' : ''; |
|
657 | + $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" title="'.$_lang['rename'].'"></i></a> ' : ''; |
|
658 | 658 | |
659 | 659 | // increment the counter |
660 | 660 | $dircounter++; |
@@ -662,14 +662,14 @@ discard block |
||
662 | 662 | $type = getExtension($newpath); |
663 | 663 | $files_array[$filecounter]['file'] = $newpath; |
664 | 664 | $files_array[$filecounter]['stats'] = lstat($newpath); |
665 | - $files_array[$filecounter]['text'] = determineIcon($newpath, $_REQUEST['path'], $_REQUEST['mode']) . ' ' . $file; |
|
666 | - $files_array[$filecounter]['view'] = (in_array($type, $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\'' . $webstart_path . substr($newpath, $len, strlen($newpath)) . '\');"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : (($enablefiledownload && in_array($type, $uploadablefiles)) ? '<a href="' . $webstart_path . implode('/', array_map('rawurlencode', explode('/', substr($newpath, $len, strlen($newpath))))) . '" style="cursor:pointer;"><i class="' . $_style['files_download'] . '" title="' . $_lang['file_download_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></span>'); |
|
667 | - $files_array[$filecounter]['view'] = (in_array($type, $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path=' . urlencode($newpath) . '"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : $files_array[$filecounter]['view']; |
|
668 | - $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_unzip'] . '" title="' . $_lang['file_download_unzip'] . '"></i></a>' : ''; |
|
669 | - $files_array[$filecounter]['edit'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path=' . urlencode($newpath) . '#file_editfile"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></span>'; |
|
670 | - $files_array[$filecounter]['duplicate'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_duplicate'] . '" title="' . $_lang['duplicate'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_duplicate'] . '" align="absmiddle" title="' . $_lang['duplicate'] . '"></i></span>'; |
|
671 | - $files_array[$filecounter]['rename'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></span>'; |
|
672 | - $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></span>'; |
|
665 | + $files_array[$filecounter]['text'] = determineIcon($newpath, $_REQUEST['path'], $_REQUEST['mode']).' '.$file; |
|
666 | + $files_array[$filecounter]['view'] = (in_array($type, $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\''.$webstart_path.substr($newpath, $len, strlen($newpath)).'\');"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : (($enablefiledownload && in_array($type, $uploadablefiles)) ? '<a href="'.$webstart_path.implode('/', array_map('rawurlencode', explode('/', substr($newpath, $len, strlen($newpath))))).'" style="cursor:pointer;"><i class="'.$_style['files_download'].'" title="'.$_lang['file_download_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></span>'); |
|
667 | + $files_array[$filecounter]['view'] = (in_array($type, $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path='.urlencode($newpath).'"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : $files_array[$filecounter]['view']; |
|
668 | + $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\''.urlencode($file).'\');"><i class="'.$_style['files_unzip'].'" title="'.$_lang['file_download_unzip'].'"></i></a>' : ''; |
|
669 | + $files_array[$filecounter]['edit'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path='.urlencode($newpath).'#file_editfile"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></span>'; |
|
670 | + $files_array[$filecounter]['duplicate'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\''.urlencode($file).'\');"><i class="'.$_style['files_duplicate'].'" title="'.$_lang['duplicate'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_duplicate'].'" align="absmiddle" title="'.$_lang['duplicate'].'"></i></span>'; |
|
671 | + $files_array[$filecounter]['rename'] = (in_array($type, $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></span>'; |
|
672 | + $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\''.urlencode($file).'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></span>'; |
|
673 | 673 | |
674 | 674 | // increment the counter |
675 | 675 | $filecounter++; |
@@ -682,9 +682,9 @@ discard block |
||
682 | 682 | for ($i = 0; $i < $folders; $i++) { |
683 | 683 | $filesizes += $dirs_array[$i]['stats']['7']; |
684 | 684 | echo '<tr>'; |
685 | - echo '<td>' . $dirs_array[$i]['text'] . '</td>'; |
|
686 | - echo '<td class="text-nowrap">' . $modx->toDateFormat($dirs_array[$i]['stats']['9']) . '</td>'; |
|
687 | - echo '<td class="text-right">' . $modx->nicesize($dirs_array[$i]['stats']['7']) . '</td>'; |
|
685 | + echo '<td>'.$dirs_array[$i]['text'].'</td>'; |
|
686 | + echo '<td class="text-nowrap">'.$modx->toDateFormat($dirs_array[$i]['stats']['9']).'</td>'; |
|
687 | + echo '<td class="text-right">'.$modx->nicesize($dirs_array[$i]['stats']['7']).'</td>'; |
|
688 | 688 | echo '<td class="actions text-right">'; |
689 | 689 | echo $dirs_array[$i]['rename']; |
690 | 690 | echo $dirs_array[$i]['delete']; |
@@ -697,10 +697,10 @@ discard block |
||
697 | 697 | sort($files_array); // sorting the array alphabetically (Thanks pxl8r!) |
698 | 698 | for ($i = 0; $i < $files; $i++) { |
699 | 699 | $filesizes += $files_array[$i]['stats']['7']; |
700 | - echo '<tr ' . markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']) . '>'; |
|
701 | - echo '<td>' . $files_array[$i]['text'] . '</td>'; |
|
702 | - echo '<td class="text-nowrap">' . $modx->toDateFormat($files_array[$i]['stats']['9']) . '</td>'; |
|
703 | - echo '<td class="text-right">' . $modx->nicesize($files_array[$i]['stats']['7']) . '</td>'; |
|
700 | + echo '<tr '.markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']).'>'; |
|
701 | + echo '<td>'.$files_array[$i]['text'].'</td>'; |
|
702 | + echo '<td class="text-nowrap">'.$modx->toDateFormat($files_array[$i]['stats']['9']).'</td>'; |
|
703 | + echo '<td class="text-right">'.$modx->nicesize($files_array[$i]['stats']['7']).'</td>'; |
|
704 | 704 | echo '<td class="actions text-right">'; |
705 | 705 | echo $files_array[$i]['unzip']; |
706 | 706 | echo $files_array[$i]['view']; |
@@ -837,17 +837,17 @@ discard block |
||
837 | 837 | $zip = zip_open($file); |
838 | 838 | if ($zip) { |
839 | 839 | $old_umask = umask(0); |
840 | - $path = rtrim($path, '/') . '/'; |
|
840 | + $path = rtrim($path, '/').'/'; |
|
841 | 841 | while ($zip_entry = zip_read($zip)) { |
842 | 842 | if (zip_entry_filesize($zip_entry) > 0) { |
843 | 843 | // str_replace must be used under windows to convert "/" into "\" |
844 | 844 | $zip_entry_name = zip_entry_name($zip_entry); |
845 | - $complete_path = $path . str_replace('\\', '/', dirname($zip_entry_name)); |
|
846 | - $complete_name = $path . str_replace('\\', '/', $zip_entry_name); |
|
845 | + $complete_path = $path.str_replace('\\', '/', dirname($zip_entry_name)); |
|
846 | + $complete_name = $path.str_replace('\\', '/', $zip_entry_name); |
|
847 | 847 | if (!file_exists($complete_path)) { |
848 | 848 | $tmp = ''; |
849 | 849 | foreach (explode('/', $complete_path) as $k) { |
850 | - $tmp .= $k . '/'; |
|
850 | + $tmp .= $k.'/'; |
|
851 | 851 | if (!is_dir($tmp)) { |
852 | 852 | mkdir($tmp, 0777); |
853 | 853 | } |
@@ -872,7 +872,7 @@ discard block |
||
872 | 872 | */ |
873 | 873 | function rrmdir($dir) |
874 | 874 | { |
875 | - foreach (glob($dir . '/*') as $file) { |
|
875 | + foreach (glob($dir.'/*') as $file) { |
|
876 | 876 | if (is_dir($file)) { |
877 | 877 | rrmdir($file); |
878 | 878 | } else { |
@@ -894,7 +894,7 @@ discard block |
||
894 | 894 | if (empty($_FILES['userfile']['tmp_name'][$i])) { |
895 | 895 | continue; |
896 | 896 | } |
897 | - $userfile= array(); |
|
897 | + $userfile = array(); |
|
898 | 898 | |
899 | 899 | $userfile['tmp_name'] = $_FILES['userfile']['tmp_name'][$i]; |
900 | 900 | $userfile['error'] = $_FILES['userfile']['error'][$i]; |
@@ -911,12 +911,12 @@ discard block |
||
911 | 911 | $userfile['type'] = $_FILES['userfile']['type'][$i]; |
912 | 912 | |
913 | 913 | // this seems to be an upload action. |
914 | - $path = $modx->config['site_url'] . substr($startpath, strlen($filemanager_path), strlen($startpath)); |
|
915 | - $path = rtrim($path, '/') . '/' . $userfile['name']; |
|
914 | + $path = $modx->config['site_url'].substr($startpath, strlen($filemanager_path), strlen($startpath)); |
|
915 | + $path = rtrim($path, '/').'/'.$userfile['name']; |
|
916 | 916 | $msg .= $path; |
917 | 917 | if ($userfile['error'] == 0) { |
918 | - $img = (strpos($userfile['type'], 'image') !== false) ? '<br /><img src="' . $path . '" height="75" />' : ''; |
|
919 | - $msg .= "<p>" . $_lang['files_file_type'] . $userfile['type'] . ", " . $modx->nicesize(filesize($userfile['tmp_name'])) . $img . '</p>'; |
|
918 | + $img = (strpos($userfile['type'], 'image') !== false) ? '<br /><img src="'.$path.'" height="75" />' : ''; |
|
919 | + $msg .= "<p>".$_lang['files_file_type'].$userfile['type'].", ".$modx->nicesize(filesize($userfile['tmp_name'])).$img.'</p>'; |
|
920 | 920 | } |
921 | 921 | |
922 | 922 | $userfilename = $userfile['tmp_name']; |
@@ -924,15 +924,15 @@ discard block |
||
924 | 924 | if (is_uploaded_file($userfilename)) { |
925 | 925 | // file is uploaded file, process it! |
926 | 926 | if (!checkExtension($userfile['name'])) { |
927 | - $msg .= '<p><span class="warning">' . $_lang['files_filetype_notok'] . '</span></p>'; |
|
927 | + $msg .= '<p><span class="warning">'.$_lang['files_filetype_notok'].'</span></p>'; |
|
928 | 928 | } else { |
929 | - if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'] . '/' . $userfile['name'])) { |
|
929 | + if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'].'/'.$userfile['name'])) { |
|
930 | 930 | // Ryan: Repair broken permissions issue with file manager |
931 | 931 | if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { |
932 | - @chmod($_POST['path'] . "/" . $userfile['name'], $new_file_permissions); |
|
932 | + @chmod($_POST['path']."/".$userfile['name'], $new_file_permissions); |
|
933 | 933 | } |
934 | 934 | // Ryan: End |
935 | - $msg .= '<p><span class="success">' . $_lang['files_upload_ok'] . '</span></p><hr/>'; |
|
935 | + $msg .= '<p><span class="success">'.$_lang['files_upload_ok'].'</span></p><hr/>'; |
|
936 | 936 | |
937 | 937 | // invoke OnFileManagerUpload event |
938 | 938 | $modx->invokeEvent('OnFileManagerUpload', array( |
@@ -940,13 +940,13 @@ discard block |
||
940 | 940 | 'filename' => $userfile['name'] |
941 | 941 | )); |
942 | 942 | // Log the change |
943 | - logFileChange('upload', $_POST['path'] . '/' . $userfile['name']); |
|
943 | + logFileChange('upload', $_POST['path'].'/'.$userfile['name']); |
|
944 | 944 | } else { |
945 | - $msg .= '<p><span class="warning">' . $_lang['files_upload_copyfailed'] . '</span> ' . $_lang["files_upload_permissions_error"] . '</p>'; |
|
945 | + $msg .= '<p><span class="warning">'.$_lang['files_upload_copyfailed'].'</span> '.$_lang["files_upload_permissions_error"].'</p>'; |
|
946 | 946 | } |
947 | 947 | } |
948 | 948 | } else { |
949 | - $msg .= '<br /><span class="warning"><b>' . $_lang['files_upload_error'] . ':</b>'; |
|
949 | + $msg .= '<br /><span class="warning"><b>'.$_lang['files_upload_error'].':</b>'; |
|
950 | 950 | switch ($userfile['error']) { |
951 | 951 | case 0: //no error; possible file attack! |
952 | 952 | $msg .= $_lang['files_upload_error0']; |
@@ -970,7 +970,7 @@ discard block |
||
970 | 970 | $msg .= '</span><br />'; |
971 | 971 | } |
972 | 972 | } |
973 | - return $msg . '<br/>'; |
|
973 | + return $msg.'<br/>'; |
|
974 | 974 | } |
975 | 975 | |
976 | 976 | /** |
@@ -986,9 +986,9 @@ discard block |
||
986 | 986 | |
987 | 987 | // Write $content to our opened file. |
988 | 988 | if (file_put_contents($filename, $content) === false) { |
989 | - $msg .= '<span class="warning"><b>' . $_lang['file_not_saved'] . '</b></span><br /><br />'; |
|
989 | + $msg .= '<span class="warning"><b>'.$_lang['file_not_saved'].'</b></span><br /><br />'; |
|
990 | 990 | } else { |
991 | - $msg .= '<span class="success"><b>' . $_lang['file_saved'] . '</b></span><br /><br />'; |
|
991 | + $msg .= '<span class="success"><b>'.$_lang['file_saved'].'</b></span><br /><br />'; |
|
992 | 992 | $_REQUEST['mode'] = 'edit'; |
993 | 993 | } |
994 | 994 | // Log the change |
@@ -1007,9 +1007,9 @@ discard block |
||
1007 | 1007 | |
1008 | 1008 | $file = $_REQUEST['path']; |
1009 | 1009 | if (!$token_check || !@unlink($file)) { |
1010 | - $msg .= '<span class="warning"><b>' . $_lang['file_not_deleted'] . '</b></span><br /><br />'; |
|
1010 | + $msg .= '<span class="warning"><b>'.$_lang['file_not_deleted'].'</b></span><br /><br />'; |
|
1011 | 1011 | } else { |
1012 | - $msg .= '<span class="success"><b>' . $_lang['file_deleted'] . '</b></span><br /><br />'; |
|
1012 | + $msg .= '<span class="success"><b>'.$_lang['file_deleted'].'</b></span><br /><br />'; |
|
1013 | 1013 | } |
1014 | 1014 | |
1015 | 1015 | // Log the change |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | if ($_SESSION['mgrDocgroups']) { |
26 | 26 | $docgrp = implode(",", $_SESSION['mgrDocgroups']); |
27 | 27 | } |
28 | -$access = "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0" . (!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
|
28 | +$access = "1='".$_SESSION['mgrRole']."' OR sc.privatemgr=0".(!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
|
29 | 29 | |
30 | 30 | // |
31 | 31 | if ($_SESSION['tree_show_only_folders']) { |
32 | - $parent = $id ? ($modx->db->getValue("SELECT parent FROM " . $tbl_site_content . " WHERE id=$id LIMIT 1")) : 0; |
|
33 | - $isfolder = $modx->db->getValue("SELECT isfolder FROM " . $tbl_site_content . " WHERE id=$id LIMIT 1"); |
|
32 | + $parent = $id ? ($modx->db->getValue("SELECT parent FROM ".$tbl_site_content." WHERE id=$id LIMIT 1")) : 0; |
|
33 | + $isfolder = $modx->db->getValue("SELECT isfolder FROM ".$tbl_site_content." WHERE id=$id LIMIT 1"); |
|
34 | 34 | if (!$isfolder && $parent != 0) { |
35 | 35 | $id = $_REQUEST['id'] = $parent; |
36 | 36 | } |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | $filter_sort = ''; |
86 | 86 | $filter_dir = ''; |
87 | 87 | if ($numRecords > 0) { |
88 | - $filter_sort = '<select size="1" name="sort" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id=' . $id . '&dir=' . $dir . '&sort=\'+this.options[this.selectedIndex].value">' . '<option value="createdon"' . (($sort == 'createdon') ? ' selected' : '') . '>' . $_lang['createdon'] . '</option>' . '<option value="pub_date"' . (($sort == 'pub_date') ? ' selected' : '') . '>' . $_lang["page_data_publishdate"] . '</option>' . '<option value="pagetitle"' . (($sort == 'pagetitle') ? ' selected' : '') . '>' . $_lang['pagetitle'] . '</option>' . '<option value="menuindex"' . (($sort == 'menuindex') ? ' selected' : '') . '>' . $_lang['resource_opt_menu_index'] . '</option>' . //******** resource_opt_is_published - // |
|
89 | - '<option value="published"' . (($sort == 'published') ? ' selected' : '') . '>' . $_lang['resource_opt_is_published'] . '</option>' . //********// |
|
88 | + $filter_sort = '<select size="1" name="sort" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id='.$id.'&dir='.$dir.'&sort=\'+this.options[this.selectedIndex].value">'.'<option value="createdon"'.(($sort == 'createdon') ? ' selected' : '').'>'.$_lang['createdon'].'</option>'.'<option value="pub_date"'.(($sort == 'pub_date') ? ' selected' : '').'>'.$_lang["page_data_publishdate"].'</option>'.'<option value="pagetitle"'.(($sort == 'pagetitle') ? ' selected' : '').'>'.$_lang['pagetitle'].'</option>'.'<option value="menuindex"'.(($sort == 'menuindex') ? ' selected' : '').'>'.$_lang['resource_opt_menu_index'].'</option>'.//******** resource_opt_is_published - // |
|
89 | + '<option value="published"'.(($sort == 'published') ? ' selected' : '').'>'.$_lang['resource_opt_is_published'].'</option>'.//********// |
|
90 | 90 | '</select>'; |
91 | - $filter_dir = '<select size="1" name="dir" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id=' . $id . '&sort=' . $sort . '&dir=\'+this.options[this.selectedIndex].value">' . '<option value="DESC"' . (($dir == 'DESC') ? ' selected' : '') . '>' . $_lang['sort_desc'] . '</option>' . '<option value="ASC"' . (($dir == 'ASC') ? ' selected' : '') . '>' . $_lang['sort_asc'] . '</option>' . '</select>'; |
|
91 | + $filter_dir = '<select size="1" name="dir" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id='.$id.'&sort='.$sort.'&dir=\'+this.options[this.selectedIndex].value">'.'<option value="DESC"'.(($dir == 'DESC') ? ' selected' : '').'>'.$_lang['sort_desc'].'</option>'.'<option value="ASC"'.(($dir == 'ASC') ? ' selected' : '').'>'.$_lang['sort_asc'].'</option>'.'</select>'; |
|
92 | 92 | $resource = $modx->db->makeArray($rs); |
93 | 93 | |
94 | 94 | // CSS style for table |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | ); |
133 | 133 | $modx->table->setColumnWidths($tbWidth); |
134 | 134 | |
135 | - $sd = isset($_REQUEST['dir']) ? '&dir=' . $_REQUEST['dir'] : '&dir=DESC'; |
|
136 | - $sb = isset($_REQUEST['sort']) ? '&sort=' . $_REQUEST['sort'] : '&sort=createdon'; |
|
137 | - $pg = isset($_REQUEST['page']) ? '&page=' . (int) $_REQUEST['page'] : ''; |
|
138 | - $add_path = $sd . $sb . $pg; |
|
135 | + $sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC'; |
|
136 | + $sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon'; |
|
137 | + $pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : ''; |
|
138 | + $add_path = $sd.$sb.$pg; |
|
139 | 139 | |
140 | 140 | $icons = array( |
141 | 141 | 'text/html' => $_style['tree_page_html'], |
@@ -187,31 +187,31 @@ discard block |
||
187 | 187 | //$class .= ($children['hidemenu'] ? ' text-muted' : ' text-primary'); |
188 | 188 | //$class .= ($children['isfolder'] ? ' font-weight-bold' : ''); |
189 | 189 | if ($modx->hasPermission('edit_document')) { |
190 | - $title = '<span class="doc-item' . $private . '">' . $icon . '<a href="index.php?a=27&id=' . $children['id'] . $add_path . '">' . '<span class="' . $class . '">' . $children['pagetitle'] . '</span></a></span>'; |
|
190 | + $title = '<span class="doc-item'.$private.'">'.$icon.'<a href="index.php?a=27&id='.$children['id'].$add_path.'">'.'<span class="'.$class.'">'.$children['pagetitle'].'</span></a></span>'; |
|
191 | 191 | } else { |
192 | - $title = '<span class="doc-item' . $private . '">' . $icon . '<span class="' . $class . '">' . $children['pagetitle'] . '</span></span>'; |
|
192 | + $title = '<span class="doc-item'.$private.'">'.$icon.'<span class="'.$class.'">'.$children['pagetitle'].'</span></span>'; |
|
193 | 193 | } |
194 | 194 | |
195 | - $icon_pub_unpub = (!$children['published']) ? '<a href="index.php?a=61&id=' . $children['id'] . $add_path . '" title="' . $_lang["publish_resource"] . '"><i class="' . $_style["icons_publish_document"] . '"></i></a>' : '<a href="index.php?a=62&id=' . $children['id'] . $add_path . '" title="' . $_lang["unpublish_resource"] . '"><i class="' . $_style["icons_unpublish_resource"] . '" ></i></a>'; |
|
195 | + $icon_pub_unpub = (!$children['published']) ? '<a href="index.php?a=61&id='.$children['id'].$add_path.'" title="'.$_lang["publish_resource"].'"><i class="'.$_style["icons_publish_document"].'"></i></a>' : '<a href="index.php?a=62&id='.$children['id'].$add_path.'" title="'.$_lang["unpublish_resource"].'"><i class="'.$_style["icons_unpublish_resource"].'" ></i></a>'; |
|
196 | 196 | |
197 | - $icon_del_undel = (!$children['deleted']) ? '<a onclick="return confirm(\'' . $_lang["confirm_delete_resource"] . '\')" href="index.php?a=6&id=' . $children['id'] . $add_path . '" title="' . $_lang['delete_resource'] . '"><i class="' . $_style["icons_delete_resource"] . '"></i></a>' : '<a onclick="return confirm(\'' . $_lang["confirm_undelete"] . '\')" href="index.php?a=63&id=' . $children['id'] . $add_path . '" title="' . $_lang['undelete_resource'] . '"><i class="' . $_style["icons_undelete_resource"] . '"></i></a>'; |
|
197 | + $icon_del_undel = (!$children['deleted']) ? '<a onclick="return confirm(\''.$_lang["confirm_delete_resource"].'\')" href="index.php?a=6&id='.$children['id'].$add_path.'" title="'.$_lang['delete_resource'].'"><i class="'.$_style["icons_delete_resource"].'"></i></a>' : '<a onclick="return confirm(\''.$_lang["confirm_undelete"].'\')" href="index.php?a=63&id='.$children['id'].$add_path.'" title="'.$_lang['undelete_resource'].'"><i class="'.$_style["icons_undelete_resource"].'"></i></a>'; |
|
198 | 198 | |
199 | 199 | $listDocs[] = array( |
200 | - 'docid' => '<div class="text-right">' . $children['id'] . '</div>', |
|
200 | + 'docid' => '<div class="text-right">'.$children['id'].'</div>', |
|
201 | 201 | 'title' => $title, |
202 | - 'createdon' => '<div class="text-right">' . ($modx->toDateFormat($children['createdon'] + $server_offset_time, 'dateOnly')) . '</div>', |
|
203 | - 'pub_date' => '<div class="text-right">' . ($children['pub_date'] ? ($modx->toDateFormat($children['pub_date'] + $server_offset_time, 'dateOnly')) : '') . '</div>', |
|
204 | - 'status' => '<div class="text-nowrap">' . ($children['published'] == 0 ? '<span class="unpublishedDoc">' . $_lang['page_data_unpublished'] . '</span>' : '<span class="publishedDoc">' . $_lang['page_data_published'] . '</span>') . '</div>', |
|
205 | - 'edit' => '<div class="actions text-center text-nowrap">' . ($modx->hasPermission('edit_document') ? '<a href="index.php?a=27&id=' . $children['id'] . $add_path . '" title="' . $_lang['edit'] . '"><i class="' . $_style["icons_edit_resource"] . '"></i></a><a href="index.php?a=51&id=' . $children['id'] . $add_path . '" title="' . $_lang['move'] . '"><i |
|
206 | - class="' . $_style["icons_move_document"] . '"></i></a>' . $icon_pub_unpub : '') . ($modx->hasPermission('delete_document') ? $icon_del_undel : '') . '</div>' |
|
202 | + 'createdon' => '<div class="text-right">'.($modx->toDateFormat($children['createdon'] + $server_offset_time, 'dateOnly')).'</div>', |
|
203 | + 'pub_date' => '<div class="text-right">'.($children['pub_date'] ? ($modx->toDateFormat($children['pub_date'] + $server_offset_time, 'dateOnly')) : '').'</div>', |
|
204 | + 'status' => '<div class="text-nowrap">'.($children['published'] == 0 ? '<span class="unpublishedDoc">'.$_lang['page_data_unpublished'].'</span>' : '<span class="publishedDoc">'.$_lang['page_data_published'].'</span>').'</div>', |
|
205 | + 'edit' => '<div class="actions text-center text-nowrap">'.($modx->hasPermission('edit_document') ? '<a href="index.php?a=27&id='.$children['id'].$add_path.'" title="'.$_lang['edit'].'"><i class="'.$_style["icons_edit_resource"].'"></i></a><a href="index.php?a=51&id='.$children['id'].$add_path.'" title="'.$_lang['move'].'"><i |
|
206 | + class="' . $_style["icons_move_document"].'"></i></a>'.$icon_pub_unpub : '').($modx->hasPermission('delete_document') ? $icon_del_undel : '').'</div>' |
|
207 | 207 | ); |
208 | 208 | } |
209 | 209 | |
210 | - $modx->table->createPagingNavigation($numRecords, 'a=3&id=' . $content['id'] . '&dir=' . $dir . '&sort=' . $sort); |
|
211 | - $children_output = $modx->table->create($listDocs, $listTableHeader, 'index.php?a=3&id=' . $content['id']); |
|
210 | + $modx->table->createPagingNavigation($numRecords, 'a=3&id='.$content['id'].'&dir='.$dir.'&sort='.$sort); |
|
211 | + $children_output = $modx->table->create($listDocs, $listTableHeader, 'index.php?a=3&id='.$content['id']); |
|
212 | 212 | } else { |
213 | 213 | // No Child documents |
214 | - $children_output = '<div class="container"><p>' . $_lang['resources_in_container_no'] . '</p></div>'; |
|
214 | + $children_output = '<div class="container"><p>'.$_lang['resources_in_container_no'].'</p></div>'; |
|
215 | 215 | } |
216 | 216 | ?> |
217 | 217 | <script type="text/javascript"> |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | }, |
238 | 238 | cancel: function() { |
239 | 239 | documentDirty = false; |
240 | - document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id=' . $id . $add_path) ?>'; |
|
240 | + document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id='.$id.$add_path) ?>'; |
|
241 | 241 | }, |
242 | 242 | move: function() { |
243 | 243 | document.location.href = "index.php?id=<?= $_REQUEST['id'] ?>&a=51"; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } |
249 | 249 | }, |
250 | 250 | view: function() { |
251 | - window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'] . 'index.php?id=' . $id ?>', 'previeWin'); |
|
251 | + window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'].'index.php?id='.$id ?>', 'previeWin'); |
|
252 | 252 | } |
253 | 253 | }; |
254 | 254 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | <script type="text/javascript" src="media/script/tablesort.js"></script> |
257 | 257 | |
258 | 258 | <h1> |
259 | - <i class="fa fa-info"></i><?= iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']) . (iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '') . ' <small>(' . $_REQUEST['id'] . ')</small>' ?> |
|
259 | + <i class="fa fa-info"></i><?= iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']).(iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '').' <small>('.$_REQUEST['id'].')</small>' ?> |
|
260 | 260 | </h1> |
261 | 261 | |
262 | 262 | <?= $_style['actionbuttons']['static']['document'] ?> |
@@ -283,16 +283,16 @@ discard block |
||
283 | 283 | <tr> |
284 | 284 | <td width="200" valign="top"><?= $_lang['long_title'] ?>:</td> |
285 | 285 | <td> |
286 | - <small><?= $content['longtitle'] != '' ? $content['longtitle'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></small> |
|
286 | + <small><?= $content['longtitle'] != '' ? $content['longtitle'] : "(<i>".$_lang['not_set']."</i>)" ?></small> |
|
287 | 287 | </td> |
288 | 288 | </tr> |
289 | 289 | <tr> |
290 | 290 | <td valign="top"><?= $_lang['resource_description'] ?>:</td> |
291 | - <td><?= $content['description'] != '' ? $content['description'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
291 | + <td><?= $content['description'] != '' ? $content['description'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
292 | 292 | </tr> |
293 | 293 | <tr> |
294 | 294 | <td valign="top"><?= $_lang['resource_summary'] ?>:</td> |
295 | - <td><?= $content['introtext'] != '' ? $content['introtext'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
295 | + <td><?= $content['introtext'] != '' ? $content['introtext'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
296 | 296 | </tr> |
297 | 297 | <tr> |
298 | 298 | <td valign="top"><?= $_lang['type'] ?>:</td> |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | </tr> |
301 | 301 | <tr> |
302 | 302 | <td valign="top"><?= $_lang['resource_alias'] ?>:</td> |
303 | - <td><?= $content['alias'] != '' ? $content['alias'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
303 | + <td><?= $content['alias'] != '' ? $content['alias'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
304 | 304 | </tr> |
305 | 305 | <tr> |
306 | 306 | <td colspan="2"> </td> |
@@ -330,15 +330,15 @@ discard block |
||
330 | 330 | </tr> |
331 | 331 | <tr> |
332 | 332 | <td><?= $_lang['page_data_status'] ?>:</td> |
333 | - <td><?= $content['published'] == 0 ? '<span class="unpublishedDoc">' . $_lang['page_data_unpublished'] . '</span>' : '<span class="publisheddoc">' . $_lang['page_data_published'] . '</span>' ?></td> |
|
333 | + <td><?= $content['published'] == 0 ? '<span class="unpublishedDoc">'.$_lang['page_data_unpublished'].'</span>' : '<span class="publisheddoc">'.$_lang['page_data_published'].'</span>' ?></td> |
|
334 | 334 | </tr> |
335 | 335 | <tr> |
336 | 336 | <td><?= $_lang['page_data_publishdate'] ?>:</td> |
337 | - <td><?= $content['pub_date'] == 0 ? "(<i>" . $_lang['not_set'] . "</i>)" : $modx->toDateFormat($content['pub_date']) ?></td> |
|
337 | + <td><?= $content['pub_date'] == 0 ? "(<i>".$_lang['not_set']."</i>)" : $modx->toDateFormat($content['pub_date']) ?></td> |
|
338 | 338 | </tr> |
339 | 339 | <tr> |
340 | 340 | <td><?= $_lang['page_data_unpublishdate'] ?>:</td> |
341 | - <td><?= $content['unpub_date'] == 0 ? "(<i>" . $_lang['not_set'] . "</i>)" : $modx->toDateFormat($content['unpub_date']) ?></td> |
|
341 | + <td><?= $content['unpub_date'] == 0 ? "(<i>".$_lang['not_set']."</i>)" : $modx->toDateFormat($content['unpub_date']) ?></td> |
|
342 | 342 | </tr> |
343 | 343 | <tr> |
344 | 344 | <td><?= $_lang['page_data_cacheable'] ?>:</td> |
@@ -358,11 +358,11 @@ discard block |
||
358 | 358 | </tr> |
359 | 359 | <tr> |
360 | 360 | <td><?= $_lang['page_data_web_access'] ?>:</td> |
361 | - <td><?= $content['privateweb'] == 0 ? $_lang['public'] : '<b style="color: #821517">' . $_lang['private'] . '</b> ' . $_style["icons_secured"] ?></td> |
|
361 | + <td><?= $content['privateweb'] == 0 ? $_lang['public'] : '<b style="color: #821517">'.$_lang['private'].'</b> '.$_style["icons_secured"] ?></td> |
|
362 | 362 | </tr> |
363 | 363 | <tr> |
364 | 364 | <td><?= $_lang['page_data_mgr_access'] ?>:</td> |
365 | - <td><?= $content['privatemgr'] == 0 ? $_lang['public'] : '<b style="color: #821517">' . $_lang['private'] . '</b> ' . $_style["icons_secured"] ?></td> |
|
365 | + <td><?= $content['privatemgr'] == 0 ? $_lang['public'] : '<b style="color: #821517">'.$_lang['private'].'</b> '.$_style["icons_secured"] ?></td> |
|
366 | 366 | </tr> |
367 | 367 | <tr> |
368 | 368 | <td colspan="2"> </td> |
@@ -394,11 +394,11 @@ discard block |
||
394 | 394 | <div class="form-group clearfix"> |
395 | 395 | <?php if ($numRecords > 0) : ?> |
396 | 396 | <div class="float-xs-left"> |
397 | - <span class="publishedDoc"><?= $numRecords . ' ' . $_lang['resources_in_container'] ?> (<strong><?= $content['pagetitle'] ?></strong>)</span> |
|
397 | + <span class="publishedDoc"><?= $numRecords.' '.$_lang['resources_in_container'] ?> (<strong><?= $content['pagetitle'] ?></strong>)</span> |
|
398 | 398 | </div> |
399 | 399 | <?php endif; ?> |
400 | 400 | <div class="float-xs-right"> |
401 | - <?= $filter_sort . ' ' . $filter_dir ?> |
|
401 | + <?= $filter_sort.' '.$filter_dir ?> |
|
402 | 402 | </div> |
403 | 403 | |
404 | 404 | </div> |
@@ -416,16 +416,16 @@ discard block |
||
416 | 416 | <script type="text/javascript">docSettings.addTabPage(document.getElementById("tabSource"));</script> |
417 | 417 | <?php |
418 | 418 | $buffer = ""; |
419 | - $filename = $modx->config['base_path'] . "assets/cache/docid_" . $id . ".pageCache.php"; |
|
419 | + $filename = $modx->config['base_path']."assets/cache/docid_".$id.".pageCache.php"; |
|
420 | 420 | $handle = @fopen($filename, "r"); |
421 | 421 | if (!$handle) { |
422 | - $buffer = '<div class="container container-body">' . $_lang['page_data_notcached'] . '</div>'; |
|
422 | + $buffer = '<div class="container container-body">'.$_lang['page_data_notcached'].'</div>'; |
|
423 | 423 | } else { |
424 | 424 | while (!feof($handle)) { |
425 | 425 | $buffer .= fgets($handle, 4096); |
426 | 426 | } |
427 | 427 | fclose($handle); |
428 | - $buffer = '<div class="navbar navbar-editor">' . $_lang['page_data_cached'] . '</div><div class="section-editor clearfix"><textarea rows="20" wrap="soft">' . $modx->htmlspecialchars($buffer) . "</textarea></div>\n"; |
|
428 | + $buffer = '<div class="navbar navbar-editor">'.$_lang['page_data_cached'].'</div><div class="section-editor clearfix"><textarea rows="20" wrap="soft">'.$modx->htmlspecialchars($buffer)."</textarea></div>\n"; |
|
429 | 429 | } |
430 | 430 | echo $buffer; ?> |
431 | 431 | </div><!-- end tab-page --> |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | |
437 | 437 | <?php |
438 | 438 | if (isset($_GET['tab']) && is_numeric($_GET['tab'])) { |
439 | - echo '<script type="text/javascript"> docSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
439 | + echo '<script type="text/javascript"> docSettings.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
440 | 440 | } |
441 | 441 | ?> |
442 | 442 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('access_permissions')) { |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | if ($modx->db->getRecordCount($rs) < 1) { |
21 | 21 | $docgroupselector = '[no groups to add]'; |
22 | 22 | } else { |
23 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
23 | + $docgroupselector = '<select name="docgroup">'."\n"; |
|
24 | 24 | while ($row = $modx->db->getRow($rs)) { |
25 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
25 | + $docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
26 | 26 | } |
27 | 27 | $docgroupselector .= "</select>\n"; |
28 | 28 | } |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | if ($modx->db->getRecordCount($rs) < 1) { |
32 | 32 | $usrgroupselector = '[no user groups]'; |
33 | 33 | } else { |
34 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
34 | + $usrgroupselector = '<select name="usergroup">'."\n"; |
|
35 | 35 | while ($row = $modx->db->getRow($rs)) { |
36 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
36 | + $usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
37 | 37 | } |
38 | 38 | $usrgroupselector .= "</select>\n"; |
39 | 39 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | <div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div> |
70 | 70 | </div> |
71 | 71 | |
72 | -<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div> |
|
72 | +<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div> |
|
73 | 73 | |
74 | 74 | <div class="tab-pane" id="uapPane"> |
75 | 75 | <script type="text/javascript"> |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | </form> |
97 | 97 | </div> |
98 | 98 | <?php |
99 | - $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames |
|
100 | - LEFT JOIN ' . $tbl_member_groups . ' AS groups ON groups.user_group = groupnames.id |
|
101 | - LEFT JOIN ' . $tbl_manager_users . ' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
99 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names.' AS groupnames |
|
100 | + LEFT JOIN ' . $tbl_member_groups.' AS groups ON groups.user_group = groupnames.id |
|
101 | + LEFT JOIN ' . $tbl_manager_users.' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
102 | 102 | if ($modx->db->getRecordCount($rs) < 1) { |
103 | 103 | ?> |
104 | 104 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | </form> |
166 | 166 | </div> |
167 | 167 | <?php |
168 | - $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames |
|
169 | - LEFT JOIN ' . $tbl_document_groups . ' AS dg ON dg.document_group = dgnames.id |
|
170 | - LEFT JOIN ' . $tbl_site_content . ' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
168 | + $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names.' AS dgnames |
|
169 | + LEFT JOIN ' . $tbl_document_groups.' AS dg ON dg.document_group = dgnames.id |
|
170 | + LEFT JOIN ' . $tbl_site_content.' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
171 | 171 | if ($modx->db->getRecordCount($rs) < 1) { |
172 | 172 | ?> |
173 | 173 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -222,9 +222,9 @@ discard block |
||
222 | 222 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
223 | 223 | <?php |
224 | 224 | // User/Document Group Links |
225 | - $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames |
|
226 | - LEFT JOIN ' . $tbl_membergroup_access . ' AS groupacc ON groupacc.membergroup = groupnames.id |
|
227 | - LEFT JOIN ' . $tbl_documentgroup_names . ' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
225 | + $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names.' AS groupnames |
|
226 | + LEFT JOIN ' . $tbl_membergroup_access.' AS groupacc ON groupacc.membergroup = groupnames.id |
|
227 | + LEFT JOIN ' . $tbl_documentgroup_names.' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
228 | 228 | if ($modx->db->getRecordCount($rs) < 1) { |
229 | 229 | ?> |
230 | 230 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | <li><b><?= $row['name'] ?></b></li> |
256 | 256 | <?php |
257 | 257 | if (!$row['dg_id']) { |
258 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
258 | + echo '<i>'.$_lang['no_groups_found'].'</i></li>'; |
|
259 | 259 | $pid = ''; |
260 | 260 | continue; |
261 | 261 | } else { |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -15,16 +15,16 @@ discard block |
||
15 | 15 | 'native_language' => 'de', |
16 | 16 | 'name' => 'Categories Manager', |
17 | 17 | 'dirname' => $site_manager_url, |
18 | - 'url' => 'index.php?a=120&id=' . $_GET['id'], |
|
19 | - 'path' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR, |
|
20 | - 'inc_dir' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR, |
|
21 | - 'languages_dir' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR, |
|
22 | - 'views_dir' => realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR, |
|
18 | + 'url' => 'index.php?a=120&id='.$_GET['id'], |
|
19 | + 'path' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR, |
|
20 | + 'inc_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR, |
|
21 | + 'languages_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR, |
|
22 | + 'views_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR, |
|
23 | 23 | 'request_key' => 'module_categories_manager', |
24 | 24 | 'messages' => array() |
25 | 25 | ); |
26 | 26 | |
27 | -require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php'; |
|
27 | +require_once $_module_params['inc_dir'].'Module_Categories_Manager.php'; |
|
28 | 28 | $cm = new Module_Categories_Manager(); |
29 | 29 | |
30 | 30 | // assign module_params to internal params |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | // catch the request actions |
36 | -include_once $cm->get('inc_dir') . 'request_trigger.inc.php'; |
|
36 | +include_once $cm->get('inc_dir').'request_trigger.inc.php'; |
|
37 | 37 | |
38 | 38 | if (!$categories = $cm->getCategories()) { |
39 | 39 | setcookie('webfxtab_manage-categories-pane', 0); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
19 | 19 | } |
20 | 20 | |
21 | -$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | $tbl_site_plugins = $modx->getFullTableName('site_plugins'); |
24 | 24 | $tbl_site_plugin_events = $modx->getFullTableName('site_plugin_events'); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $content['properties'] = str_replace("&", "&", $content['properties']); |
47 | 47 | } else { |
48 | 48 | $_SESSION['itemname'] = $_lang["new_plugin"]; |
49 | - $content['category'] = (int)$_REQUEST['catid']; |
|
49 | + $content['category'] = (int) $_REQUEST['catid']; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | if ($modx->manager->hasFormValues()) { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | // Add lock-element JS-Script |
57 | 57 | $lockElementId = $id; |
58 | 58 | $lockElementType = 5; |
59 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
59 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @param bool $cond |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
481 | 481 | |
482 | 482 | <h1> |
483 | - <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
483 | + <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
484 | 484 | </h1> |
485 | 485 | |
486 | 486 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | <div class="form-control-name clearfix"> |
507 | 507 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
508 | 508 | <?php if ($modx->hasPermission('save_role')): ?> |
509 | - <label class="custom-control" title="<?= $_lang['lock_plugin'] . "\n" . $_lang['lock_plugin_msg'] ?>" tooltip> |
|
509 | + <label class="custom-control" title="<?= $_lang['lock_plugin']."\n".$_lang['lock_plugin_msg'] ?>" tooltip> |
|
510 | 510 | <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
511 | 511 | <i class="fa fa-lock"></i> |
512 | 512 | </label> |
@@ -530,9 +530,9 @@ discard block |
||
530 | 530 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
531 | 531 | <option> </option> |
532 | 532 | <?php |
533 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
533 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
534 | 534 | foreach (getCategories() as $n => $v) { |
535 | - echo '<option value="' . $v['id'] . '"' . ($content["category"] == $v["id"] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
535 | + echo '<option value="'.$v['id'].'"'.($content["category"] == $v["id"] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v["category"])."</option>"; |
|
536 | 536 | } |
537 | 537 | ?> |
538 | 538 | </select> |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | <?php if ($modx->hasPermission('save_role')): ?> |
549 | 549 | <div class="form-group"> |
550 | 550 | <div class="form-row"> |
551 | - <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['plugin_disabled'] . "</span>" : $_lang['plugin_disabled']) ?></label> |
|
551 | + <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['plugin_disabled']."</span>" : $_lang['plugin_disabled']) ?></label> |
|
552 | 552 | </div> |
553 | 553 | <div class="form-row"> |
554 | 554 | <label> |
@@ -595,11 +595,11 @@ discard block |
||
595 | 595 | <select name="moduleguid" class="form-control" onchange="documentDirty=true;"> |
596 | 596 | <option> </option> |
597 | 597 | <?php |
598 | - $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules") . " sm |
|
599 | - INNER JOIN " . $modx->getFullTableName("site_module_depobj") . " smd ON smd.module=sm.id AND smd.type=30 |
|
600 | - INNER JOIN " . $modx->getFullTableName("site_plugins") . " sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
598 | + $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules")." sm |
|
599 | + INNER JOIN " . $modx->getFullTableName("site_module_depobj")." smd ON smd.module=sm.id AND smd.type=30 |
|
600 | + INNER JOIN " . $modx->getFullTableName("site_plugins")." sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
601 | 601 | while ($row = $modx->db->getRow($ds)) { |
602 | - echo "<option value='" . $row['guid'] . "'" . ($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row["name"]) . "</option>"; |
|
602 | + echo "<option value='".$row['guid']."'".($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row["name"])."</option>"; |
|
603 | 603 | } |
604 | 604 | ?> |
605 | 605 | </select> |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | echoEventRows($evtnames); |
662 | 662 | } |
663 | 663 | echo '<hr class="clear">'; |
664 | - echo '<div class="form-group"><b>' . $services[$srv - 1] . '</b></div>'; |
|
664 | + echo '<div class="form-group"><b>'.$services[$srv - 1].'</b></div>'; |
|
665 | 665 | } |
666 | 666 | // display group name |
667 | 667 | if ($grp != $row['groupname']) { |
@@ -670,9 +670,9 @@ discard block |
||
670 | 670 | echoEventRows($evtnames); |
671 | 671 | } |
672 | 672 | echo '<hr class="clear">'; |
673 | - echo '<div class="form-group"><b>' . $row['groupname'] . '</b></div>'; |
|
673 | + echo '<div class="form-group"><b>'.$row['groupname'].'</b></div>'; |
|
674 | 674 | } |
675 | - $evtnames[] = '<input name="sysevents[]" id="' . $row['name'] . '" type="checkbox" ' . (in_array($row['id'], $evts) ? ' checked="checked" ' : '') . 'class="inputBox" value="' . $row['id'] . '" /> <label for="' . $row['name'] . '" ' . bold(in_array($row['id'], $evts)) . '> ' . $row['name'] . '</label>' . "\n"; |
|
675 | + $evtnames[] = '<input name="sysevents[]" id="'.$row['name'].'" type="checkbox" '.(in_array($row['id'], $evts) ? ' checked="checked" ' : '').'class="inputBox" value="'.$row['id'].'" /> <label for="'.$row['name'].'" '.bold(in_array($row['id'], $evts)).'> '.$row['name'].'</label>'."\n"; |
|
676 | 676 | if (count($evtnames) == 2) { |
677 | 677 | echoEventRows($evtnames); |
678 | 678 | } |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | |
685 | 685 | function echoEventRows(&$evtnames) |
686 | 686 | { |
687 | - echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">' . implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames) . '</div></div>'; |
|
687 | + echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">'.implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames).'</div></div>'; |
|
688 | 688 | $evtnames = array(); |
689 | 689 | } |
690 | 690 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('web_access_permissions')) { |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | if ($modx->db->getRecordCount($rs) < 1) { |
12 | 12 | $docgroupselector = "[no groups to add]"; |
13 | 13 | } else { |
14 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
14 | + $docgroupselector = '<select name="docgroup">'."\n"; |
|
15 | 15 | while ($row = $modx->db->getRow($rs)) { |
16 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
16 | + $docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
17 | 17 | } |
18 | 18 | $docgroupselector .= "</select>\n"; |
19 | 19 | } |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | if ($modx->db->getRecordCount($rs) < 1) { |
23 | 23 | $usrgroupselector = '[no user groups]'; |
24 | 24 | } else { |
25 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
25 | + $usrgroupselector = '<select name="usergroup">'."\n"; |
|
26 | 26 | while ($row = $modx->db->getRow($rs)) { |
27 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
27 | + $usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
28 | 28 | } |
29 | 29 | $usrgroupselector .= "</select>\n"; |
30 | 30 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div> |
61 | 61 | </div> |
62 | 62 | |
63 | -<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div> |
|
63 | +<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div> |
|
64 | 64 | |
65 | 65 | |
66 | 66 | <div class="tab-pane" id="wuapPane"> |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | </form> |
89 | 89 | </div> |
90 | 90 | <?php |
91 | - $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name ', $modx->getFullTableName('webgroup_names') . " AS groupnames |
|
92 | - LEFT JOIN " . $modx->getFullTableName('web_groups') . " AS groups ON groups.webgroup = groupnames.id |
|
93 | - LEFT JOIN " . $modx->getFullTableName('web_users') . " AS users ON users.id = groups.webuser", '', 'groupnames.name, user_name'); |
|
91 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name ', $modx->getFullTableName('webgroup_names')." AS groupnames |
|
92 | + LEFT JOIN " . $modx->getFullTableName('web_groups')." AS groups ON groups.webgroup = groupnames.id |
|
93 | + LEFT JOIN " . $modx->getFullTableName('web_users')." AS users ON users.id = groups.webuser", '', 'groupnames.name, user_name'); |
|
94 | 94 | if ($modx->db->getRecordCount($rs) < 1) { |
95 | 95 | ?> |
96 | 96 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | </form> |
158 | 158 | </div> |
159 | 159 | <?php |
160 | - $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $modx->getFullTableName('documentgroup_names') . " AS dgnames |
|
161 | - LEFT JOIN " . $modx->getFullTableName('document_groups') . " AS dg ON dg.document_group = dgnames.id |
|
162 | - LEFT JOIN " . $modx->getFullTableName('site_content') . " AS sc ON sc.id = dg.document", '', 'dgnames.name, sc.id'); |
|
160 | + $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $modx->getFullTableName('documentgroup_names')." AS dgnames |
|
161 | + LEFT JOIN " . $modx->getFullTableName('document_groups')." AS dg ON dg.document_group = dgnames.id |
|
162 | + LEFT JOIN " . $modx->getFullTableName('site_content')." AS sc ON sc.id = dg.document", '', 'dgnames.name, sc.id'); |
|
163 | 163 | if ($modx->db->getRecordCount($rs) < 1) { |
164 | 164 | ?> |
165 | 165 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -213,9 +213,9 @@ discard block |
||
213 | 213 | <div class="container container-body"> |
214 | 214 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
215 | 215 | <?php |
216 | - $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $modx->getFullTableName('webgroup_names') . " AS groupnames |
|
217 | - LEFT JOIN " . $modx->getFullTableName('webgroup_access') . " AS groupacc ON groupacc.webgroup = groupnames.id |
|
218 | - LEFT JOIN " . $modx->getFullTableName('documentgroup_names') . " AS dgnames ON dgnames.id = groupacc.documentgroup", '', 'name, dg_name'); |
|
216 | + $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $modx->getFullTableName('webgroup_names')." AS groupnames |
|
217 | + LEFT JOIN " . $modx->getFullTableName('webgroup_access')." AS groupacc ON groupacc.webgroup = groupnames.id |
|
218 | + LEFT JOIN " . $modx->getFullTableName('documentgroup_names')." AS dgnames ON dgnames.id = groupacc.documentgroup", '', 'name, dg_name'); |
|
219 | 219 | if ($modx->db->getRecordCount($rs) < 1) { |
220 | 220 | ?> |
221 | 221 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | <li><b><?= $row['name'] ?></b></li> |
247 | 247 | <?php |
248 | 248 | if (!$row['dg_id']) { |
249 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
249 | + echo '<i>'.$_lang['no_groups_found'].'</i></li>'; |
|
250 | 250 | $pid = ''; |
251 | 251 | continue; |
252 | 252 | } else { |