@@ -1,8 +1,8 @@ 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 | -if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
|
5 | +if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | $modx->getManagerApi()->initPageViewState(); |
11 | 11 | |
12 | 12 | // get and save search string |
13 | -if ($_REQUEST['op'] == 'reset') { |
|
13 | +if ($_REQUEST['op'] == 'reset') { |
|
14 | 14 | $query = ''; |
15 | 15 | $_PAGE['vs']['search'] = ''; |
16 | -} else { |
|
16 | +} else { |
|
17 | 17 | $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
18 | 18 | $sqlQuery = $modx->getDatabase()->escape($query); |
19 | 19 | $_PAGE['vs']['search'] = $query; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // context menu |
28 | 28 | $cm = new \EvolutionCMS\Support\ContextMenu("cntxm", 150); |
29 | 29 | $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0)); |
30 | -if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
30 | +if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
31 | 31 | $cm->addSeparator(); |
32 | 32 | } |
33 | 33 | $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['actions_edit'], (!$modx->hasPermission('edit_module') ? 1 : 0)); |
@@ -106,21 +106,21 @@ discard block |
||
106 | 106 | <div class="tab-page"> |
107 | 107 | <div class="table-responsive"> |
108 | 108 | <?php |
109 | - if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
109 | + if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
110 | 110 | $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon |
111 | 111 | FROM ' . $modx->getFullTableName('site_modules') . ' AS sm |
112 | 112 | LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id |
113 | 113 | LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group |
114 | 114 | WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
115 | 115 | ORDER BY sm.name'); |
116 | - if ($modx->hasPermission('edit_module')) { |
|
116 | + if ($modx->hasPermission('edit_module')) { |
|
117 | 117 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
118 | - } else if ($modx->hasPermission('exec_module')) { |
|
118 | + } else if ($modx->hasPermission('exec_module')) { |
|
119 | 119 | $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
120 | - } else { |
|
120 | + } else { |
|
121 | 121 | $title = '[+value+]'; |
122 | 122 | } |
123 | - } else { |
|
123 | + } else { |
|
124 | 124 | $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name"); |
125 | 125 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
126 | 126 | } |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | $grd->colWidths = "34,,,60,60"; |
136 | 136 | $grd->colAligns = "center,,,center,center"; |
137 | 137 | $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title; |
138 | - if ($listmode == '1') { |
|
138 | + if ($listmode == '1') { |
|
139 | 139 | $grd->pageSize = 0; |
140 | 140 | } |
141 | - if ($_REQUEST['op'] == 'reset') { |
|
141 | + if ($_REQUEST['op'] == 'reset') { |
|
142 | 142 | $grd->pageNumber = 1; |
143 | 143 | } |
144 | 144 | // render grid |