@@ -43,7 +43,9 @@ discard block |
||
43 | 43 | // get user settings |
44 | 44 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('user_settings'), "user = '{$user}'"); |
45 | 45 | $usersettings = array(); |
46 | - while($row = $modx->getDatabase()->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
46 | + while($row = $modx->getDatabase()->getRow($rs)) { |
|
47 | + $usersettings[$row['setting_name']] = $row['setting_value']; |
|
48 | + } |
|
47 | 49 | // manually extract so that user display settings are not overwritten |
48 | 50 | foreach($usersettings as $k => $v) { |
49 | 51 | if($k != 'manager_language' && $k != 'manager_theme') { |
@@ -767,13 +769,16 @@ discard block |
||
767 | 769 | |
768 | 770 | $groupsarray = array(); |
769 | 771 | |
770 | - if($modx->getManagerApi()->action == '12') { // only do this bit if the user is being edited |
|
772 | + if($modx->getManagerApi()->action == '12') { |
|
773 | +// only do this bit if the user is being edited |
|
771 | 774 | $rs = $modx->getDatabase()->select('user_group', $modx->getFullTableName('member_groups'), "member='{$user}'"); |
772 | 775 | $groupsarray = $modx->getDatabase()->getColumn('user_group', $rs); |
773 | 776 | } |
774 | 777 | // retain selected doc groups between post |
775 | 778 | if(is_array($_POST['user_groups'])) { |
776 | - foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
779 | + foreach($_POST['user_groups'] as $n => $v) { |
|
780 | + $groupsarray[] = $v; |
|
781 | + } |
|
777 | 782 | } |
778 | 783 | ?> |
779 | 784 | <div class="tab-page" id="tabAccess"> |
@@ -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('logs')) { |
|
5 | +if (!$modx->hasPermission('logs')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | <?php |
27 | 27 | // get all users currently in the log |
28 | 28 | $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username'); |
29 | - foreach ($logs_user as $row) { |
|
29 | + foreach ($logs_user as $row) { |
|
30 | 30 | $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : ''; |
31 | 31 | echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n"; |
32 | 32 | } |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | // get all available actions in the log |
44 | 44 | include_once "actionlist.inc.php"; |
45 | 45 | $logs_actions = record_sort(array_unique_multi($logs, 'action'), 'action'); |
46 | - foreach ($logs_actions as $row) { |
|
46 | + foreach ($logs_actions as $row) { |
|
47 | 47 | $action = getAction($row['action']); |
48 | - if ($action == 'Idle') { |
|
48 | + if ($action == 'Idle') { |
|
49 | 49 | continue; |
50 | 50 | } |
51 | 51 | $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : ''; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | <?php |
64 | 64 | // get all itemid currently in logging |
65 | 65 | $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid'); |
66 | - foreach ($logs_items as $row) { |
|
66 | + foreach ($logs_items as $row) { |
|
67 | 67 | $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : ''; |
68 | 68 | echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n"; |
69 | 69 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | <?php |
80 | 80 | // get all itemname currently in logging |
81 | 81 | $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname'); |
82 | - foreach ($logs_names as $row) { |
|
82 | + foreach ($logs_names as $row) { |
|
83 | 83 | $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : ''; |
84 | 84 | echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n"; |
85 | 85 | } |
@@ -135,36 +135,36 @@ discard block |
||
135 | 135 | <div class="container container-body"> |
136 | 136 | |
137 | 137 | <?php |
138 | -if (isset($_REQUEST['log_submit'])) { |
|
138 | +if (isset($_REQUEST['log_submit'])) { |
|
139 | 139 | // get the selections the user made. |
140 | 140 | $sqladd = array(); |
141 | - if ($_REQUEST['searchuser'] != 0) { |
|
141 | + if ($_REQUEST['searchuser'] != 0) { |
|
142 | 142 | $sqladd[] = "internalKey='" . (int)$_REQUEST['searchuser'] . "'"; |
143 | 143 | } |
144 | - if ($_REQUEST['action'] != 0) { |
|
144 | + if ($_REQUEST['action'] != 0) { |
|
145 | 145 | $sqladd[] = "action=" . (int)$_REQUEST['action']; |
146 | 146 | } |
147 | - if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
|
147 | + if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
|
148 | 148 | $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'"; |
149 | 149 | } |
150 | - if ($_REQUEST['itemname'] != '0') { |
|
150 | + if ($_REQUEST['itemname'] != '0') { |
|
151 | 151 | $sqladd[] = "itemname='" . $modx->getDatabase()->escape($_REQUEST['itemname']) . "'"; |
152 | 152 | } |
153 | - if ($_REQUEST['message'] != "") { |
|
153 | + if ($_REQUEST['message'] != "") { |
|
154 | 154 | $sqladd[] = "message LIKE '%" . $modx->getDatabase()->escape($_REQUEST['message']) . "%'"; |
155 | 155 | } |
156 | 156 | // date stuff |
157 | - if ($_REQUEST['datefrom'] != "") { |
|
157 | + if ($_REQUEST['datefrom'] != "") { |
|
158 | 158 | $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']); |
159 | 159 | } |
160 | - if ($_REQUEST['dateto'] != "") { |
|
160 | + if ($_REQUEST['dateto'] != "") { |
|
161 | 161 | $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']); |
162 | 162 | } |
163 | 163 | |
164 | 164 | // If current position is not set, set it to zero |
165 | - if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) { |
|
165 | + if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) { |
|
166 | 166 | $int_cur_position = 0; |
167 | - } else { |
|
167 | + } else { |
|
168 | 168 | $int_cur_position = $_REQUEST['int_cur_position']; |
169 | 169 | } |
170 | 170 | |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | |
179 | 179 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}"); |
180 | 180 | |
181 | -if ($limit < 1) { |
|
181 | +if ($limit < 1) { |
|
182 | 182 | echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>'; |
183 | -} else { |
|
183 | +} else { |
|
184 | 184 | echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>'; |
185 | 185 | |
186 | 186 | // New instance of the Paging class, you can modify the color and the width of the html table |
@@ -198,14 +198,14 @@ discard block |
||
198 | 198 | $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " "); |
199 | 199 | $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " "); |
200 | 200 | $pagesfound = sizeof($array_row_paging); |
201 | - if ($pagesfound > 6) { |
|
201 | + if ($pagesfound > 6) { |
|
202 | 202 | $paging .= $array_row_paging[$current_row - 2]; // ." "; |
203 | 203 | $paging .= $array_row_paging[$current_row - 1]; // ." "; |
204 | 204 | $paging .= $array_row_paging[$current_row]; // ." "; |
205 | 205 | $paging .= $array_row_paging[$current_row + 1]; // ." "; |
206 | 206 | $paging .= $array_row_paging[$current_row + 2]; // ." "; |
207 | - } else { |
|
208 | - for ($i = 0; $i < $pagesfound; $i++) { |
|
207 | + } else { |
|
208 | + for ($i = 0; $i < $pagesfound; $i++) { |
|
209 | 209 | $paging .= $array_row_paging[$i] . " "; |
210 | 210 | } |
211 | 211 | } |
@@ -242,12 +242,12 @@ discard block |
||
242 | 242 | // grab the entire log file... |
243 | 243 | $logentries = array(); |
244 | 244 | $i = 0; |
245 | - while ($logentry = $modx->getDatabase()->getRow($rs)) { |
|
246 | - if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
|
245 | + while ($logentry = $modx->getDatabase()->getRow($rs)) { |
|
246 | + if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
|
247 | 247 | $item = '<div style="text-align:center;">-</div>'; |
248 | - } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
|
248 | + } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
|
249 | 249 | $item = '<a href="index.php?a=3&id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>'; |
250 | - } else { |
|
250 | + } else { |
|
251 | 251 | $item = $logentry['itemname']; |
252 | 252 | } |
253 | 253 | //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true' |
@@ -284,6 +284,6 @@ discard block |
||
284 | 284 | // @see index.php @ 915 |
285 | 285 | global $action; |
286 | 286 | $action = 1; |
287 | -} else { |
|
287 | +} else { |
|
288 | 288 | echo $_lang["mgrlog_noquery"]; |
289 | 289 | } |
@@ -82,23 +82,23 @@ discard block |
||
82 | 82 | <?php |
83 | 83 | |
84 | 84 | $currentCategory = ''; |
85 | - while ($row = $modx->getDatabase()->getRow($rs)) { |
|
85 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
86 | 86 | $thisCategory = $row['category']; |
87 | - if($thisCategory == null) { |
|
87 | + if($thisCategory == null) { |
|
88 | 88 | $thisCategory = $_lang['no_category']; |
89 | 89 | } |
90 | - if($thisCategory != $currentCategory) { |
|
91 | - if($closeOptGroup) { |
|
90 | + if($thisCategory != $currentCategory) { |
|
91 | + if($closeOptGroup) { |
|
92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
93 | 93 | } |
94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
95 | 95 | $closeOptGroup = true; |
96 | - } else { |
|
96 | + } else { |
|
97 | 97 | $closeOptGroup = false; |
98 | 98 | } |
99 | 99 | |
100 | 100 | $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : ''; |
101 | - if ($selectedtext) { |
|
101 | + if ($selectedtext) { |
|
102 | 102 | $oldTmpId = $row['id']; |
103 | 103 | $oldTmpName = $row['templatename']; |
104 | 104 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n"; |
107 | 107 | $currentCategory = $thisCategory; |
108 | 108 | } |
109 | - if($thisCategory != '') { |
|
109 | + if($thisCategory != '') { |
|
110 | 110 | echo "\t\t\t\t\t</optgroup>\n"; |
111 | 111 | } |
112 | 112 | ?> |
@@ -138,11 +138,12 @@ discard block |
||
138 | 138 | $modx->getDatabase()->select('id', '[+prefix+]site_plugins', |
139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
140 | 140 | ); |
141 | - if($count) { |
|
141 | + if($count) { |
|
142 | 142 | $disabledFilters = 1; |
143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; |
144 | - } |
|
145 | - else $disabledFilters = false; |
|
144 | + } else { |
|
145 | + $disabledFilters = false; |
|
146 | + } |
|
146 | 147 | ?> |
147 | 148 | <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br /> |
148 | 149 | <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?> |
@@ -204,7 +205,7 @@ discard block |
||
204 | 205 | <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5"> |
205 | 206 | <?php |
206 | 207 | $ct = explode(",",$custom_contenttype); |
207 | - for($i=0;$i<count($ct);$i++) { |
|
208 | + for($i=0;$i<count($ct);$i++) { |
|
208 | 209 | echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>"; |
209 | 210 | } |
210 | 211 | ?> |
@@ -259,7 +260,7 @@ discard block |
||
259 | 260 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
260 | 261 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
261 | 262 | <?php |
262 | - for($i=-24; $i<25; $i++) { |
|
263 | + for($i=-24; $i<25; $i++) { |
|
263 | 264 | $seconds = $i*60*60; |
264 | 265 | $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
265 | 266 | ?> |
@@ -301,7 +302,9 @@ discard block |
||
301 | 302 | <?php |
302 | 303 | // invoke OnSiteSettingsRender event |
303 | 304 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender'); |
304 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
305 | + if(is_array($evtOut)) { |
|
306 | + echo implode("",$evtOut); |
|
307 | + } |
|
305 | 308 | ?> |
306 | 309 | </td> |
307 | 310 | </tr> |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
3 | + if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
4 | 4 | $valid_hostnames = $_SERVER['HTTP_HOST']; |
5 | - } else { |
|
5 | + } else { |
|
6 | 6 | $valid_hostnames = $MODX_SITE_HOSTNAMES; |
7 | 7 | } |
8 | 8 | ?> |
@@ -157,7 +157,9 @@ discard block |
||
157 | 157 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
158 | 158 | <td> |
159 | 159 | <?php |
160 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
160 | +if(empty($pwd_hash_algo)) { |
|
161 | + $phm['sel']['UNCRYPT'] = 1; |
|
162 | +} |
|
161 | 163 | $phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0:1; |
162 | 164 | $phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0:1; |
163 | 165 | $phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0:1; |
@@ -186,7 +188,9 @@ discard block |
||
186 | 188 | ?> |
187 | 189 | <?php |
188 | 190 | $gdAvailable = extension_loaded('gd'); |
189 | -if(!$gdAvailable) $use_captcha = 0; |
|
191 | +if(!$gdAvailable) { |
|
192 | + $use_captcha = 0; |
|
193 | +} |
|
190 | 194 | ?> |
191 | 195 | <tr> |
192 | 196 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
@@ -226,7 +230,9 @@ discard block |
||
226 | 230 | <?php |
227 | 231 | // invoke OnMiscSettingsRender event |
228 | 232 | $evtOut = $modx->invokeEvent('OnSecuritySettingsRender'); |
229 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
233 | + if(is_array($evtOut)) { |
|
234 | + echo implode("",$evtOut); |
|
235 | + } |
|
230 | 236 | ?> |
231 | 237 | </td> |
232 | 238 | </tr> |
@@ -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; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0)); |
31 | -if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
31 | +if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
32 | 32 | $cm->addSeparator(); |
33 | 33 | } |
34 | 34 | $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['actions_edit'], (!$modx->hasPermission('edit_module') ? 1 : 0)); |
@@ -107,21 +107,21 @@ discard block |
||
107 | 107 | <div class="tab-page"> |
108 | 108 | <div class="table-responsive"> |
109 | 109 | <?php |
110 | - if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
110 | + if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
111 | 111 | $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 |
112 | 112 | FROM ' . $modx->getFullTableName('site_modules') . ' AS sm |
113 | 113 | LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id |
114 | 114 | LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group |
115 | 115 | WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
116 | 116 | ORDER BY sm.name'); |
117 | - if ($modx->hasPermission('edit_module')) { |
|
117 | + if ($modx->hasPermission('edit_module')) { |
|
118 | 118 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
119 | - } else if ($modx->hasPermission('exec_module')) { |
|
119 | + } else if ($modx->hasPermission('exec_module')) { |
|
120 | 120 | $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
121 | - } else { |
|
121 | + } else { |
|
122 | 122 | $title = '[+value+]'; |
123 | 123 | } |
124 | - } else { |
|
124 | + } else { |
|
125 | 125 | $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"); |
126 | 126 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
127 | 127 | } |
@@ -137,10 +137,10 @@ discard block |
||
137 | 137 | $grd->colWidths = "34,,,60,60"; |
138 | 138 | $grd->colAligns = "center,,,center,center"; |
139 | 139 | $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; |
140 | - if ($listmode == '1') { |
|
140 | + if ($listmode == '1') { |
|
141 | 141 | $grd->pageSize = 0; |
142 | 142 | } |
143 | - if ($_REQUEST['op'] == 'reset') { |
|
143 | + if ($_REQUEST['op'] == 'reset') { |
|
144 | 144 | $grd->pageNumber = 1; |
145 | 145 | } |
146 | 146 | // render grid |
@@ -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('view_eventlog')) { |
|
5 | +if(!$modx->hasPermission('view_eventlog')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | $modx->getManagerApi()->initPageViewState(); |
16 | 16 | |
17 | 17 | // get and save search string |
18 | -if($_REQUEST['op'] == 'reset') { |
|
18 | +if($_REQUEST['op'] == 'reset') { |
|
19 | 19 | $sqlQuery = $query = ''; |
20 | 20 | $_PAGE['vs']['search'] = ''; |
21 | -} else { |
|
21 | +} else { |
|
22 | 22 | $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
23 | - if(!is_numeric($sqlQuery)) { |
|
23 | + if(!is_numeric($sqlQuery)) { |
|
24 | 24 | $sqlQuery = $modx->getDatabase()->escape($query); |
25 | 25 | } |
26 | 26 | $_PAGE['vs']['search'] = $query; |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | $grd->colWidths = "1%,,1%,1%,1%"; |
144 | 144 | $grd->colAligns = "center,,,center,center"; |
145 | 145 | $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
146 | - if($listmode == '1') { |
|
146 | + if($listmode == '1') { |
|
147 | 147 | $grd->pageSize = 0; |
148 | 148 | } |
149 | - if($_REQUEST['op'] == 'reset') { |
|
149 | + if($_REQUEST['op'] == 'reset') { |
|
150 | 150 | $grd->pageNumber = 1; |
151 | 151 | } |
152 | 152 | // render grid |
@@ -12,7 +12,7 @@ |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | -if($_SESSION['mgrRole']!=1){ |
|
15 | +if($_SESSION['mgrRole']!=1) { |
|
16 | 16 | $rs = $modx->getDatabase()->select( |
17 | 17 | 'sma.usergroup,mg.member', |
18 | 18 | $modx->getFullTableName("site_module_access")." sma |
@@ -4,7 +4,9 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | if(!isset($_GET['id'])) { |
7 | - if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | + if(!$modx->hasPermission('remove_locks')) { |
|
8 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | + } |
|
8 | 10 | |
9 | 11 | // Remove all locks |
10 | 12 | $modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks')); |
@@ -11,13 +11,13 @@ |
||
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
14 | -if($id==1){ |
|
14 | +if($id==1) { |
|
15 | 15 | $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!"); |
16 | 16 | } |
17 | 17 | |
18 | 18 | $rs = $modx->getDatabase()->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'"); |
19 | 19 | $count=$modx->getDatabase()->getValue($rs); |
20 | -if($count>0){ |
|
20 | +if($count>0) { |
|
21 | 21 | $modx->webAlertAndQuit("There are users with this role. It can't be deleted."); |
22 | 22 | } |
23 | 23 |