@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | case 'publishedon': |
40 | 40 | case 'pub_date': |
41 | 41 | case 'unpub_date': |
42 | - $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.' . $_SESSION['tree_sortby'], 'sc.' . $_SESSION['tree_sortby']); |
|
42 | + $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.'.$_SESSION['tree_sortby'], 'sc.'.$_SESSION['tree_sortby']); |
|
43 | 43 | break; |
44 | 44 | default: |
45 | - $sortby = 'sc.' . $_SESSION['tree_sortby']; |
|
45 | + $sortby = 'sc.'.$_SESSION['tree_sortby']; |
|
46 | 46 | }; |
47 | 47 | |
48 | - $orderby = $modx->db->escape($sortby . ' ' . $_SESSION['tree_sortdir']); |
|
48 | + $orderby = $modx->db->escape($sortby.' '.$_SESSION['tree_sortdir']); |
|
49 | 49 | |
50 | 50 | // Folder sorting gets special setup ;) Add menuindex and pagetitle |
51 | 51 | if ($_SESSION['tree_sortby'] == 'isfolder') { |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
60 | 60 | $showProtected = false; |
61 | 61 | if (isset($modx->config['tree_show_protected'])) { |
62 | - $showProtected = (boolean)$modx->config['tree_show_protected']; |
|
62 | + $showProtected = (boolean) $modx->config['tree_show_protected']; |
|
63 | 63 | } |
64 | - $mgrRole = (isset($_SESSION['mgrRole']) && (string)$_SESSION['mgrRole'] === '1') ? '1' : '0'; |
|
64 | + $mgrRole = (isset($_SESSION['mgrRole']) && (string) $_SESSION['mgrRole'] === '1') ? '1' : '0'; |
|
65 | 65 | if ($showProtected == false) { |
66 | - $access = "AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
66 | + $access = "AND (1={$mgrRole} OR sc.privatemgr=0".(!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
67 | 67 | } else { |
68 | 68 | $access = ''; |
69 | 69 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | $weblinkDisplay = $row['type'] == 'reference' ? sprintf(' %s', $_style['tree_linkgo']) : ''; |
102 | - $pageIdDisplay = '<small>(' . ($modx_textdir ? '‏' : '') . $row['id'] . ')</small>'; |
|
102 | + $pageIdDisplay = '<small>('.($modx_textdir ? '‏' : '').$row['id'].')</small>'; |
|
103 | 103 | |
104 | 104 | // Prepare displaying user-locks |
105 | 105 | $lockedByUser = ''; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | 'element_type' => $_lang["lock_element_type_7"], |
111 | 111 | 'lasthit_df' => $rowLock['lasthit_df'] |
112 | 112 | )); |
113 | - $lockedByUser = '<span title="' . $title . '" class="editResource">' . $_style['tree_preview_resource'] . '</span>'; |
|
113 | + $lockedByUser = '<span title="'.$title.'" class="editResource">'.$_style['tree_preview_resource'].'</span>'; |
|
114 | 114 | } else { |
115 | 115 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
116 | 116 | 'element_type' => $_lang["lock_element_type_7"], |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | 'lasthit_df' => $rowLock['lasthit_df'] |
119 | 119 | )); |
120 | 120 | if ($modx->hasPermission('remove_locks')) { |
121 | - $lockedByUser = '<span onclick="modx.tree.unlockElement(7, ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
121 | + $lockedByUser = '<span onclick="modx.tree.unlockElement(7, '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource">'.$_style['icons_secured'].'</span>'; |
|
122 | 122 | } else { |
123 | - $lockedByUser = '<span title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
123 | + $lockedByUser = '<span title="'.$title.'" class="lockedResource">'.$_style['icons_secured'].'</span>'; |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | } |
@@ -129,22 +129,22 @@ discard block |
||
129 | 129 | |
130 | 130 | $title = ''; |
131 | 131 | if (isDateNode($nodeNameSource)) { |
132 | - $title = $_lang['pagetitle'] . ': ' . $row['pagetitle'] . '[+lf+]'; |
|
132 | + $title = $_lang['pagetitle'].': '.$row['pagetitle'].'[+lf+]'; |
|
133 | 133 | } |
134 | - $title .= $_lang['id'] . ': ' . $row['id']; |
|
135 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_title'] . ': ' . $row['menutitle']; |
|
136 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_index'] . ': ' . $row['menuindex']; |
|
137 | - $title .= '[+lf+]' . $_lang['alias'] . ': ' . (!empty($row['alias']) ? $row['alias'] : '-'); |
|
138 | - $title .= '[+lf+]' . $_lang['template'] . ': ' . $row['templatename']; |
|
139 | - $title .= '[+lf+]' . $_lang['publish_date'] . ': ' . $modx->toDateFormat($row['pub_date']); |
|
140 | - $title .= '[+lf+]' . $_lang['unpublish_date'] . ': ' . $modx->toDateFormat($row['unpub_date']); |
|
141 | - $title .= '[+lf+]' . $_lang['page_data_web_access'] . ': ' . ($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
142 | - $title .= '[+lf+]' . $_lang['page_data_mgr_access'] . ': ' . ($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
143 | - $title .= '[+lf+]' . $_lang['resource_opt_richtext'] . ': ' . ($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
144 | - $title .= '[+lf+]' . $_lang['page_data_searchable'] . ': ' . ($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
145 | - $title .= '[+lf+]' . $_lang['page_data_cacheable'] . ': ' . ($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
134 | + $title .= $_lang['id'].': '.$row['id']; |
|
135 | + $title .= '[+lf+]'.$_lang['resource_opt_menu_title'].': '.$row['menutitle']; |
|
136 | + $title .= '[+lf+]'.$_lang['resource_opt_menu_index'].': '.$row['menuindex']; |
|
137 | + $title .= '[+lf+]'.$_lang['alias'].': '.(!empty($row['alias']) ? $row['alias'] : '-'); |
|
138 | + $title .= '[+lf+]'.$_lang['template'].': '.$row['templatename']; |
|
139 | + $title .= '[+lf+]'.$_lang['publish_date'].': '.$modx->toDateFormat($row['pub_date']); |
|
140 | + $title .= '[+lf+]'.$_lang['unpublish_date'].': '.$modx->toDateFormat($row['unpub_date']); |
|
141 | + $title .= '[+lf+]'.$_lang['page_data_web_access'].': '.($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
142 | + $title .= '[+lf+]'.$_lang['page_data_mgr_access'].': '.($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
143 | + $title .= '[+lf+]'.$_lang['resource_opt_richtext'].': '.($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
144 | + $title .= '[+lf+]'.$_lang['page_data_searchable'].': '.($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
145 | + $title .= '[+lf+]'.$_lang['page_data_cacheable'].': '.($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
146 | 146 | $title = $modx->htmlspecialchars($title); |
147 | - $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
147 | + $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
148 | 148 | |
149 | 149 | $data = array( |
150 | 150 | 'id' => $row['id'], |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | if ($ph['contextmenu']) { |
231 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
231 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | if ($_SESSION['tree_show_only_folders']) { |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | } |
286 | 286 | |
287 | 287 | if ($ph['contextmenu']) { |
288 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
288 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | $node .= $modx->parseText($tpl, $ph); |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | } |
324 | 324 | |
325 | 325 | if ($ph['contextmenu']) { |
326 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
326 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | $node .= $modx->parseText($tpl, $ph); |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | } |
375 | 375 | |
376 | 376 | if ($ph['contextmenu']) { |
377 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
377 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
378 | 378 | } |
379 | 379 | |
380 | 380 | $node .= $modx->parseText($tpl, $ph); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | } |
417 | 417 | |
418 | 418 | if ($ph['contextmenu']) { |
419 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
419 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | $node .= $modx->parseText($tpl, $ph); |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | $nodetitle .= $modx->config['friendly_url_suffix']; |
494 | 494 | } |
495 | 495 | } |
496 | - $nodetitle = $modx->config['friendly_url_prefix'] . $nodetitle; |
|
496 | + $nodetitle = $modx->config['friendly_url_prefix'].$nodetitle; |
|
497 | 497 | break; |
498 | 498 | case 'pagetitle': |
499 | 499 | $nodetitle = $row['pagetitle']; |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | { |
554 | 554 | $modx = evolutionCMS(); |
555 | 555 | |
556 | - return (int)$modx->db->getValue($modx->db->query('SELECT count(*) FROM ' . $modx->getFullTableName('site_content') . ' WHERE parent=' . $parent . ' AND isfolder=' . $isfolder . ' ')); |
|
556 | + return (int) $modx->db->getValue($modx->db->query('SELECT count(*) FROM '.$modx->getFullTableName('site_content').' WHERE parent='.$parent.' AND isfolder='.$isfolder.' ')); |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | /** |
@@ -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 | |
@@ -36,19 +36,19 @@ discard block |
||
36 | 36 | |
37 | 37 | <?php if ($use_browser && $modx->hasPermission('assets_images')) { |
38 | 38 | ?> |
39 | - <a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a> |
|
39 | + <a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a> |
|
40 | 40 | <?php |
41 | 41 | } ?> |
42 | 42 | |
43 | 43 | <?php if ($use_browser && $modx->hasPermission('assets_files')) { |
44 | 44 | ?> |
45 | - <a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a> |
|
45 | + <a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a> |
|
46 | 46 | <?php |
47 | 47 | } ?> |
48 | 48 | |
49 | 49 | <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { |
50 | 50 | ?> |
51 | - <a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a> |
|
51 | + <a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a> |
|
52 | 52 | <?php |
53 | 53 | } ?> |
54 | 54 |
@@ -1,11 +1,11 @@ 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 | // invoke OnManagerTreeInit event |
7 | 7 | $evtOut = $modx->invokeEvent('OnManagerTreeInit', $_REQUEST); |
8 | -if (is_array($evtOut)) { |
|
8 | +if (is_array($evtOut)) { |
|
9 | 9 | echo implode("\n", $evtOut); |
10 | 10 | } |
11 | 11 | ?> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <a class="treeButton" id="treeMenu_collapsetree" onclick="modx.tree.collapseTree();" title="<?php echo $_lang['collapse_tree']; ?>"><?php echo $_style['collapse_tree']; ?></a> |
19 | 19 | |
20 | - <?php if ($modx->hasPermission('new_document')) { |
|
20 | + <?php if ($modx->hasPermission('new_document')) { |
|
21 | 21 | ?> |
22 | 22 | <a class="treeButton" id="treeMenu_addresource" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=4', title: '<?php echo $_lang['add_resource']; ?>'});" title="<?php echo $_lang['add_resource']; ?>"><?php echo $_style['add_doc_tree']; ?></a> |
23 | 23 | <a class="treeButton" id="treeMenu_addweblink" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=72', title: '<?php echo $_lang['add_weblink']; ?>'});" title="<?php echo $_lang['add_weblink']; ?>"><?php echo $_style['add_weblink_tree']; ?></a> |
@@ -28,31 +28,31 @@ discard block |
||
28 | 28 | |
29 | 29 | <a class="treeButton" id="treeMenu_sortingtree" onclick="modx.tree.showSorter(event);" title="<?php echo $_lang['sort_tree']; ?>"><?php echo $_style['sort_tree']; ?></a> |
30 | 30 | |
31 | - <?php if ($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
|
31 | + <?php if ($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
|
32 | 32 | ?> |
33 | 33 | <a class="treeButton" id="treeMenu_sortingindex" onclick="modx.tabs({url: '<?= MODX_MANAGER_URL ?>?a=56&id=0', title: '<?php echo $_lang['sort_menuindex']; ?>'});" title="<?php echo $_lang['sort_menuindex']; ?>"><?php echo $_style['sort_menuindex']; ?></a> |
34 | 34 | <?php |
35 | 35 | } ?> |
36 | 36 | |
37 | - <?php if ($use_browser && $modx->hasPermission('assets_images')) { |
|
37 | + <?php if ($use_browser && $modx->hasPermission('assets_images')) { |
|
38 | 38 | ?> |
39 | 39 | <a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a> |
40 | 40 | <?php |
41 | 41 | } ?> |
42 | 42 | |
43 | - <?php if ($use_browser && $modx->hasPermission('assets_files')) { |
|
43 | + <?php if ($use_browser && $modx->hasPermission('assets_files')) { |
|
44 | 44 | ?> |
45 | 45 | <a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a> |
46 | 46 | <?php |
47 | 47 | } ?> |
48 | 48 | |
49 | - <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { |
|
49 | + <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { |
|
50 | 50 | ?> |
51 | 51 | <a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a> |
52 | 52 | <?php |
53 | 53 | } ?> |
54 | 54 | |
55 | - <?php if ($modx->hasPermission('empty_trash')) { |
|
55 | + <?php if ($modx->hasPermission('empty_trash')) { |
|
56 | 56 | ?> |
57 | 57 | <a class="treeButton treeButtonDisabled" id="treeMenu_emptytrash" title="<?php echo $_lang['empty_recycle_bin_empty']; ?>"><?php echo $_style['empty_recycle_bin_empty']; ?></a> |
58 | 58 | <?php |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | <?php |
67 | 67 | // invoke OnManagerTreePrerender event |
68 | 68 | $evtOut = $modx->invokeEvent('OnManagerTreePrerender', $modx->db->escape($_REQUEST)); |
69 | - if (is_array($evtOut)) { |
|
69 | + if (is_array($evtOut)) { |
|
70 | 70 | echo implode("\n", $evtOut); |
71 | 71 | } |
72 | 72 | ?> |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | <?php |
79 | 79 | // invoke OnManagerTreeRender event |
80 | 80 | $evtOut = $modx->invokeEvent('OnManagerTreeRender', $modx->db->escape($_REQUEST)); |
81 | - if (is_array($evtOut)) { |
|
81 | + if (is_array($evtOut)) { |
|
82 | 82 | echo implode("\n", $evtOut); |
83 | 83 | } |
84 | 84 | ?> |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $sitemenu['site'] = array( |
22 | 22 | 'site', |
23 | 23 | 'main', |
24 | - '<i class="fa fa-tachometer"></i><span class="menu-item-text">' . $_lang['home'] . '</span>', |
|
24 | + '<i class="fa fa-tachometer"></i><span class="menu-item-text">'.$_lang['home'].'</span>', |
|
25 | 25 | 'index.php?a=2', |
26 | 26 | $_lang['home'], |
27 | 27 | '', |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $sitemenu['elements'] = array( |
37 | 37 | 'elements', |
38 | 38 | 'main', |
39 | - '<i class="fa fa-th"></i><span class="menu-item-text">' . $_lang['elements'] . '</span>', |
|
39 | + '<i class="fa fa-th"></i><span class="menu-item-text">'.$_lang['elements'].'</span>', |
|
40 | 40 | 'javascript:;', |
41 | 41 | $_lang['elements'], |
42 | 42 | ' return false;', |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $sitemenu['modules'] = array( |
53 | 53 | 'modules', |
54 | 54 | 'main', |
55 | - '<i class="' . $_style['icons_modules'] . '"></i><span class="menu-item-text">' . $_lang['modules'] . '</span>', |
|
55 | + '<i class="'.$_style['icons_modules'].'"></i><span class="menu-item-text">'.$_lang['modules'].'</span>', |
|
56 | 56 | 'javascript:;', |
57 | 57 | $_lang['modules'], |
58 | 58 | ' return false;', |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $sitemenu['users'] = array( |
69 | 69 | 'users', |
70 | 70 | 'main', |
71 | - '<i class="fa fa-users"></i><span class="menu-item-text">' . $_lang['users'] . '</span>', |
|
71 | + '<i class="fa fa-users"></i><span class="menu-item-text">'.$_lang['users'].'</span>', |
|
72 | 72 | 'javascript:;', |
73 | 73 | $_lang['users'], |
74 | 74 | ' return false;', |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $sitemenu['tools'] = array( |
85 | 85 | 'tools', |
86 | 86 | 'main', |
87 | - '<i class="fa fa-wrench"></i><span class="menu-item-text">' . $_lang['tools'] . '</span>', |
|
87 | + '<i class="fa fa-wrench"></i><span class="menu-item-text">'.$_lang['tools'].'</span>', |
|
88 | 88 | 'javascript:;', |
89 | 89 | $_lang['tools'], |
90 | 90 | ' return false;', |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | $sitemenu['element_templates'] = array( |
102 | 102 | 'element_templates', |
103 | 103 | 'elements', |
104 | - '<i class="fa fa-newspaper-o"></i>' . $_lang['manage_templates'] . '<i class="fa fa-angle-right toggle"></i>', |
|
105 | - 'index.php?a=76&tab=' . $tab++, |
|
104 | + '<i class="fa fa-newspaper-o"></i>'.$_lang['manage_templates'].'<i class="fa fa-angle-right toggle"></i>', |
|
105 | + 'index.php?a=76&tab='.$tab++, |
|
106 | 106 | $_lang['manage_templates'], |
107 | 107 | '', |
108 | 108 | 'new_template,edit_template', |
@@ -116,8 +116,8 @@ discard block |
||
116 | 116 | $sitemenu['element_tplvars'] = array( |
117 | 117 | 'element_tplvars', |
118 | 118 | 'elements', |
119 | - '<i class="fa fa-list-alt"></i>' . $_lang['tmplvars'] . '<i class="fa fa-angle-right toggle"></i>', |
|
120 | - 'index.php?a=76&tab=' . $tab++, |
|
119 | + '<i class="fa fa-list-alt"></i>'.$_lang['tmplvars'].'<i class="fa fa-angle-right toggle"></i>', |
|
120 | + 'index.php?a=76&tab='.$tab++, |
|
121 | 121 | $_lang['tmplvars'], |
122 | 122 | '', |
123 | 123 | 'new_template,edit_template', |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | $sitemenu['element_htmlsnippets'] = array( |
132 | 132 | 'element_htmlsnippets', |
133 | 133 | 'elements', |
134 | - '<i class="fa fa-th-large"></i>' . $_lang['manage_htmlsnippets'] . '<i class="fa fa-angle-right toggle"></i>', |
|
135 | - 'index.php?a=76&tab=' . $tab++, |
|
134 | + '<i class="fa fa-th-large"></i>'.$_lang['manage_htmlsnippets'].'<i class="fa fa-angle-right toggle"></i>', |
|
135 | + 'index.php?a=76&tab='.$tab++, |
|
136 | 136 | $_lang['manage_htmlsnippets'], |
137 | 137 | '', |
138 | 138 | 'new_chunk,edit_chunk', |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | $sitemenu['element_snippets'] = array( |
147 | 147 | 'element_snippets', |
148 | 148 | 'elements', |
149 | - '<i class="fa fa-code"></i>' . $_lang['manage_snippets'] . '<i class="fa fa-angle-right toggle"></i>', |
|
150 | - 'index.php?a=76&tab=' . $tab++, |
|
149 | + '<i class="fa fa-code"></i>'.$_lang['manage_snippets'].'<i class="fa fa-angle-right toggle"></i>', |
|
150 | + 'index.php?a=76&tab='.$tab++, |
|
151 | 151 | $_lang['manage_snippets'], |
152 | 152 | '', |
153 | 153 | 'new_snippet,edit_snippet', |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | $sitemenu['element_plugins'] = array( |
162 | 162 | 'element_plugins', |
163 | 163 | 'elements', |
164 | - '<i class="fa fa-plug"></i>' . $_lang['manage_plugins'] . '<i class="fa fa-angle-right toggle"></i>', |
|
165 | - 'index.php?a=76&tab=' . $tab++, |
|
164 | + '<i class="fa fa-plug"></i>'.$_lang['manage_plugins'].'<i class="fa fa-angle-right toggle"></i>', |
|
165 | + 'index.php?a=76&tab='.$tab++, |
|
166 | 166 | $_lang['manage_plugins'], |
167 | 167 | '', |
168 | 168 | 'new_plugin,edit_plugin', |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $sitemenu['manage_files'] = array( |
179 | 179 | 'manage_files', |
180 | 180 | 'elements', |
181 | - '<i class="fa fa-folder-open-o"></i>' . $_lang['manage_files'], |
|
181 | + '<i class="fa fa-folder-open-o"></i>'.$_lang['manage_files'], |
|
182 | 182 | 'index.php?a=31', |
183 | 183 | $_lang['manage_files'], |
184 | 184 | '', |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $sitemenu['manage_categories'] = array( |
194 | 194 | 'manage_categories', |
195 | 195 | 'elements', |
196 | - '<i class="fa fa-object-group"></i>' . $_lang['manage_categories'], |
|
196 | + '<i class="fa fa-object-group"></i>'.$_lang['manage_categories'], |
|
197 | 197 | 'index.php?a=120', |
198 | 198 | $_lang['manage_categories'], |
199 | 199 | '', |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $sitemenu['new_module'] = array( |
211 | 211 | 'new_module', |
212 | 212 | 'modules', |
213 | - '<i class="' . $_style['icons_modules'] . '"></i>' . $_lang['module_management'], |
|
213 | + '<i class="'.$_style['icons_modules'].'"></i>'.$_lang['module_management'], |
|
214 | 214 | 'index.php?a=106', |
215 | 215 | $_lang['module_management'], |
216 | 216 | '', |
@@ -225,21 +225,21 @@ discard block |
||
225 | 225 | if ($modx->hasPermission('exec_module')) { |
226 | 226 | if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
227 | 227 | $rs = $modx->db->query('SELECT DISTINCT sm.id, sm.name, sm.icon, mg.member |
228 | - FROM ' . $modx->getFullTableName('site_modules') . ' AS sm |
|
229 | - LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id |
|
230 | - LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group |
|
231 | - WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
|
228 | + FROM ' . $modx->getFullTableName('site_modules').' AS sm |
|
229 | + LEFT JOIN ' . $modx->getFullTableName('site_module_access').' AS sma ON sma.module = sm.id |
|
230 | + LEFT JOIN ' . $modx->getFullTableName('member_groups').' AS mg ON sma.usergroup = mg.user_group |
|
231 | + WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID().') AND sm.disabled != 1 AND sm.locked != 1 |
|
232 | 232 | ORDER BY sm.name'); |
233 | 233 | } else { |
234 | 234 | $rs = $modx->db->select('*', $modx->getFullTableName('site_modules'), 'disabled != 1', 'name'); |
235 | 235 | } |
236 | 236 | if ($modx->db->getRecordCount($rs)) { |
237 | 237 | while ($row = $modx->db->getRow($rs)) { |
238 | - $sitemenu['module' . $row['id']] = array( |
|
239 | - 'module' . $row['id'], |
|
238 | + $sitemenu['module'.$row['id']] = array( |
|
239 | + 'module'.$row['id'], |
|
240 | 240 | 'modules', |
241 | - ($row['icon'] != '' ? '<i class="' . $row['icon'] . '"></i>' : '<i class="' . $_style['icons_module'] . '"></i>') . $row['name'], |
|
242 | - 'index.php?a=112&id=' . $row['id'], |
|
241 | + ($row['icon'] != '' ? '<i class="'.$row['icon'].'"></i>' : '<i class="'.$_style['icons_module'].'"></i>').$row['name'], |
|
242 | + 'index.php?a=112&id='.$row['id'], |
|
243 | 243 | $row['name'], |
244 | 244 | '', |
245 | 245 | '', |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $sitemenu['user_management_title'] = array( |
259 | 259 | 'user_management_title', |
260 | 260 | 'users', |
261 | - '<i class="fa fa fa-user"></i>' . $_lang['user_management_title'] . '<i class="fa fa-angle-right toggle"></i>', |
|
261 | + '<i class="fa fa fa-user"></i>'.$_lang['user_management_title'].'<i class="fa fa-angle-right toggle"></i>', |
|
262 | 262 | 'index.php?a=75', |
263 | 263 | $_lang['user_management_title'], |
264 | 264 | '', |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $sitemenu['web_user_management_title'] = array( |
275 | 275 | 'web_user_management_title', |
276 | 276 | 'users', |
277 | - '<i class="fa fa-users"></i>' . $_lang['web_user_management_title'] . '<i class="fa fa-angle-right toggle"></i>', |
|
277 | + '<i class="fa fa-users"></i>'.$_lang['web_user_management_title'].'<i class="fa fa-angle-right toggle"></i>', |
|
278 | 278 | 'index.php?a=99', |
279 | 279 | $_lang['web_user_management_title'], |
280 | 280 | '', |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $sitemenu['role_management_title'] = array( |
291 | 291 | 'role_management_title', |
292 | 292 | 'users', |
293 | - '<i class="fa fa-legal"></i>' . $_lang['role_management_title'], |
|
293 | + '<i class="fa fa-legal"></i>'.$_lang['role_management_title'], |
|
294 | 294 | 'index.php?a=86', |
295 | 295 | $_lang['role_management_title'], |
296 | 296 | '', |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $sitemenu['manager_permissions'] = array( |
307 | 307 | 'manager_permissions', |
308 | 308 | 'users', |
309 | - '<i class="fa fa-male"></i>' . $_lang['manager_permissions'], |
|
309 | + '<i class="fa fa-male"></i>'.$_lang['manager_permissions'], |
|
310 | 310 | 'index.php?a=40', |
311 | 311 | $_lang['manager_permissions'], |
312 | 312 | '', |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | $sitemenu['web_permissions'] = array( |
323 | 323 | 'web_permissions', |
324 | 324 | 'users', |
325 | - '<i class="fa fa-universal-access"></i>' . $_lang['web_permissions'], |
|
325 | + '<i class="fa fa-universal-access"></i>'.$_lang['web_permissions'], |
|
326 | 326 | 'index.php?a=91', |
327 | 327 | $_lang['web_permissions'], |
328 | 328 | '', |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | $sitemenu['refresh_site'] = array( |
340 | 340 | 'refresh_site', |
341 | 341 | 'tools', |
342 | - '<i class="fa fa-recycle"></i>' . $_lang['refresh_site'], |
|
342 | + '<i class="fa fa-recycle"></i>'.$_lang['refresh_site'], |
|
343 | 343 | 'index.php?a=26', |
344 | 344 | $_lang['refresh_site'], |
345 | 345 | '', |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | 'a', // tag |
354 | 354 | 'javascript:;', // href |
355 | 355 | 'btn btn-secondary', // class or btn-success |
356 | - 'modx.popup({url:\'index.php?a=26\', title:\'' . $_lang['refresh_site'] . '\', icon: \'fa-recycle\', iframe: \'ajax\', selector: \'.tab-page>.container\', position: \'right top\', width: \'auto\', maxheight: \'50%\', wrap: \'body\' })', // onclick |
|
356 | + 'modx.popup({url:\'index.php?a=26\', title:\''.$_lang['refresh_site'].'\', icon: \'fa-recycle\', iframe: \'ajax\', selector: \'.tab-page>.container\', position: \'right top\', width: \'auto\', maxheight: \'50%\', wrap: \'body\' })', // onclick |
|
357 | 357 | $_lang['refresh_site'], // title |
358 | 358 | '<i class="fa fa-recycle"></i>' // innerHTML |
359 | 359 | ) |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | $sitemenu['search'] = array( |
364 | 364 | 'search', |
365 | 365 | 'tools', |
366 | - '<i class="fa fa-search"></i>' . $_lang['search'], |
|
366 | + '<i class="fa fa-search"></i>'.$_lang['search'], |
|
367 | 367 | 'index.php?a=71', |
368 | 368 | $_lang['search'], |
369 | 369 | '', |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | $sitemenu['bk_manager'] = array( |
379 | 379 | 'bk_manager', |
380 | 380 | 'tools', |
381 | - '<i class="fa fa-database"></i>' . $_lang['bk_manager'], |
|
381 | + '<i class="fa fa-database"></i>'.$_lang['bk_manager'], |
|
382 | 382 | 'index.php?a=93', |
383 | 383 | $_lang['bk_manager'], |
384 | 384 | '', |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $sitemenu['remove_locks'] = array( |
395 | 395 | 'remove_locks', |
396 | 396 | 'tools', |
397 | - '<i class="fa fa-hourglass"></i>' . $_lang['remove_locks'], |
|
397 | + '<i class="fa fa-hourglass"></i>'.$_lang['remove_locks'], |
|
398 | 398 | 'javascript:modx.removeLocks();', |
399 | 399 | $_lang['remove_locks'], |
400 | 400 | '', |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $sitemenu['import_site'] = array( |
411 | 411 | 'import_site', |
412 | 412 | 'tools', |
413 | - '<i class="fa fa-upload"></i>' . $_lang['import_site'], |
|
413 | + '<i class="fa fa-upload"></i>'.$_lang['import_site'], |
|
414 | 414 | 'index.php?a=95', |
415 | 415 | $_lang['import_site'], |
416 | 416 | '', |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | $sitemenu['export_site'] = array( |
427 | 427 | 'export_site', |
428 | 428 | 'tools', |
429 | - '<i class="fa fa-download"></i>' . $_lang['export_site'], |
|
429 | + '<i class="fa fa-download"></i>'.$_lang['export_site'], |
|
430 | 430 | 'index.php?a=83', |
431 | 431 | $_lang['export_site'], |
432 | 432 | '', |
@@ -446,15 +446,15 @@ discard block |
||
446 | 446 | $newmenu = array_merge($newmenu, unserialize($item)); |
447 | 447 | } |
448 | 448 | } |
449 | - if (count($newmenu)> 0) { |
|
449 | + if (count($newmenu) > 0) { |
|
450 | 450 | $sitemenu = $newmenu; |
451 | 451 | } |
452 | 452 | } |
453 | 453 | |
454 | -if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php')) { |
|
455 | - include_once(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php'); |
|
454 | +if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/includes/menu.class.inc.php')) { |
|
455 | + include_once(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/includes/menu.class.inc.php'); |
|
456 | 456 | } else { |
457 | - include_once(MODX_MANAGER_PATH . 'includes/menu.class.inc.php'); |
|
457 | + include_once(MODX_MANAGER_PATH.'includes/menu.class.inc.php'); |
|
458 | 458 | } |
459 | 459 | $menu = new EVOmenu(); |
460 | 460 | $menu->Build($sitemenu, array( |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'active' |
33 | 33 | ); |
34 | 34 | |
35 | -if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('file_manager')) { |
|
35 | +if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('file_manager')) { |
|
36 | 36 | $sitemenu['elements'] = array( |
37 | 37 | 'elements', |
38 | 38 | 'main', |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ); |
49 | 49 | } |
50 | 50 | |
51 | -if ($modx->hasPermission('exec_module')) { |
|
51 | +if ($modx->hasPermission('exec_module')) { |
|
52 | 52 | $sitemenu['modules'] = array( |
53 | 53 | 'modules', |
54 | 54 | 'main', |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ); |
65 | 65 | } |
66 | 66 | |
67 | -if ($modx->hasPermission('edit_user') || $modx->hasPermission('edit_web_user') || $modx->hasPermission('edit_role') || $modx->hasPermission('access_permissions') || $modx->hasPermission('web_access_permissions')) { |
|
67 | +if ($modx->hasPermission('edit_user') || $modx->hasPermission('edit_web_user') || $modx->hasPermission('edit_role') || $modx->hasPermission('access_permissions') || $modx->hasPermission('web_access_permissions')) { |
|
68 | 68 | $sitemenu['users'] = array( |
69 | 69 | 'users', |
70 | 70 | 'main', |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | ); |
81 | 81 | } |
82 | 82 | |
83 | -if ($modx->hasPermission('empty_cache') || $modx->hasPermission('bk_manager') || $modx->hasPermission('remove_locks') || $modx->hasPermission('import_static') || $modx->hasPermission('export_static')) { |
|
83 | +if ($modx->hasPermission('empty_cache') || $modx->hasPermission('bk_manager') || $modx->hasPermission('remove_locks') || $modx->hasPermission('import_static') || $modx->hasPermission('export_static')) { |
|
84 | 84 | $sitemenu['tools'] = array( |
85 | 85 | 'tools', |
86 | 86 | 'main', |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | $tab = 0; |
100 | -if ($modx->hasPermission('edit_template')) { |
|
100 | +if ($modx->hasPermission('edit_template')) { |
|
101 | 101 | $sitemenu['element_templates'] = array( |
102 | 102 | 'element_templates', |
103 | 103 | 'elements', |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | 'dropdown-toggle' |
113 | 113 | ); |
114 | 114 | } |
115 | -if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
|
115 | +if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
|
116 | 116 | $sitemenu['element_tplvars'] = array( |
117 | 117 | 'element_tplvars', |
118 | 118 | 'elements', |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | 'dropdown-toggle' |
128 | 128 | ); |
129 | 129 | } |
130 | -if ($modx->hasPermission('edit_chunk')) { |
|
130 | +if ($modx->hasPermission('edit_chunk')) { |
|
131 | 131 | $sitemenu['element_htmlsnippets'] = array( |
132 | 132 | 'element_htmlsnippets', |
133 | 133 | 'elements', |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | 'dropdown-toggle' |
143 | 143 | ); |
144 | 144 | } |
145 | -if ($modx->hasPermission('edit_snippet')) { |
|
145 | +if ($modx->hasPermission('edit_snippet')) { |
|
146 | 146 | $sitemenu['element_snippets'] = array( |
147 | 147 | 'element_snippets', |
148 | 148 | 'elements', |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | 'dropdown-toggle' |
158 | 158 | ); |
159 | 159 | } |
160 | -if ($modx->hasPermission('edit_plugin')) { |
|
160 | +if ($modx->hasPermission('edit_plugin')) { |
|
161 | 161 | $sitemenu['element_plugins'] = array( |
162 | 162 | 'element_plugins', |
163 | 163 | 'elements', |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | //$sitemenu['element_categories'] = array('element_categories','elements',$_lang['element_categories'],'index.php?a=76&tab=5',$_lang['element_categories'],'','new_template,edit_template,new_snippet,edit_snippet,new_chunk,edit_chunk,new_plugin,edit_plugin','main',1,60,''); |
176 | 176 | |
177 | -if ($modx->hasPermission('file_manager')) { |
|
177 | +if ($modx->hasPermission('file_manager')) { |
|
178 | 178 | $sitemenu['manage_files'] = array( |
179 | 179 | 'manage_files', |
180 | 180 | 'elements', |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | '' |
190 | 190 | ); |
191 | 191 | } |
192 | -if ($modx->hasPermission('category_manager')) { |
|
192 | +if ($modx->hasPermission('category_manager')) { |
|
193 | 193 | $sitemenu['manage_categories'] = array( |
194 | 194 | 'manage_categories', |
195 | 195 | 'elements', |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | } |
207 | 207 | |
208 | 208 | // Modules Menu Items |
209 | -if ($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('save_module')) { |
|
209 | +if ($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('save_module')) { |
|
210 | 210 | $sitemenu['new_module'] = array( |
211 | 211 | 'new_module', |
212 | 212 | 'modules', |
@@ -222,19 +222,19 @@ discard block |
||
222 | 222 | ); |
223 | 223 | } |
224 | 224 | |
225 | -if ($modx->hasPermission('exec_module')) { |
|
226 | - if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
225 | +if ($modx->hasPermission('exec_module')) { |
|
226 | + if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
227 | 227 | $rs = $modx->db->query('SELECT DISTINCT sm.id, sm.name, sm.icon, mg.member |
228 | 228 | FROM ' . $modx->getFullTableName('site_modules') . ' AS sm |
229 | 229 | LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id |
230 | 230 | LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group |
231 | 231 | WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
232 | 232 | ORDER BY sm.name'); |
233 | - } else { |
|
233 | + } else { |
|
234 | 234 | $rs = $modx->db->select('*', $modx->getFullTableName('site_modules'), 'disabled != 1', 'name'); |
235 | 235 | } |
236 | - if ($modx->db->getRecordCount($rs)) { |
|
237 | - while ($row = $modx->db->getRow($rs)) { |
|
236 | + if ($modx->db->getRecordCount($rs)) { |
|
237 | + while ($row = $modx->db->getRow($rs)) { |
|
238 | 238 | $sitemenu['module' . $row['id']] = array( |
239 | 239 | 'module' . $row['id'], |
240 | 240 | 'modules', |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | |
255 | 255 | // security menu items (users) |
256 | 256 | |
257 | -if ($modx->hasPermission('edit_user')) { |
|
257 | +if ($modx->hasPermission('edit_user')) { |
|
258 | 258 | $sitemenu['user_management_title'] = array( |
259 | 259 | 'user_management_title', |
260 | 260 | 'users', |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | ); |
271 | 271 | } |
272 | 272 | |
273 | -if ($modx->hasPermission('edit_web_user')) { |
|
273 | +if ($modx->hasPermission('edit_web_user')) { |
|
274 | 274 | $sitemenu['web_user_management_title'] = array( |
275 | 275 | 'web_user_management_title', |
276 | 276 | 'users', |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | ); |
287 | 287 | } |
288 | 288 | |
289 | -if ($modx->hasPermission('edit_role')) { |
|
289 | +if ($modx->hasPermission('edit_role')) { |
|
290 | 290 | $sitemenu['role_management_title'] = array( |
291 | 291 | 'role_management_title', |
292 | 292 | 'users', |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | ); |
303 | 303 | } |
304 | 304 | |
305 | -if ($modx->hasPermission('access_permissions')) { |
|
305 | +if ($modx->hasPermission('access_permissions')) { |
|
306 | 306 | $sitemenu['manager_permissions'] = array( |
307 | 307 | 'manager_permissions', |
308 | 308 | 'users', |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | ); |
319 | 319 | } |
320 | 320 | |
321 | -if ($modx->hasPermission('web_access_permissions')) { |
|
321 | +if ($modx->hasPermission('web_access_permissions')) { |
|
322 | 322 | $sitemenu['web_permissions'] = array( |
323 | 323 | 'web_permissions', |
324 | 324 | 'users', |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | '' |
375 | 375 | ); |
376 | 376 | |
377 | -if ($modx->hasPermission('bk_manager')) { |
|
377 | +if ($modx->hasPermission('bk_manager')) { |
|
378 | 378 | $sitemenu['bk_manager'] = array( |
379 | 379 | 'bk_manager', |
380 | 380 | 'tools', |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | ); |
391 | 391 | } |
392 | 392 | |
393 | -if ($modx->hasPermission('remove_locks')) { |
|
393 | +if ($modx->hasPermission('remove_locks')) { |
|
394 | 394 | $sitemenu['remove_locks'] = array( |
395 | 395 | 'remove_locks', |
396 | 396 | 'tools', |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | ); |
407 | 407 | } |
408 | 408 | |
409 | -if ($modx->hasPermission('import_static')) { |
|
409 | +if ($modx->hasPermission('import_static')) { |
|
410 | 410 | $sitemenu['import_site'] = array( |
411 | 411 | 'import_site', |
412 | 412 | 'tools', |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | ); |
423 | 423 | } |
424 | 424 | |
425 | -if ($modx->hasPermission('export_static')) { |
|
425 | +if ($modx->hasPermission('export_static')) { |
|
426 | 426 | $sitemenu['export_site'] = array( |
427 | 427 | 'export_site', |
428 | 428 | 'tools', |
@@ -439,21 +439,21 @@ discard block |
||
439 | 439 | } |
440 | 440 | |
441 | 441 | $menu = $modx->invokeEvent("OnManagerMenuPrerender", array('menu' => $sitemenu)); |
442 | -if (is_array($menu)) { |
|
442 | +if (is_array($menu)) { |
|
443 | 443 | $newmenu = array(); |
444 | - foreach ($menu as $item) { |
|
445 | - if (is_array(unserialize($item))) { |
|
444 | + foreach ($menu as $item) { |
|
445 | + if (is_array(unserialize($item))) { |
|
446 | 446 | $newmenu = array_merge($newmenu, unserialize($item)); |
447 | 447 | } |
448 | 448 | } |
449 | - if (count($newmenu)> 0) { |
|
449 | + if (count($newmenu)> 0) { |
|
450 | 450 | $sitemenu = $newmenu; |
451 | 451 | } |
452 | 452 | } |
453 | 453 | |
454 | -if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php')) { |
|
454 | +if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php')) { |
|
455 | 455 | include_once(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/includes/menu.class.inc.php'); |
456 | -} else { |
|
456 | +} else { |
|
457 | 457 | include_once(MODX_MANAGER_PATH . 'includes/menu.class.inc.php'); |
458 | 458 | } |
459 | 459 | $menu = new EVOmenu(); |
@@ -246,18 +246,18 @@ |
||
246 | 246 | lockedElementsTranslation: <?= json_encode($unlockTranslations, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . "\n" ?> |
247 | 247 | }; |
248 | 248 | <?php |
249 | - $opened = array_filter(array_map('intval', explode('|', $_SESSION['openedArray']))); |
|
250 | - echo(empty($opened) ? '' : 'modx.openedArray[' . implode("] = 1;\n modx.openedArray[", $opened) . '] = 1;') . "\n"; |
|
251 | - ?> |
|
249 | + $opened = array_filter(array_map('intval', explode('|', $_SESSION['openedArray']))); |
|
250 | + echo(empty($opened) ? '' : 'modx.openedArray[' . implode("] = 1;\n modx.openedArray[", $opened) . '] = 1;') . "\n"; |
|
251 | + ?> |
|
252 | 252 | </script> |
253 | 253 | <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/modx.min.js?v=<?= $lastInstallTime ?>"></script> |
254 | 254 | <?php if ($modx->config['show_picker'] != "0") { |
255 | - ?> |
|
255 | + ?> |
|
256 | 256 | <script src="media/script/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> |
257 | 257 | <script src="media/script/spectrum/spectrum.evo.min.js" type="text/javascript"></script> |
258 | 258 | <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js" type="text/javascript"></script> |
259 | 259 | <?php |
260 | - } ?> |
|
260 | + } ?> |
|
261 | 261 | <?php |
262 | 262 | // invoke OnManagerTopPrerender event |
263 | 263 | $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST); |
@@ -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 | header("X-XSS-Protection: 0"); |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | |
48 | 48 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness'); |
49 | 49 | if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
50 | - $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
|
50 | + $body_class .= ' '.$theme_modes[$_COOKIE['MODX_themeMode']]; |
|
51 | 51 | } elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
52 | - $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
|
52 | + $body_class .= ' '.$theme_modes[$modx->config['manager_theme_mode']]; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | $navbar_position = $modx->config['manager_menu_position']; |
@@ -82,36 +82,36 @@ discard block |
||
82 | 82 | $user['which_browser'] = $modx->config['which_browser']; |
83 | 83 | } |
84 | 84 | |
85 | -$css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
|
85 | +$css = 'media/style/'.$modx->config['manager_theme'].'/css/page.css?v='.$lastInstallTime; |
|
86 | 86 | |
87 | 87 | if ($modx->config['manager_theme'] == 'default') { |
88 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
89 | - require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
|
88 | + if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css') && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) { |
|
89 | + require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php'; |
|
90 | 90 | $minifier = new Formatter\CSSMinify(); |
91 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
|
92 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css'); |
|
93 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css'); |
|
94 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css'); |
|
95 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css'); |
|
96 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css'); |
|
97 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css'); |
|
98 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css'); |
|
99 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css'); |
|
100 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css'); |
|
101 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css'); |
|
91 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css'); |
|
92 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css'); |
|
93 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css'); |
|
94 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css'); |
|
95 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css'); |
|
96 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css'); |
|
97 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css'); |
|
98 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css'); |
|
99 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css'); |
|
100 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css'); |
|
101 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css'); |
|
102 | 102 | $css = $minifier->minify(); |
103 | - file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
|
103 | + file_put_contents(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css', $css); |
|
104 | 104 | } |
105 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
106 | - $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
|
105 | + if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) { |
|
106 | + $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime; |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | -$modx->config['global_tabs'] = (int)($modx->config['global_tabs'] && ($user['role'] == 1 || $modx->hasPermission('edit_template') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_plugin'))); |
|
110 | +$modx->config['global_tabs'] = (int) ($modx->config['global_tabs'] && ($user['role'] == 1 || $modx->hasPermission('edit_template') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_plugin'))); |
|
111 | 111 | |
112 | 112 | ?> |
113 | 113 | <!DOCTYPE html> |
114 | -<html <?= (isset($modx_textdir) && $modx_textdir ? 'dir="rtl" lang="' : 'lang="') . $mxla . '" xml:lang="' . $mxla . '"' ?>> |
|
114 | +<html <?= (isset($modx_textdir) && $modx_textdir ? 'dir="rtl" lang="' : 'lang="').$mxla.'" xml:lang="'.$mxla.'"' ?>> |
|
115 | 115 | <head> |
116 | 116 | <title><?= $site_name ?>- (EVO CMS Manager)</title> |
117 | 117 | <meta http-equiv="Content-Type" content="text/html; charset=<?= $modx_manager_charset ?>" /> |
@@ -144,21 +144,21 @@ discard block |
||
144 | 144 | MODX_SITE_URL: '<?= MODX_SITE_URL ?>', |
145 | 145 | MODX_MANAGER_URL: '<?= MODX_MANAGER_URL ?>', |
146 | 146 | user: { |
147 | - role: <?= (int)$user['role'] ?>, |
|
147 | + role: <?= (int) $user['role'] ?>, |
|
148 | 148 | username: '<?= $user['username'] ?>' |
149 | 149 | }, |
150 | 150 | config: { |
151 | 151 | mail_check_timeperiod: <?= $modx->config['mail_check_timeperiod'] ?>, |
152 | - menu_height: <?= (int)$menu_height ?>, |
|
153 | - tree_width: <?= (int)$tree_width ?>, |
|
154 | - tree_min_width: <?= (int)$tree_min_width ?>, |
|
155 | - session_timeout: <?= (int)$modx->config['session_timeout'] ?>, |
|
156 | - site_start: <?= (int)$modx->config['site_start'] ?>, |
|
157 | - tree_page_click: <?=(!empty($modx->config['tree_page_click']) ? (int)$modx->config['tree_page_click'] : 27) ?>, |
|
152 | + menu_height: <?= (int) $menu_height ?>, |
|
153 | + tree_width: <?= (int) $tree_width ?>, |
|
154 | + tree_min_width: <?= (int) $tree_min_width ?>, |
|
155 | + session_timeout: <?= (int) $modx->config['session_timeout'] ?>, |
|
156 | + site_start: <?= (int) $modx->config['site_start'] ?>, |
|
157 | + tree_page_click: <?=(!empty($modx->config['tree_page_click']) ? (int) $modx->config['tree_page_click'] : 27) ?>, |
|
158 | 158 | theme: '<?= $modx->config['manager_theme'] ?>', |
159 | 159 | theme_mode: '<?= $modx->config['manager_theme_mode'] ?>', |
160 | 160 | which_browser: '<?= $user['which_browser'] ?>', |
161 | - layout: <?= (int)$manager_layout ?>, |
|
161 | + layout: <?= (int) $manager_layout ?>, |
|
162 | 162 | textdir: '<?= $modx_textdir ?>', |
163 | 163 | global_tabs: <?= $modx->config['global_tabs'] ?> |
164 | 164 | |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | delete a[b]; |
244 | 244 | }, |
245 | 245 | openedArray: [], |
246 | - lockedElementsTranslation: <?= json_encode($unlockTranslations, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . "\n" ?> |
|
246 | + lockedElementsTranslation: <?= json_encode($unlockTranslations, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE)."\n" ?> |
|
247 | 247 | }; |
248 | 248 | <?php |
249 | 249 | $opened = array_filter(array_map('intval', explode('|', $_SESSION['openedArray']))); |
250 | - echo(empty($opened) ? '' : 'modx.openedArray[' . implode("] = 1;\n modx.openedArray[", $opened) . '] = 1;') . "\n"; |
|
250 | + echo(empty($opened) ? '' : 'modx.openedArray['.implode("] = 1;\n modx.openedArray[", $opened).'] = 1;')."\n"; |
|
251 | 251 | ?> |
252 | 252 | </script> |
253 | 253 | <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/modx.min.js?v=<?= $lastInstallTime ?>"></script> |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | <span class="username"><?= $user['username'] ?></span> |
343 | 343 | <?php if ($user['photo']) { |
344 | 344 | ?> |
345 | - <span class="icon photo" style="background-image: url(<?= MODX_SITE_URL . $user['photo'] ?>);"></span> |
|
345 | + <span class="icon photo" style="background-image: url(<?= MODX_SITE_URL.$user['photo'] ?>);"></span> |
|
346 | 346 | <?php |
347 | 347 | } else { |
348 | 348 | ?> |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | $version = 'Evolution'; |
375 | 375 | ?> |
376 | 376 | <?php |
377 | - echo sprintf('<li><span class="dropdown-item" title="%s – %s" %s>' . $version . ' %s</span></li>', $site_name, $modx->getVersionData('full_appname'), $style, $modx->config['settings_version']); |
|
377 | + echo sprintf('<li><span class="dropdown-item" title="%s – %s" %s>'.$version.' %s</span></li>', $site_name, $modx->getVersionData('full_appname'), $style, $modx->config['settings_version']); |
|
378 | 378 | ?> |
379 | 379 | </ul> |
380 | 380 | </li> |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | */ |
578 | 578 | function constructLink($action, $img, $text, $allowed) |
579 | 579 | { |
580 | - if ((bool)$allowed) { |
|
580 | + if ((bool) $allowed) { |
|
581 | 581 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, $action); |
582 | 582 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text); |
583 | 583 | } |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | document.getElementById('treeMenu_openimages').onclick = function(e) { |
615 | 615 | e.preventDefault(); |
616 | 616 | if (modx.config.global_tabs && !e.shiftKey) { |
617 | - modx.tabs({url: '<?= MODX_MANAGER_URL . 'media/browser/' . $which_browser . '/browse.php?filemanager=media/browser/' . $which_browser . '/browse.php&type=images' ?>', title: '<?= $_lang["images_management"] ?>'}); |
|
617 | + modx.tabs({url: '<?= MODX_MANAGER_URL.'media/browser/'.$which_browser.'/browse.php?filemanager=media/browser/'.$which_browser.'/browse.php&type=images' ?>', title: '<?= $_lang["images_management"] ?>'}); |
|
618 | 618 | } else { |
619 | 619 | var randomNum = '<?= $_lang["files_files"] ?>'; |
620 | 620 | if (e.shiftKey) { |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | document.getElementById('treeMenu_openfiles').onclick = function(e) { |
635 | 635 | e.preventDefault(); |
636 | 636 | if (modx.config.global_tabs && !e.shiftKey) { |
637 | - modx.tabs({url: '<?= MODX_MANAGER_URL . 'media/browser/' . $which_browser . '/browse.php?filemanager=media/browser/' . $which_browser . '/browse.php&type=files' ?>', title: '<?= $_lang["files_files"] ?>'}); |
|
637 | + modx.tabs({url: '<?= MODX_MANAGER_URL.'media/browser/'.$which_browser.'/browse.php?filemanager=media/browser/'.$which_browser.'/browse.php&type=files' ?>', title: '<?= $_lang["files_files"] ?>'}); |
|
638 | 638 | } else { |
639 | 639 | var randomNum = '<?= $_lang["files_files"] ?>'; |
640 | 640 | if (e.shiftKey) { |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | |
692 | 692 | </div> |
693 | 693 | <?php if ($modx->config['show_picker'] != "0") { |
694 | - include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php'); |
|
694 | + include('media/style/'.$modx->config['manager_theme'].'/color.switcher.php'); |
|
695 | 695 | } ?> |
696 | 696 | </body> |
697 | 697 | </html> |
@@ -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 | header("X-XSS-Protection: 0"); |
@@ -11,22 +11,22 @@ discard block |
||
11 | 11 | |
12 | 12 | $mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en'; |
13 | 13 | |
14 | -if (!isset($modx->config['manager_menu_height'])) { |
|
14 | +if (!isset($modx->config['manager_menu_height'])) { |
|
15 | 15 | $modx->config['manager_menu_height'] = 2.2; // rem |
16 | 16 | } |
17 | 17 | |
18 | -if (!isset($modx->config['manager_tree_width'])) { |
|
18 | +if (!isset($modx->config['manager_tree_width'])) { |
|
19 | 19 | $modx->config['manager_tree_width'] = 20; // rem |
20 | 20 | } |
21 | 21 | |
22 | -if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) { |
|
22 | +if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) { |
|
23 | 23 | $initMainframeAction = $_SESSION['onLoginForwardToAction']; |
24 | 24 | unset($_SESSION['onLoginForwardToAction']); |
25 | -} else { |
|
25 | +} else { |
|
26 | 26 | $initMainframeAction = 2; // welcome.static |
27 | 27 | } |
28 | 28 | |
29 | -if (!isset($_SESSION['tree_show_only_folders'])) { |
|
29 | +if (!isset($_SESSION['tree_show_only_folders'])) { |
|
30 | 30 | $_SESSION['tree_show_only_folders'] = 0; |
31 | 31 | } |
32 | 32 | |
@@ -35,29 +35,29 @@ discard block |
||
35 | 35 | $tree_width = $modx->config['manager_tree_width']; |
36 | 36 | $tree_min_width = 0; |
37 | 37 | |
38 | -if (isset($_COOKIE['MODX_widthSideBar'])) { |
|
38 | +if (isset($_COOKIE['MODX_widthSideBar'])) { |
|
39 | 39 | $MODX_widthSideBar = $_COOKIE['MODX_widthSideBar']; |
40 | -} else { |
|
40 | +} else { |
|
41 | 41 | $MODX_widthSideBar = $tree_width; |
42 | 42 | } |
43 | 43 | |
44 | -if (!$MODX_widthSideBar) { |
|
44 | +if (!$MODX_widthSideBar) { |
|
45 | 45 | $body_class .= 'sidebar-closed'; |
46 | 46 | } |
47 | 47 | |
48 | 48 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness'); |
49 | -if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
|
49 | +if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
|
50 | 50 | $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
51 | -} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
|
51 | +} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
|
52 | 52 | $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
53 | 53 | } |
54 | 54 | |
55 | 55 | $navbar_position = $modx->config['manager_menu_position']; |
56 | -if ($navbar_position == 'left') { |
|
56 | +if ($navbar_position == 'left') { |
|
57 | 57 | $body_class .= ' navbar-left navbar-left-icon-and-text'; |
58 | 58 | } |
59 | 59 | |
60 | -if (isset($modx->pluginCache['ElementsInTree'])) { |
|
60 | +if (isset($modx->pluginCache['ElementsInTree'])) { |
|
61 | 61 | $body_class .= ' ElementsInTree'; |
62 | 62 | } |
63 | 63 | |
@@ -73,19 +73,19 @@ discard block |
||
73 | 73 | 'type8' => $_lang["lock_element_type_8"] |
74 | 74 | ); |
75 | 75 | |
76 | -foreach ($unlockTranslations as $key => $value) { |
|
76 | +foreach ($unlockTranslations as $key => $value) { |
|
77 | 77 | $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
78 | 78 | } |
79 | 79 | |
80 | 80 | $user = $modx->getUserInfo($modx->getLoginUserID()); |
81 | -if ($user['which_browser'] == 'default') { |
|
81 | +if ($user['which_browser'] == 'default') { |
|
82 | 82 | $user['which_browser'] = $modx->config['which_browser']; |
83 | 83 | } |
84 | 84 | |
85 | 85 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
86 | 86 | |
87 | -if ($modx->config['manager_theme'] == 'default') { |
|
88 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
87 | +if ($modx->config['manager_theme'] == 'default') { |
|
88 | + if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
89 | 89 | require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
90 | 90 | $minifier = new Formatter\CSSMinify(); |
91 | 91 | $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $css = $minifier->minify(); |
103 | 103 | file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
104 | 104 | } |
105 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
105 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
106 | 106 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
107 | 107 | } |
108 | 108 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | <meta name="theme-color" content="#1d2023" /> |
120 | 120 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
121 | 121 | <link rel="stylesheet" type="text/css" href="<?= $css ?>" /> |
122 | - <?php if ($modx->config['show_picker'] != "0") { |
|
122 | + <?php if ($modx->config['show_picker'] != "0") { |
|
123 | 123 | ?> |
124 | 124 | <link rel="stylesheet" href="media/style/common/spectrum/spectrum.css" /> |
125 | 125 | <link rel="stylesheet" type="text/css" href="media/style/<?= $modx->config['manager_theme'] ?>/css/color.switcher.css" /> |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | ?> |
252 | 252 | </script> |
253 | 253 | <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/modx.min.js?v=<?= $lastInstallTime ?>"></script> |
254 | - <?php if ($modx->config['show_picker'] != "0") { |
|
254 | + <?php if ($modx->config['show_picker'] != "0") { |
|
255 | 255 | ?> |
256 | 256 | <script src="media/script/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> |
257 | 257 | <script src="media/script/spectrum/spectrum.evo.min.js" type="text/javascript"></script> |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | <?php |
262 | 262 | // invoke OnManagerTopPrerender event |
263 | 263 | $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST); |
264 | - if (is_array($evtOut)) { |
|
264 | + if (is_array($evtOut)) { |
|
265 | 265 | echo implode("\n", $evtOut); |
266 | 266 | } |
267 | 267 | ?> |
@@ -287,14 +287,14 @@ discard block |
||
287 | 287 | <div class="mask"></div> |
288 | 288 | </form> |
289 | 289 | </li> |
290 | - <?php if ($modx->config['show_newresource_btn'] != "0") { |
|
290 | + <?php if ($modx->config['show_newresource_btn'] != "0") { |
|
291 | 291 | ?> |
292 | - <?php if ($modx->hasPermission('new_document')) { |
|
292 | + <?php if ($modx->hasPermission('new_document')) { |
|
293 | 293 | ?> |
294 | 294 | <li id="newresource" class="dropdown newresource"> |
295 | 295 | <a href="javascript:;" class="dropdown-toggle" onclick="return false;" title="<?= $_lang['add_resource'] ?>"><?= $_style['menu_new_resource'] ?></a> |
296 | 296 | <ul class="dropdown-menu"> |
297 | - <?php if ($modx->hasPermission('new_document')) { |
|
297 | + <?php if ($modx->hasPermission('new_document')) { |
|
298 | 298 | ?> |
299 | 299 | <li> |
300 | 300 | <a onclick="" href="index.php?a=4" target="main"> |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | </li> |
309 | 309 | <?php |
310 | 310 | } ?> |
311 | - <?php if ($use_browser && $modx->hasPermission('assets_images')) { |
|
311 | + <?php if ($use_browser && $modx->hasPermission('assets_images')) { |
|
312 | 312 | ?> |
313 | 313 | <li> |
314 | 314 | <a onclick="" href="media/browser/<?= $which_browser ?>/browse.php?&type=images" target="main"> |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | </li> |
318 | 318 | <?php |
319 | 319 | } ?> |
320 | - <?php if ($use_browser && $modx->hasPermission('assets_files')) { |
|
320 | + <?php if ($use_browser && $modx->hasPermission('assets_files')) { |
|
321 | 321 | ?> |
322 | 322 | <li> |
323 | 323 | <a onclick="" href="media/browser/<?= $which_browser ?>/browse.php?&type=files" target="main"> |
@@ -340,11 +340,11 @@ discard block |
||
340 | 340 | <li id="account" class="dropdown account"> |
341 | 341 | <a href="javascript:;" class="dropdown-toggle" onclick="return false;"> |
342 | 342 | <span class="username"><?= $user['username'] ?></span> |
343 | - <?php if ($user['photo']) { |
|
343 | + <?php if ($user['photo']) { |
|
344 | 344 | ?> |
345 | 345 | <span class="icon photo" style="background-image: url(<?= MODX_SITE_URL . $user['photo'] ?>);"></span> |
346 | 346 | <?php |
347 | - } else { |
|
347 | + } else { |
|
348 | 348 | ?> |
349 | 349 | <span class="icon"><?= $_style['menu_user'] ?></span> |
350 | 350 | <?php |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | <?php if ($modx->hasPermission('messages')): ?> |
356 | 356 | <li id="newMail"></li> |
357 | 357 | <?php endif; ?> |
358 | - <?php if ($modx->hasPermission('change_password')) { |
|
358 | + <?php if ($modx->hasPermission('change_password')) { |
|
359 | 359 | ?> |
360 | 360 | <li> |
361 | 361 | <a onclick="" href="index.php?a=28" target="main"> |
@@ -378,12 +378,12 @@ discard block |
||
378 | 378 | ?> |
379 | 379 | </ul> |
380 | 380 | </li> |
381 | - <?php if ($modx->hasPermission('settings') || $modx->hasPermission('view_eventlog') || $modx->hasPermission('logs') || $modx->hasPermission('help')) { |
|
381 | + <?php if ($modx->hasPermission('settings') || $modx->hasPermission('view_eventlog') || $modx->hasPermission('logs') || $modx->hasPermission('help')) { |
|
382 | 382 | ?> |
383 | 383 | <li id="system" class="dropdown"> |
384 | 384 | <a href="javascript:;" class="dropdown-toggle" title="<?= $_lang['system'] ?>" onclick="return false;"><?= $_style['menu_system'] ?></a> |
385 | 385 | <ul class="dropdown-menu"> |
386 | - <?php if ($modx->hasPermission('settings')) { |
|
386 | + <?php if ($modx->hasPermission('settings')) { |
|
387 | 387 | ?> |
388 | 388 | <li> |
389 | 389 | <a href="index.php?a=17" target="main"> |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | </li> |
393 | 393 | <?php |
394 | 394 | } ?> |
395 | - <?php if ($modx->hasPermission('view_eventlog')) { |
|
395 | + <?php if ($modx->hasPermission('view_eventlog')) { |
|
396 | 396 | ?> |
397 | 397 | <li> |
398 | 398 | <a href="index.php?a=70" target="main"> |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | </li> |
402 | 402 | <?php |
403 | 403 | } ?> |
404 | - <?php if ($modx->hasPermission('view_eventlog')) { |
|
404 | + <?php if ($modx->hasPermission('view_eventlog')) { |
|
405 | 405 | ?> |
406 | 406 | <li> |
407 | 407 | <a href="index.php?a=114" target="main"> |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | </li> |
411 | 411 | <?php |
412 | 412 | } ?> |
413 | - <?php if ($modx->hasPermission('logs')) { |
|
413 | + <?php if ($modx->hasPermission('logs')) { |
|
414 | 414 | ?> |
415 | 415 | <li> |
416 | 416 | <a href="index.php?a=13" target="main"> |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | </li> |
425 | 425 | <?php |
426 | 426 | } ?> |
427 | - <?php if ($modx->hasPermission('help')) { |
|
427 | + <?php if ($modx->hasPermission('help')) { |
|
428 | 428 | ?> |
429 | 429 | <li> |
430 | 430 | <a href="index.php?a=9" target="main"> |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | </li> |
438 | 438 | <?php |
439 | 439 | } ?> |
440 | - <?php if ($modx->config['show_fullscreen_btn'] != "0") { |
|
440 | + <?php if ($modx->config['show_fullscreen_btn'] != "0") { |
|
441 | 441 | ?> |
442 | 442 | <li id="fullscreen"> |
443 | 443 | <a href="javascript:;" onclick="toggleFullScreen();" id="toggleFullScreen" title="<?= $_lang["toggle_fullscreen"] ?>"> |
@@ -462,11 +462,14 @@ discard block |
||
462 | 462 | <div id="evo-tab-page-home" class="evo-tab-page show iframe-scroller"> |
463 | 463 | <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
464 | 464 | </div> |
465 | - <?php else: ?> |
|
465 | + <?php else { |
|
466 | + : ?> |
|
466 | 467 | <div class="iframe-scroller"> |
467 | 468 | <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
468 | 469 | </div> |
469 | - <?php endif; ?> |
|
470 | + <?php endif; |
|
471 | +} |
|
472 | +?> |
|
470 | 473 | <script> |
471 | 474 | if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) { |
472 | 475 | document.getElementById('mainframe').setAttribute('scrolling', 'no'); |
@@ -485,11 +488,11 @@ discard block |
||
485 | 488 | 'tree_sortdir', |
486 | 489 | 'tree_nodename' |
487 | 490 | ); |
488 | - foreach ($sortParams as $param) { |
|
489 | - if (isset($_REQUEST[$param])) { |
|
491 | + foreach ($sortParams as $param) { |
|
492 | + if (isset($_REQUEST[$param])) { |
|
490 | 493 | $modx->manager->saveLastUserSetting($param, $_REQUEST[$param]); |
491 | 494 | $_SESSION[$param] = $_REQUEST[$param]; |
492 | - } elseif (!isset($_SESSION[$param])) { |
|
495 | + } elseif (!isset($_SESSION[$param])) { |
|
493 | 496 | $_SESSION[$param] = $modx->manager->getLastUserSetting($param); |
494 | 497 | } |
495 | 498 | } |
@@ -575,9 +578,9 @@ discard block |
||
575 | 578 | * @param string $text |
576 | 579 | * @param bool $allowed |
577 | 580 | */ |
578 | - function constructLink($action, $img, $text, $allowed) |
|
579 | - { |
|
580 | - if ((bool)$allowed) { |
|
581 | + function constructLink($action, $img, $text, $allowed) |
|
582 | + { |
|
583 | + if ((bool)$allowed) { |
|
581 | 584 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, $action); |
582 | 585 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text); |
583 | 586 | } |
@@ -588,7 +591,7 @@ discard block |
||
588 | 591 | <script type="text/javascript"> |
589 | 592 | |
590 | 593 | if (document.getElementById('treeMenu')) { |
591 | - <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { |
|
594 | + <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { |
|
592 | 595 | ?> |
593 | 596 | |
594 | 597 | document.getElementById('treeMenu_openelements').onclick = function(e) { |
@@ -608,7 +611,7 @@ discard block |
||
608 | 611 | }; |
609 | 612 | <?php |
610 | 613 | } ?> |
611 | - <?php if ($use_browser && $modx->hasPermission('assets_images')) { |
|
614 | + <?php if ($use_browser && $modx->hasPermission('assets_images')) { |
|
612 | 615 | ?> |
613 | 616 | |
614 | 617 | document.getElementById('treeMenu_openimages').onclick = function(e) { |
@@ -628,7 +631,7 @@ discard block |
||
628 | 631 | }; |
629 | 632 | <?php |
630 | 633 | } ?> |
631 | - <?php if ($use_browser && $modx->hasPermission('assets_files')) { |
|
634 | + <?php if ($use_browser && $modx->hasPermission('assets_files')) { |
|
632 | 635 | ?> |
633 | 636 | |
634 | 637 | document.getElementById('treeMenu_openfiles').onclick = function(e) { |
@@ -652,7 +655,7 @@ discard block |
||
652 | 655 | } |
653 | 656 | |
654 | 657 | </script> |
655 | - <?php if ($modx->config['show_fullscreen_btn'] != "0") { |
|
658 | + <?php if ($modx->config['show_fullscreen_btn'] != "0") { |
|
656 | 659 | ?> |
657 | 660 | <script> |
658 | 661 | function toggleFullScreen() |
@@ -690,7 +693,7 @@ discard block |
||
690 | 693 | ?> |
691 | 694 | |
692 | 695 | </div> |
693 | -<?php if ($modx->config['show_picker'] != "0") { |
|
696 | +<?php if ($modx->config['show_picker'] != "0") { |
|
694 | 697 | include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php'); |
695 | 698 | } ?> |
696 | 699 | </body> |
@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** This file is part of KCFinder project |
4 | - * |
|
5 | - * @desc This file is included first, before each other |
|
6 | - * @package KCFinder |
|
7 | - * @version 2.54 |
|
8 | - * @author Pavel Tzonkov <[email protected]> |
|
9 | - * @copyright 2010-2014 KCFinder Project |
|
10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | - * @link http://kcfinder.sunhater.com |
|
13 | - * |
|
14 | - * This file is the place you can put any code (at the end of the file), |
|
15 | - * which will be executed before any other. Suitable for: |
|
16 | - * 1. Set PHP ini settings using ini_set() |
|
17 | - * 2. Custom session save handler with session_set_save_handler() |
|
18 | - * 3. Any custom integration code. If you use any global variables |
|
19 | - * here, they can be accessed in config.php via $GLOBALS array. |
|
20 | - * It's recommended to use constants instead. |
|
21 | - */ |
|
4 | + * |
|
5 | + * @desc This file is included first, before each other |
|
6 | + * @package KCFinder |
|
7 | + * @version 2.54 |
|
8 | + * @author Pavel Tzonkov <[email protected]> |
|
9 | + * @copyright 2010-2014 KCFinder Project |
|
10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | + * @link http://kcfinder.sunhater.com |
|
13 | + * |
|
14 | + * This file is the place you can put any code (at the end of the file), |
|
15 | + * which will be executed before any other. Suitable for: |
|
16 | + * 1. Set PHP ini settings using ini_set() |
|
17 | + * 2. Custom session save handler with session_set_save_handler() |
|
18 | + * 3. Any custom integration code. If you use any global variables |
|
19 | + * here, they can be accessed in config.php via $GLOBALS array. |
|
20 | + * It's recommended to use constants instead. |
|
21 | + */ |
|
22 | 22 | include_once(dirname(__FILE__) . "/../../../../../assets/cache/siteManager.php"); |
23 | 23 | require_once('../../../includes/protect.inc.php'); |
24 | 24 | include_once('../../../includes/config.inc.php'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * here, they can be accessed in config.php via $GLOBALS array. |
20 | 20 | * It's recommended to use constants instead. |
21 | 21 | */ |
22 | -include_once(dirname(__FILE__) . "/../../../../../assets/cache/siteManager.php"); |
|
22 | +include_once(dirname(__FILE__)."/../../../../../assets/cache/siteManager.php"); |
|
23 | 23 | require_once('../../../includes/protect.inc.php'); |
24 | 24 | include_once('../../../includes/config.inc.php'); |
25 | 25 | include_once('../../../includes/document.parser.class.inc.php'); |
@@ -34,15 +34,15 @@ discard block |
||
34 | 34 | |
35 | 35 | $manager_language = $modx->config['manager_language']; |
36 | 36 | // Pass language code from MODX to KCFinder |
37 | -if (!file_exists("../../../includes/lang/" . $manager_language . ".inc.php")) { |
|
37 | +if (!file_exists("../../../includes/lang/".$manager_language.".inc.php")) { |
|
38 | 38 | $manager_language = "english"; // if not set, get the english language file. |
39 | 39 | } |
40 | -include_once "../../../includes/lang/" . $manager_language . ".inc.php"; |
|
40 | +include_once "../../../includes/lang/".$manager_language.".inc.php"; |
|
41 | 41 | $_GET['langCode'] = $modx_lang_attribute; |
42 | 42 | |
43 | 43 | // PHP VERSION CHECK |
44 | 44 | if (substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.')) < 5) { |
45 | - die("You are using PHP " . PHP_VERSION . " when KCFinder require at least version 5! Some systems has an option to change the active PHP version. Please refer to your hosting provider or upgrade your PHP distribution."); |
|
45 | + die("You are using PHP ".PHP_VERSION." when KCFinder require at least version 5! Some systems has an option to change the active PHP version. Please refer to your hosting provider or upgrade your PHP distribution."); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ); |
79 | 79 | } |
80 | 80 | if (isset($classes[$class])) { |
81 | - require dirname(__FILE__) . $classes[$class]; |
|
81 | + require dirname(__FILE__).$classes[$class]; |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | spl_autoload_register('autoloadda9d06472ccb71b84928677ce2a6ca89', true); |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | if (!function_exists("json_encode")) { |
89 | 89 | function kcfinder_json_string_encode($string) |
90 | 90 | { |
91 | - return '"' . |
|
91 | + return '"'. |
|
92 | 92 | str_replace('/', "\\/", |
93 | 93 | str_replace("\t", "\\t", |
94 | 94 | str_replace("\r", "\\r", |
95 | 95 | str_replace("\n", "\\n", |
96 | 96 | str_replace('"', "\\\"", |
97 | 97 | str_replace("\\", "\\\\", |
98 | - $string)))))) . '"'; |
|
98 | + $string)))))).'"'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | function json_encode($data) |
@@ -106,16 +106,16 @@ discard block |
||
106 | 106 | // OBJECT |
107 | 107 | if (array_keys($data) !== range(0, count($data) - 1)) { |
108 | 108 | foreach ($data as $key => $val) { |
109 | - $ret[] = kcfinder_json_string_encode($key) . ':' . json_encode($val); |
|
109 | + $ret[] = kcfinder_json_string_encode($key).':'.json_encode($val); |
|
110 | 110 | } |
111 | - return "{" . implode(",", $ret) . "}"; |
|
111 | + return "{".implode(",", $ret)."}"; |
|
112 | 112 | |
113 | 113 | // ARRAY |
114 | 114 | } else { |
115 | 115 | foreach ($data as $val) { |
116 | 116 | $ret[] = json_encode($val); |
117 | 117 | } |
118 | - return "[" . implode(",", $ret) . "]"; |
|
118 | + return "[".implode(",", $ret)."]"; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | // BOOLEAN OR NULL |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** This file is part of KCFinder project |
4 | - * |
|
5 | - * @desc MIME type detection class |
|
6 | - * @package KCFinder |
|
7 | - * @version 2.54 |
|
8 | - * @author Pavel Tzonkov <[email protected]> |
|
9 | - * @copyright 2010-2014 KCFinder Project |
|
10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | - * @link http://kcfinder.sunhater.com |
|
13 | - */ |
|
4 | + * |
|
5 | + * @desc MIME type detection class |
|
6 | + * @package KCFinder |
|
7 | + * @version 2.54 |
|
8 | + * @author Pavel Tzonkov <[email protected]> |
|
9 | + * @copyright 2010-2014 KCFinder Project |
|
10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | + * @link http://kcfinder.sunhater.com |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | class type_mime |
16 | 16 | { |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** This file is part of KCFinder project |
4 | - * |
|
5 | - * @desc Image detection class |
|
6 | - * @package KCFinder |
|
7 | - * @version 2.54 |
|
8 | - * @author Pavel Tzonkov <[email protected]> |
|
9 | - * @copyright 2010-2014 KCFinder Project |
|
10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | - * @link http://kcfinder.sunhater.com |
|
13 | - */ |
|
4 | + * |
|
5 | + * @desc Image detection class |
|
6 | + * @package KCFinder |
|
7 | + * @version 2.54 |
|
8 | + * @author Pavel Tzonkov <[email protected]> |
|
9 | + * @copyright 2010-2014 KCFinder Project |
|
10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | + * @link http://kcfinder.sunhater.com |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | class type_img |
16 | 16 | { |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** This file is part of KCFinder project |
4 | - * |
|
5 | - * @desc HTTP cache helper class |
|
6 | - * @package KCFinder |
|
7 | - * @version 2.54 |
|
8 | - * @author Pavel Tzonkov <[email protected]> |
|
9 | - * @copyright 2010-2014 KCFinder Project |
|
10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | - * @link http://kcfinder.sunhater.com |
|
13 | - */ |
|
4 | + * |
|
5 | + * @desc HTTP cache helper class |
|
6 | + * @package KCFinder |
|
7 | + * @version 2.54 |
|
8 | + * @author Pavel Tzonkov <[email protected]> |
|
9 | + * @copyright 2010-2014 KCFinder Project |
|
10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | + * @link http://kcfinder.sunhater.com |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | class httpCache |
16 | 16 | { |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | const DEFAULT_EXPIRE = 604800; // in seconds |
19 | 19 | |
20 | 20 | /** Cache a file. The $type parameter might define the MIME type of the file |
21 | - * or path to magic file to autodetect the MIME type. If you skip $type |
|
22 | - * parameter the method will try with the default magic file. Autodetection |
|
23 | - * of MIME type requires Fileinfo PHP extension used in file::getMimeType() |
|
24 | - * @param string $file |
|
25 | - * @param string $type |
|
26 | - * @param integer $expire |
|
27 | - * @param array $headers */ |
|
21 | + * or path to magic file to autodetect the MIME type. If you skip $type |
|
22 | + * parameter the method will try with the default magic file. Autodetection |
|
23 | + * of MIME type requires Fileinfo PHP extension used in file::getMimeType() |
|
24 | + * @param string $file |
|
25 | + * @param string $type |
|
26 | + * @param integer $expire |
|
27 | + * @param array $headers */ |
|
28 | 28 | |
29 | 29 | public static function file($file, $type=null, $expire=null, array $headers=null) |
30 | 30 | { |
@@ -46,12 +46,12 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** Cache the given $content with $mtime modification time. |
49 | - * @param binary $content |
|
50 | - * @param integer $mtime |
|
51 | - * @param string $type |
|
52 | - * @param integer $expire |
|
53 | - * @param array $headers |
|
54 | - * @param bool $checkMTime */ |
|
49 | + * @param binary $content |
|
50 | + * @param integer $mtime |
|
51 | + * @param string $type |
|
52 | + * @param integer $expire |
|
53 | + * @param array $headers |
|
54 | + * @param bool $checkMTime */ |
|
55 | 55 | |
56 | 56 | public static function content($content, $mtime, $type=null, $expire=null, array $headers=null, $checkMTime=true) |
57 | 57 | { |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | /** Check if given modification time is newer than client-side one. If not, |
83 | - * the method will tell the client to get the content from its own cache. |
|
84 | - * Afterwards the script process will be terminated. This feature requires |
|
85 | - * the PHP to be configured as Apache module. |
|
86 | - * @param integer $mtime */ |
|
83 | + * the method will tell the client to get the content from its own cache. |
|
84 | + * Afterwards the script process will be terminated. This feature requires |
|
85 | + * the PHP to be configured as Apache module. |
|
86 | + * @param integer $mtime */ |
|
87 | 87 | |
88 | 88 | public static function checkMTime($mtime, $sendHeaders=null) |
89 | 89 | { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @param integer $expire |
27 | 27 | * @param array $headers */ |
28 | 28 | |
29 | - public static function file($file, $type=null, $expire=null, array $headers=null) |
|
29 | + public static function file($file, $type = null, $expire = null, array $headers = null) |
|
30 | 30 | { |
31 | 31 | $mtime = @filemtime($file); |
32 | 32 | if ($mtime !== false) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @param array $headers |
54 | 54 | * @param bool $checkMTime */ |
55 | 55 | |
56 | - public static function content($content, $mtime, $type=null, $expire=null, array $headers=null, $checkMTime=true) |
|
56 | + public static function content($content, $mtime, $type = null, $expire = null, array $headers = null, $checkMTime = true) |
|
57 | 57 | { |
58 | 58 | if ($checkMTime) { |
59 | 59 | self::checkMTime($mtime); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $expire = self::DEFAULT_EXPIRE; |
66 | 66 | } |
67 | 67 | $size = strlen($content); |
68 | - $expires = gmdate("D, d M Y H:i:s", time() + $expire) . " GMT"; |
|
68 | + $expires = gmdate("D, d M Y H:i:s", time() + $expire)." GMT"; |
|
69 | 69 | header("Content-Type: $type"); |
70 | 70 | header("Expires: $expires"); |
71 | 71 | header("Cache-Control: max-age=$expire"); |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | * the PHP to be configured as Apache module. |
86 | 86 | * @param integer $mtime */ |
87 | 87 | |
88 | - public static function checkMTime($mtime, $sendHeaders=null) |
|
88 | + public static function checkMTime($mtime, $sendHeaders = null) |
|
89 | 89 | { |
90 | - header("Last-Modified: " . gmdate("D, d M Y H:i:s", $mtime) . " GMT"); |
|
90 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s", $mtime)." GMT"); |
|
91 | 91 | |
92 | 92 | $headers = function_exists("getallheaders") |
93 | 93 | ? getallheaders() |
@@ -1,23 +1,23 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** This file is part of KCFinder project |
4 | - * |
|
5 | - * @desc Text processing helper class |
|
6 | - * @package KCFinder |
|
7 | - * @version 2.54 |
|
8 | - * @author Pavel Tzonkov <[email protected]> |
|
9 | - * @copyright 2010-2014 KCFinder Project |
|
10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | - * @link http://kcfinder.sunhater.com |
|
13 | - */ |
|
4 | + * |
|
5 | + * @desc Text processing helper class |
|
6 | + * @package KCFinder |
|
7 | + * @version 2.54 |
|
8 | + * @author Pavel Tzonkov <[email protected]> |
|
9 | + * @copyright 2010-2014 KCFinder Project |
|
10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
12 | + * @link http://kcfinder.sunhater.com |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | class text |
16 | 16 | { |
17 | 17 | |
18 | - /** Replace repeated white spaces to single space |
|
19 | - * @param string $string |
|
20 | - * @return string */ |
|
18 | + /** Replace repeated white spaces to single space |
|
19 | + * @param string $string |
|
20 | + * @return string */ |
|
21 | 21 | |
22 | 22 | public static function clearWhitespaces($string) |
23 | 23 | { |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | /** Normalize the string for HTML attribute value |
28 | - * @param string $string |
|
29 | - * @return string */ |
|
28 | + * @param string $string |
|
29 | + * @return string */ |
|
30 | 30 | |
31 | 31 | public static function htmlValue($string) |
32 | 32 | { |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** Normalize the string for JavaScript string value |
42 | - * @param string $string |
|
43 | - * @return string */ |
|
42 | + * @param string $string |
|
43 | + * @return string */ |
|
44 | 44 | |
45 | 45 | public static function jsValue($string) |
46 | 46 | { |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | /** Normalize the string for XML tag content data |
56 | - * @param string $string |
|
57 | - * @param bool $cdata */ |
|
56 | + * @param string $string |
|
57 | + * @param bool $cdata */ |
|
58 | 58 | |
59 | 59 | public static function xmlData($string, $cdata=false) |
60 | 60 | { |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | /** Returns compressed content of given CSS code |
69 | - * @param string $code |
|
70 | - * @return string */ |
|
69 | + * @param string $code |
|
70 | + * @return string */ |
|
71 | 71 | |
72 | 72 | public static function compressCSS($code) |
73 | 73 | { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | * @param string $string |
57 | 57 | * @param bool $cdata */ |
58 | 58 | |
59 | - public static function xmlData($string, $cdata=false) |
|
59 | + public static function xmlData($string, $cdata = false) |
|
60 | 60 | { |
61 | 61 | $string = str_replace("]]>", "]]]]><![CDATA[>", $string); |
62 | 62 | if (!$cdata) { |