Completed
Push — develop ( 923a1c...1e9876 )
by Maxim
47s queued 29s
created
manager/actions/user_management.static.php 2 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('edit_user')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 // initialize page view state - the $_PAGE object
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 
12 12
 // get and save search string
13 13
 if($_REQUEST['op'] == 'reset') {
14
-	$query = '';
15
-	$_PAGE['vs']['search'] = '';
14
+    $query = '';
15
+    $_PAGE['vs']['search'] = '';
16 16
 } else {
17
-	$query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18
-	$sqlQuery = $modx->db->escape($query);
19
-	$_PAGE['vs']['search'] = $query;
17
+    $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18
+    $sqlQuery = $modx->db->escape($query);
19
+    $_PAGE['vs']['search'] = $query;
20 20
 }
21 21
 
22 22
 // get & save listmode
@@ -120,55 +120,55 @@  discard block
 block discarded – undo
120 120
 			<div class="row">
121 121
 				<div class="table-responsive">
122 122
 					<?php
123
-					$where = "";
124
-					if(!$modx->hasPermission('save_role')) {
125
-						$where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
126
-					}
127
-					if(!empty($sqlQuery)) {
128
-						$where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
129
-					}
130
-					$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu 
123
+                    $where = "";
124
+                    if(!$modx->hasPermission('save_role')) {
125
+                        $where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
126
+                    }
127
+                    if(!empty($sqlQuery)) {
128
+                        $where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
129
+                    }
130
+                    $ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu 
131 131
 			INNER JOIN " . $modx->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id 
132 132
 			LEFT JOIN " . $modx->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
133
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
134
-					$grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
135
-					$grd->noRecordMsg = $_lang["no_records_found"];
136
-					$grd->cssClass = "table data";
137
-					$grd->columnHeaderClass = "tableHeader";
138
-					$grd->itemClass = "tableItem";
139
-					$grd->altItemClass = "tableAltItem";
140
-					$grd->fields = "id,username,fullname,role,email,gender,blocked,thislogin";
141
-					$grd->columns = implode(',', array(
142
-						$_lang["icon"],
143
-						$_lang["name"],
144
-						$_lang["user_full_name"],
145
-						$_lang['role'],
146
-						$_lang["email"],
147
-						$_lang["user_gender"],
148
-						$_lang["user_block"],
149
-						$_lang["login_button"]
150
-					));
151
-					$grd->colWidths = "1%,,,,,,1%,1%";
152
-					$grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap";
153
-					$grd->colTypes = implode('||', array(
154
-						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
155
-						'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
156
-						'template:[+fullname+]',
157
-						'template:[+role+]',
158
-						'template:[+email+]',
159
-						'template:[+gender+]',
160
-						'template:[+blocked+]',
161
-						'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M'
162
-					));
163
-					if($listmode == '1') {
164
-						$grd->pageSize = 0;
165
-					}
166
-					if($_REQUEST['op'] == 'reset') {
167
-						$grd->pageNumber = 1;
168
-					}
169
-					// render grid
170
-					echo $grd->render();
171
-					?>
133
+                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
134
+                    $grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
135
+                    $grd->noRecordMsg = $_lang["no_records_found"];
136
+                    $grd->cssClass = "table data";
137
+                    $grd->columnHeaderClass = "tableHeader";
138
+                    $grd->itemClass = "tableItem";
139
+                    $grd->altItemClass = "tableAltItem";
140
+                    $grd->fields = "id,username,fullname,role,email,gender,blocked,thislogin";
141
+                    $grd->columns = implode(',', array(
142
+                        $_lang["icon"],
143
+                        $_lang["name"],
144
+                        $_lang["user_full_name"],
145
+                        $_lang['role'],
146
+                        $_lang["email"],
147
+                        $_lang["user_gender"],
148
+                        $_lang["user_block"],
149
+                        $_lang["login_button"]
150
+                    ));
151
+                    $grd->colWidths = "1%,,,,,,1%,1%";
152
+                    $grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap";
153
+                    $grd->colTypes = implode('||', array(
154
+                        'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
155
+                        'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
156
+                        'template:[+fullname+]',
157
+                        'template:[+role+]',
158
+                        'template:[+email+]',
159
+                        'template:[+gender+]',
160
+                        'template:[+blocked+]',
161
+                        'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M'
162
+                    ));
163
+                    if($listmode == '1') {
164
+                        $grd->pageSize = 0;
165
+                    }
166
+                    if($_REQUEST['op'] == 'reset') {
167
+                        $grd->pageNumber = 1;
168
+                    }
169
+                    // render grid
170
+                    echo $grd->render();
171
+                    ?>
172 172
 				</div>
173 173
 			</div>
174 174
 		</div>
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (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('edit_user')) {
5
+if (!$modx->hasPermission('edit_user')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 $modx->manager->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 16
 } else {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 
27 27
 // context menu
28
-include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
28
+include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php";
29 29
 $cm = new ContextMenu("cntxm", 150);
30 30
 $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0));
31 31
 $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0));
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
 				<div class="table-responsive">
122 122
 					<?php
123 123
 					$where = "";
124
-					if(!$modx->hasPermission('save_role')) {
125
-						$where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
124
+					if (!$modx->hasPermission('save_role')) {
125
+						$where .= (empty($where) ? "" : " AND ")."mua.role != 1";
126 126
 					}
127
-					if(!empty($sqlQuery)) {
128
-						$where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
127
+					if (!empty($sqlQuery)) {
128
+						$where .= (empty($where) ? "" : " AND ")."((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
129 129
 					}
130
-					$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu 
131
-			INNER JOIN " . $modx->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id 
132
-			LEFT JOIN " . $modx->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
133
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
130
+					$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users')." AS mu 
131
+			INNER JOIN " . $modx->getFullTableName('user_attributes')." AS mua ON mua.internalKey=mu.id 
132
+			LEFT JOIN " . $modx->getFullTableName('user_roles')." AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
133
+					include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
134 134
 					$grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
135 135
 					$grd->noRecordMsg = $_lang["no_records_found"];
136 136
 					$grd->cssClass = "table data";
@@ -151,19 +151,19 @@  discard block
 block discarded – undo
151 151
 					$grd->colWidths = "1%,,,,,,1%,1%";
152 152
 					$grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap";
153 153
 					$grd->colTypes = implode('||', array(
154
-						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
155
-						'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
154
+						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="'.$_lang['click_to_context'].'"><i class="'.$_style['icons_user'].'"></i></a>',
155
+						'template:<a href="index.php?a=12&id=[+id+]" title="'.$_lang['click_to_edit_title'].'">[+value+]</a>',
156 156
 						'template:[+fullname+]',
157 157
 						'template:[+role+]',
158 158
 						'template:[+email+]',
159 159
 						'template:[+gender+]',
160 160
 						'template:[+blocked+]',
161
-						'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M'
161
+						'date: '.$modx->toDateFormat('[+thislogin+]', 'formatOnly').' %H:%M'
162 162
 					));
163
-					if($listmode == '1') {
163
+					if ($listmode == '1') {
164 164
 						$grd->pageSize = 0;
165 165
 					}
166
-					if($_REQUEST['op'] == 'reset') {
166
+					if ($_REQUEST['op'] == 'reset') {
167 167
 						$grd->pageNumber = 1;
168 168
 					}
169 169
 					// render grid
Please login to merge, or discard this patch.
manager/actions/logging.static.php 2 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                             $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username');
66 66
                             foreach ($logs_user as $row) {
67 67
                                 $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : '';
68
-                                echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n";
68
+                                echo "\t\t".'<option value="'.$row['internalKey'].'"'.$selectedtext.'>'.$row['username']."</option>\n";
69 69
                             }
70 70
                             ?>
71 71
                         </select>
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                                     continue;
87 87
                                 }
88 88
                                 $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : '';
89
-                                echo "\t\t" . '<option value="' . $row['action'] . '"' . $selectedtext . '>' . $row['action'] . ' - ' . $action . "</option>\n";
89
+                                echo "\t\t".'<option value="'.$row['action'].'"'.$selectedtext.'>'.$row['action'].' - '.$action."</option>\n";
90 90
                             }
91 91
                             ?>
92 92
                         </select>
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                             $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid');
103 103
                             foreach ($logs_items as $row) {
104 104
                                 $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : '';
105
-                                echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n";
105
+                                echo "\t\t".'<option value="'.$row['itemid'].'"'.$selectedtext.'>'.$row['itemid']."</option>\n";
106 106
                             }
107 107
                             ?>
108 108
                         </select>
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                             $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname');
119 119
                             foreach ($logs_names as $row) {
120 120
                                 $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : '';
121
-                                echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n";
121
+                                echo "\t\t".'<option value="'.$row['itemname'].'"'.$selectedtext.'>'.$row['itemname']."</option>\n";
122 122
                             }
123 123
                             ?>
124 124
                         </select>
@@ -176,26 +176,26 @@  discard block
 block discarded – undo
176 176
     // get the selections the user made.
177 177
     $sqladd = array();
178 178
     if ($_REQUEST['searchuser'] != 0) {
179
-        $sqladd[] = "internalKey='" . intval($_REQUEST['searchuser']) . "'";
179
+        $sqladd[] = "internalKey='".intval($_REQUEST['searchuser'])."'";
180 180
     }
181 181
     if ($_REQUEST['action'] != 0) {
182
-        $sqladd[] = "action=" . intval($_REQUEST['action']);
182
+        $sqladd[] = "action=".intval($_REQUEST['action']);
183 183
     }
184 184
     if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
185
-        $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'";
185
+        $sqladd[] = "itemid='".$_REQUEST['itemid']."'";
186 186
     }
187 187
     if ($_REQUEST['itemname'] != '0') {
188
-        $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'";
188
+        $sqladd[] = "itemname='".$modx->db->escape($_REQUEST['itemname'])."'";
189 189
     }
190 190
     if ($_REQUEST['message'] != "") {
191
-        $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'";
191
+        $sqladd[] = "message LIKE '%".$modx->db->escape($_REQUEST['message'])."%'";
192 192
     }
193 193
     // date stuff
194 194
     if ($_REQUEST['datefrom'] != "") {
195
-        $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']);
195
+        $sqladd[] = "timestamp>".$modx->toTimeStamp($_REQUEST['datefrom']);
196 196
     }
197 197
     if ($_REQUEST['dateto'] != "") {
198
-        $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']);
198
+        $sqladd[] = "timestamp<".$modx->toTimeStamp($_REQUEST['dateto']);
199 199
     }
200 200
 
201 201
     // If current position is not set, set it to zero
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     // Number of result to display on the page, will be in the LIMIT of the sql query also
209 209
     $int_num_result = is_numeric($_REQUEST['nrresults']) ? $_REQUEST['nrresults'] : $number_of_logs;
210 210
 
211
-    $extargv = "&a=13&searchuser=" . $_REQUEST['searchuser'] . "&action=" . $_REQUEST['action'] . "&itemid=" . $_REQUEST['itemid'] . "&itemname=" . $_REQUEST['itemname'] . "&message=" . $_REQUEST['message'] . "&dateto=" . $_REQUEST['dateto'] . "&datefrom=" . $_REQUEST['datefrom'] . "&nrresults=" . $int_num_result . "&log_submit=" . $_REQUEST['log_submit']; // extra argv here (could be anything depending on your page)
211
+    $extargv = "&a=13&searchuser=".$_REQUEST['searchuser']."&action=".$_REQUEST['action']."&itemid=".$_REQUEST['itemid']."&itemname=".$_REQUEST['itemname']."&message=".$_REQUEST['message']."&dateto=".$_REQUEST['dateto']."&datefrom=".$_REQUEST['datefrom']."&nrresults=".$int_num_result."&log_submit=".$_REQUEST['log_submit']; // extra argv here (could be anything depending on your page)
212 212
 
213 213
     // build the sql
214 214
     $limit = $num_rows = $modx->db->getValue($modx->db->select('COUNT(*)', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : '')));
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
     $rs = $modx->db->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}");
217 217
 
218 218
 if ($limit < 1) {
219
-    echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>';
219
+    echo '<p>'.$_lang["mgrlog_emptysrch"].'</p>';
220 220
 } else {
221
-    echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>';
221
+    echo '<p>'.$_lang["mgrlog_sortinst"].'</p>';
222 222
 
223 223
     include_once "paginate.inc.php";
224 224
     // New instance of the Paging class, you can modify the color and the width of the html table
@@ -230,11 +230,11 @@  discard block
 block discarded – undo
230 230
     $current_row = $int_cur_position / $int_num_result;
231 231
 
232 232
     // Display the result as you like...
233
-    print "<p>" . $_lang["paging_showing"] . " " . $array_paging['lower'];
234
-    print " " . $_lang["paging_to"] . " " . $array_paging['upper'];
235
-    print " (" . $array_paging['total'] . " " . $_lang["paging_total"] . ")<br />";
236
-    $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " ");
237
-    $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " ");
233
+    print "<p>".$_lang["paging_showing"]." ".$array_paging['lower'];
234
+    print " ".$_lang["paging_to"]." ".$array_paging['upper'];
235
+    print " (".$array_paging['total']." ".$_lang["paging_total"].")<br />";
236
+    $paging = $array_paging['first_link'].$_lang["paging_first"].(isset($array_paging['first_link']) ? "</a> " : " ");
237
+    $paging .= $array_paging['previous_link'].$_lang["paging_prev"].(isset($array_paging['previous_link']) ? "</a> " : " ");
238 238
     $pagesfound = sizeof($array_row_paging);
239 239
     if ($pagesfound > 6) {
240 240
         $paging .= $array_row_paging[$current_row - 2]; // ."&nbsp;";
@@ -244,11 +244,11 @@  discard block
 block discarded – undo
244 244
         $paging .= $array_row_paging[$current_row + 2]; // ."&nbsp;";
245 245
     } else {
246 246
         for ($i = 0; $i < $pagesfound; $i++) {
247
-            $paging .= $array_row_paging[$i] . "&nbsp;";
247
+            $paging .= $array_row_paging[$i]."&nbsp;";
248 248
         }
249 249
     }
250
-    $paging .= $array_paging['next_link'] . $_lang["paging_next"] . (isset($array_paging['next_link']) ? "</a> " : " ") . " ";
251
-    $paging .= $array_paging['last_link'] . $_lang["paging_last"] . (isset($array_paging['last_link']) ? "</a> " : " ") . " ";
250
+    $paging .= $array_paging['next_link'].$_lang["paging_next"].(isset($array_paging['next_link']) ? "</a> " : " ")." ";
251
+    $paging .= $array_paging['last_link'].$_lang["paging_last"].(isset($array_paging['last_link']) ? "</a> " : " ")." ";
252 252
     // The above exemple print somethings like:
253 253
     // Results 1 to 20 of 597  <<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 >>>
254 254
     // Of course you can now play with array_row_paging in order to print
@@ -282,16 +282,16 @@  discard block
 block discarded – undo
282 282
                     if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
283 283
                         $item = '<div style="text-align:center;">-</div>';
284 284
                     } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
285
-                        $item = '<a href="index.php?a=3&amp;id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>';
285
+                        $item = '<a href="index.php?a=3&amp;id='.$logentry['itemid'].'">'.$logentry['itemname'].'</a>';
286 286
                     } else {
287 287
                         $item = $logentry['itemname'];
288 288
                     }
289 289
                     //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true'
290
-                    $user_drill = 'index.php?a=13&searchuser=' . $logentry['internalKey'] . '&itemname=0&log_submit=true';
290
+                    $user_drill = 'index.php?a=13&searchuser='.$logentry['internalKey'].'&itemname=0&log_submit=true';
291 291
                     ?>
292 292
                     <tr>
293
-                        <td><?= '<a href="' . $user_drill . '">' . $logentry['username'] . '</a>' ?></td>
294
-                        <td class="text-nowrap"><?= '[' . $logentry['action'] . '] ' . $logentry['message'] ?></td>
293
+                        <td><?= '<a href="'.$user_drill.'">'.$logentry['username'].'</a>' ?></td>
294
+                        <td class="text-nowrap"><?= '['.$logentry['action'].'] '.$logentry['message'] ?></td>
295 295
                         <td class="text-xs-right"><?= $logentry['itemid'] ?></td>
296 296
                         <td><?= $item ?></td>
297 297
                         <td class="text-nowrap"><?= $modx->toDateFormat($logentry['timestamp'] + $server_offset_time) ?></td>
Please login to merge, or discard this patch.
Braces   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (IN_MANAGER_MODE != "true") {
2
+if (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
 
9
-function array_unique_multi($array, $checkKey)
10
-{
9
+function array_unique_multi($array, $checkKey)
10
+{
11 11
     // Use the builtin if we're not a multi-dimensional array
12
-    if (!is_array(current($array)) || empty($checkKey)) {
12
+    if (!is_array(current($array)) || empty($checkKey)) {
13 13
         return array_unique($array);
14 14
     }
15 15
 
16 16
     $ret = array();
17 17
     $checkValues = array(); // contains the unique key Values
18
-    foreach ($array as $key => $current) {
19
-        if (in_array($current[$checkKey], $checkValues)) {
18
+    foreach ($array as $key => $current) {
19
+        if (in_array($current[$checkKey], $checkValues)) {
20 20
             continue;
21 21
         } // duplicate
22 22
 
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
     return $ret;
27 27
 }
28 28
 
29
-function record_sort($array, $key)
30
-{
29
+function record_sort($array, $key)
30
+{
31 31
     $hash = array();
32
-    foreach ($array as $k => $v) {
32
+    foreach ($array as $k => $v) {
33 33
         $hash[$k] = $v[$key];
34 34
     }
35 35
 
36 36
     natsort($hash);
37 37
 
38 38
     $records = array();
39
-    foreach ($hash as $k => $row) {
39
+    foreach ($hash as $k => $row) {
40 40
         $records[$k] = $array[$k];
41 41
     }
42 42
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                             <?php
64 64
                             // get all users currently in the log
65 65
                             $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username');
66
-                            foreach ($logs_user as $row) {
66
+                            foreach ($logs_user as $row) {
67 67
                                 $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : '';
68 68
                                 echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n";
69 69
                             }
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
                             // get all available actions in the log
81 81
                             include_once "actionlist.inc.php";
82 82
                             $logs_actions = record_sort(array_unique_multi($logs, 'action'), 'action');
83
-                            foreach ($logs_actions as $row) {
83
+                            foreach ($logs_actions as $row) {
84 84
                                 $action = getAction($row['action']);
85
-                                if ($action == 'Idle') {
85
+                                if ($action == 'Idle') {
86 86
                                     continue;
87 87
                                 }
88 88
                                 $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : '';
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                             <?php
101 101
                             // get all itemid currently in logging
102 102
                             $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid');
103
-                            foreach ($logs_items as $row) {
103
+                            foreach ($logs_items as $row) {
104 104
                                 $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : '';
105 105
                                 echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n";
106 106
                             }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                             <?php
117 117
                             // get all itemname currently in logging
118 118
                             $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname');
119
-                            foreach ($logs_names as $row) {
119
+                            foreach ($logs_names as $row) {
120 120
                                 $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : '';
121 121
                                 echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n";
122 122
                             }
@@ -172,36 +172,36 @@  discard block
 block discarded – undo
172 172
     <div class="container container-body">
173 173
 
174 174
 <?php
175
-if (isset($_REQUEST['log_submit'])) {
175
+if (isset($_REQUEST['log_submit'])) {
176 176
     // get the selections the user made.
177 177
     $sqladd = array();
178
-    if ($_REQUEST['searchuser'] != 0) {
178
+    if ($_REQUEST['searchuser'] != 0) {
179 179
         $sqladd[] = "internalKey='" . intval($_REQUEST['searchuser']) . "'";
180 180
     }
181
-    if ($_REQUEST['action'] != 0) {
181
+    if ($_REQUEST['action'] != 0) {
182 182
         $sqladd[] = "action=" . intval($_REQUEST['action']);
183 183
     }
184
-    if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
184
+    if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
185 185
         $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'";
186 186
     }
187
-    if ($_REQUEST['itemname'] != '0') {
187
+    if ($_REQUEST['itemname'] != '0') {
188 188
         $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'";
189 189
     }
190
-    if ($_REQUEST['message'] != "") {
190
+    if ($_REQUEST['message'] != "") {
191 191
         $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'";
192 192
     }
193 193
     // date stuff
194
-    if ($_REQUEST['datefrom'] != "") {
194
+    if ($_REQUEST['datefrom'] != "") {
195 195
         $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']);
196 196
     }
197
-    if ($_REQUEST['dateto'] != "") {
197
+    if ($_REQUEST['dateto'] != "") {
198 198
         $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']);
199 199
     }
200 200
 
201 201
     // If current position is not set, set it to zero
202
-    if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
202
+    if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
203 203
         $int_cur_position = 0;
204
-    } else {
204
+    } else {
205 205
         $int_cur_position = $_REQUEST['int_cur_position'];
206 206
     }
207 207
 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
 
216 216
     $rs = $modx->db->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}");
217 217
 
218
-if ($limit < 1) {
218
+if ($limit < 1) {
219 219
     echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>';
220
-} else {
220
+} else {
221 221
     echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>';
222 222
 
223 223
     include_once "paginate.inc.php";
@@ -236,14 +236,14 @@  discard block
 block discarded – undo
236 236
     $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " ");
237 237
     $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " ");
238 238
     $pagesfound = sizeof($array_row_paging);
239
-    if ($pagesfound > 6) {
239
+    if ($pagesfound > 6) {
240 240
         $paging .= $array_row_paging[$current_row - 2]; // ."&nbsp;";
241 241
         $paging .= $array_row_paging[$current_row - 1]; // ."&nbsp;";
242 242
         $paging .= $array_row_paging[$current_row]; // ."&nbsp;";
243 243
         $paging .= $array_row_paging[$current_row + 1]; // ."&nbsp;";
244 244
         $paging .= $array_row_paging[$current_row + 2]; // ."&nbsp;";
245
-    } else {
246
-        for ($i = 0; $i < $pagesfound; $i++) {
245
+    } else {
246
+        for ($i = 0; $i < $pagesfound; $i++) {
247 247
             $paging .= $array_row_paging[$i] . "&nbsp;";
248 248
         }
249 249
     }
@@ -278,12 +278,12 @@  discard block
 block discarded – undo
278 278
                 // grab the entire log file...
279 279
                 $logentries = array();
280 280
                 $i = 0;
281
-                while ($logentry = $modx->db->getRow($rs)) {
282
-                    if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
281
+                while ($logentry = $modx->db->getRow($rs)) {
282
+                    if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
283 283
                         $item = '<div style="text-align:center;">-</div>';
284
-                    } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
284
+                    } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
285 285
                         $item = '<a href="index.php?a=3&amp;id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>';
286
-                    } else {
286
+                    } else {
287 287
                         $item = $logentry['itemname'];
288 288
                     }
289 289
                     //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true'
@@ -318,6 +318,6 @@  discard block
 block discarded – undo
318 318
     // @see index.php @ 915
319 319
     global $action;
320 320
     $action = 1;
321
-} else {
321
+} else {
322 322
     echo $_lang["mgrlog_noquery"];
323 323
 }
Please login to merge, or discard this patch.
manager/actions/resource_selector.static.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 }
65 65
 
66
-include_once MODX_MANAGER_PATH . "includes/header.inc.php";
66
+include_once MODX_MANAGER_PATH."includes/header.inc.php";
67 67
 ?>
68 68
 <script language="JavaScript" type="text/javascript">
69 69
     function saveSelection()
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 </script>
139 139
 
140 140
 <h1>
141
-    <?= $title . " - " . $_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i>
141
+    <?= $title." - ".$_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i>
142 142
 </h1>
143 143
 
144 144
 <div id="actions">
@@ -177,15 +177,15 @@  discard block
 block discarded – undo
177 177
             <div class="row">
178 178
                 <div class="table-responsive">
179 179
                     <?php
180
-                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
180
+                    include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
181 181
                     $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
182 182
                     $grd->noRecordMsg = $_lang["no_records_found"];
183 183
                     $grd->cssClass = "table data nowrap";
184 184
                     $grd->columnHeaderClass = "tableHeader";
185 185
                     $grd->itemClass = "tableItem";
186 186
                     $grd->altItemClass = "tableAltItem";
187
-                    $grd->columns = $_lang["name"] . " ," . $_lang["description"];
188
-                    $grd->colTypes = "template:<input type='" . ($sm == 'm' ? 'checkbox' : 'radio') . "' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]";
187
+                    $grd->columns = $_lang["name"]." ,".$_lang["description"];
188
+                    $grd->colTypes = "template:<input type='".($sm == 'm' ? 'checkbox' : 'radio')."' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]";
189 189
                     $grd->colWidths = "45%";
190 190
                     $grd->fields = "name,description";
191 191
                     if ($_REQUEST['listmode'] == '1') {
Please login to merge, or discard this patch.
manager/actions/mutate_categories.dynamic.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,24 +2,24 @@  discard block
 block discarded – undo
2 2
 if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3 3
 
4 4
 if(!$modx->hasPermission('category_manager')) {
5
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
6 6
 }
7 7
 
8 8
 $_module_params = array(
9
-	'module_version'   => '1.0.0',
10
-	'module_params'    => '',
11
-	'module_id'        => $_GET['id'],
12
-	'package_name'     => 'Module_Categories_Manager',
13
-	'native_language'  => 'de',
14
-	'name'             => 'Categories Manager',
15
-	'dirname'          => $site_manager_url,
16
-	'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
17
-	'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
18
-	'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
19
-	'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
20
-	'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
21
-	'request_key'      => 'module_categories_manager',
22
-	'messages'         => array()
9
+    'module_version'   => '1.0.0',
10
+    'module_params'    => '',
11
+    'module_id'        => $_GET['id'],
12
+    'package_name'     => 'Module_Categories_Manager',
13
+    'native_language'  => 'de',
14
+    'name'             => 'Categories Manager',
15
+    'dirname'          => $site_manager_url,
16
+    'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
17
+    'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
18
+    'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
19
+    'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
20
+    'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
21
+    'request_key'      => 'module_categories_manager',
22
+    'messages'         => array()
23 23
 );
24 24
 
25 25
 require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php';
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // assign module_params to internal params
29 29
 foreach( $_module_params as $param => $value )
30 30
 {
31
-	$cm->set( $param, $value );
31
+    $cm->set( $param, $value );
32 32
 }
33 33
 
34 34
 // catch the request actions
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
 if( !$categories = $cm->getCategories() )
38 38
 {
39
-	setcookie('webfxtab_manage-categories-pane', 0 );
40
-	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
39
+    setcookie('webfxtab_manage-categories-pane', 0 );
40
+    $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
41 41
 }
42 42
 
43 43
 $cm->renderView('main', $categories );
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
2
+if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3 3
 
4
-if(!$modx->hasPermission('category_manager')) {
4
+if (!$modx->hasPermission('category_manager')) {
5 5
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6 6
 }
7 7
 
@@ -13,32 +13,32 @@  discard block
 block discarded – undo
13 13
 	'native_language'  => 'de',
14 14
 	'name'             => 'Categories Manager',
15 15
 	'dirname'          => $site_manager_url,
16
-	'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
17
-	'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
18
-	'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
19
-	'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
20
-	'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
16
+	'url'              => 'index.php?a=120&amp;id='.$_GET['id'],
17
+	'path'             => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR,
18
+	'inc_dir'          => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR,
19
+	'languages_dir'    => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR,
20
+	'views_dir'        => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR,
21 21
 	'request_key'      => 'module_categories_manager',
22 22
 	'messages'         => array()
23 23
 );
24 24
 
25
-require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php';
25
+require_once $_module_params['inc_dir'].'Module_Categories_Manager.php';
26 26
 $cm = new Module_Categories_Manager();
27 27
 
28 28
 // assign module_params to internal params
29
-foreach( $_module_params as $param => $value )
29
+foreach ($_module_params as $param => $value)
30 30
 {
31
-	$cm->set( $param, $value );
31
+	$cm->set($param, $value);
32 32
 }
33 33
 
34 34
 // catch the request actions
35
-include_once $cm->get('inc_dir') . 'request_trigger.inc.php';
35
+include_once $cm->get('inc_dir').'request_trigger.inc.php';
36 36
 
37
-if( !$categories = $cm->getCategories() )
37
+if (!$categories = $cm->getCategories())
38 38
 {
39
-	setcookie('webfxtab_manage-categories-pane', 0 );
40
-	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
39
+	setcookie('webfxtab_manage-categories-pane', 0);
40
+	$cm->addMessage($cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global');
41 41
 }
42 42
 
43
-$cm->renderView('main', $categories );
43
+$cm->renderView('main', $categories);
44 44
 return;
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
2
+if(IN_MANAGER_MODE!="true") {
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4
+}
3 5
 
4 6
 if(!$modx->hasPermission('category_manager')) {
5 7
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
@@ -26,16 +28,14 @@  discard block
 block discarded – undo
26 28
 $cm = new Module_Categories_Manager();
27 29
 
28 30
 // assign module_params to internal params
29
-foreach( $_module_params as $param => $value )
30
-{
31
+foreach( $_module_params as $param => $value ) {
31 32
 	$cm->set( $param, $value );
32 33
 }
33 34
 
34 35
 // catch the request actions
35 36
 include_once $cm->get('inc_dir') . 'request_trigger.inc.php';
36 37
 
37
-if( !$categories = $cm->getCategories() )
38
-{
38
+if( !$categories = $cm->getCategories() ) {
39 39
 	setcookie('webfxtab_manage-categories-pane', 0 );
40 40
 	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
41 41
 }
Please login to merge, or discard this patch.
manager/actions/resources.static.php 3 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
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
 if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) {
7
-	include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php');
7
+    include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php');
8 8
 } else {
9
-	include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php');
9
+    include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php');
10 10
 }
11 11
 if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) {
12
-	include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php');
12
+    include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php');
13 13
 } else {
14
-	include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php');
14
+    include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php');
15 15
 }
16 16
 
17 17
 $resources = new mgrResources();
18 18
 
19 19
 // Prepare lang-strings for "Lock Elements"
20 20
 $unlockTranslations = array(
21
-	'msg' => $_lang["unlock_element_id_warning"],
22
-	'type1' => $_lang["lock_element_type_1"],
23
-	'type2' => $_lang["lock_element_type_2"],
24
-	'type3' => $_lang["lock_element_type_3"],
25
-	'type4' => $_lang["lock_element_type_4"],
26
-	'type5' => $_lang["lock_element_type_5"],
27
-	'type6' => $_lang["lock_element_type_6"],
28
-	'type7' => $_lang["lock_element_type_7"],
29
-	'type8' => $_lang["lock_element_type_8"]
21
+    'msg' => $_lang["unlock_element_id_warning"],
22
+    'type1' => $_lang["lock_element_type_1"],
23
+    'type2' => $_lang["lock_element_type_2"],
24
+    'type3' => $_lang["lock_element_type_3"],
25
+    'type4' => $_lang["lock_element_type_4"],
26
+    'type5' => $_lang["lock_element_type_5"],
27
+    'type6' => $_lang["lock_element_type_6"],
28
+    'type7' => $_lang["lock_element_type_7"],
29
+    'type8' => $_lang["lock_element_type_8"]
30 30
 );
31 31
 foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
32 32
 
33 33
 // Prepare lang-strings for mgrResAction()
34 34
 $mraTranslations = array(
35
-	'create_new' => $_lang["create_new"],
36
-	'edit' => $_lang["edit"],
37
-	'duplicate' => $_lang["duplicate"],
38
-	'remove' => $_lang["remove"],
39
-	'confirm_duplicate_record' => $_lang["confirm_duplicate_record"],
40
-	'confirm_delete_template' => $_lang["confirm_delete_template"],
41
-	'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"],
42
-	'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"],
43
-	'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"],
44
-	'confirm_delete_plugin' => $_lang["confirm_delete_plugin"],
45
-	'confirm_delete_module' => $_lang["confirm_delete_module"],
35
+    'create_new' => $_lang["create_new"],
36
+    'edit' => $_lang["edit"],
37
+    'duplicate' => $_lang["duplicate"],
38
+    'remove' => $_lang["remove"],
39
+    'confirm_duplicate_record' => $_lang["confirm_duplicate_record"],
40
+    'confirm_delete_template' => $_lang["confirm_delete_template"],
41
+    'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"],
42
+    'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"],
43
+    'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"],
44
+    'confirm_delete_plugin' => $_lang["confirm_delete_plugin"],
45
+    'confirm_delete_module' => $_lang["confirm_delete_module"],
46 46
 );
47 47
 foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
48 48
 ?>
@@ -65,46 +65,46 @@  discard block
 block discarded – undo
65 65
 		</script>
66 66
 
67 67
 		<?php
68
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) {
69
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php');
70
-		} else {
71
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php');
72
-		}
68
+        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) {
69
+            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php');
70
+        } else {
71
+            include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php');
72
+        }
73 73
 
74
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) {
75
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php');
76
-		} else {
77
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php');
78
-		}
74
+        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) {
75
+            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php');
76
+        } else {
77
+            include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php');
78
+        }
79 79
 
80
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) {
81
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php');
82
-		} else {
83
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php');
84
-		}
80
+        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) {
81
+            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php');
82
+        } else {
83
+            include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php');
84
+        }
85 85
 
86
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) {
87
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php');
88
-		} else {
89
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php');
90
-		}
86
+        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) {
87
+            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php');
88
+        } else {
89
+            include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php');
90
+        }
91 91
 
92
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) {
93
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php');
94
-		} else {
95
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php');
96
-		}
92
+        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) {
93
+            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php');
94
+        } else {
95
+            include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php');
96
+        }
97 97
 
98
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) {
99
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php');
100
-		} else {
101
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php');
102
-		}
98
+        if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) {
99
+            include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php');
100
+        } else {
101
+            include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php');
102
+        }
103 103
 
104 104
 
105
-		if(is_numeric($_GET['tab'])) {
106
-			echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>';
107
-		}
108
-		?>
105
+        if(is_numeric($_GET['tab'])) {
106
+            echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>';
107
+        }
108
+        ?>
109 109
 	</div>
110 110
 </div>
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (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
-if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) {
7
-	include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php');
6
+if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php')) {
7
+	include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php');
8 8
 } else {
9
-	include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php');
9
+	include_once(MODX_MANAGER_PATH.'actions/resources/functions.inc.php');
10 10
 }
11
-if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) {
12
-	include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php');
11
+if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php')) {
12
+	include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php');
13 13
 } else {
14
-	include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php');
14
+	include_once(MODX_MANAGER_PATH.'actions/resources/mgrResources.class.php');
15 15
 }
16 16
 
17 17
 $resources = new mgrResources();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	'type7' => $_lang["lock_element_type_7"],
29 29
 	'type8' => $_lang["lock_element_type_8"]
30 30
 );
31
-foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
31
+foreach ($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
32 32
 
33 33
 // Prepare lang-strings for mgrResAction()
34 34
 $mraTranslations = array(
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	'confirm_delete_plugin' => $_lang["confirm_delete_plugin"],
45 45
 	'confirm_delete_module' => $_lang["confirm_delete_module"],
46 46
 );
47
-foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
47
+foreach ($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
48 48
 ?>
49 49
 <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script>
50 50
 <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script>
@@ -65,45 +65,45 @@  discard block
 block discarded – undo
65 65
 		</script>
66 66
 
67 67
 		<?php
68
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) {
69
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php');
68
+		if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php')) {
69
+			include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php');
70 70
 		} else {
71
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php');
71
+			include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php');
72 72
 		}
73 73
 
74
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) {
75
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php');
74
+		if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php')) {
75
+			include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php');
76 76
 		} else {
77
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php');
77
+			include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php');
78 78
 		}
79 79
 
80
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) {
81
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php');
80
+		if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php')) {
81
+			include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php');
82 82
 		} else {
83
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php');
83
+			include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php');
84 84
 		}
85 85
 
86
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) {
87
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php');
86
+		if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php')) {
87
+			include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php');
88 88
 		} else {
89
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php');
89
+			include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php');
90 90
 		}
91 91
 
92
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) {
93
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php');
92
+		if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php')) {
93
+			include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php');
94 94
 		} else {
95
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php');
95
+			include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php');
96 96
 		}
97 97
 
98
-		if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) {
99
-			include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php');
98
+		if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php')) {
99
+			include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php');
100 100
 		} else {
101
-			include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php');
101
+			include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php');
102 102
 		}
103 103
 
104 104
 
105
-		if(is_numeric($_GET['tab'])) {
106
-			echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>';
105
+		if (is_numeric($_GET['tab'])) {
106
+			echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>';
107 107
 		}
108 108
 		?>
109 109
 	</div>
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@  discard block
 block discarded – undo
28 28
 	'type7' => $_lang["lock_element_type_7"],
29 29
 	'type8' => $_lang["lock_element_type_8"]
30 30
 );
31
-foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
31
+foreach($unlockTranslations as $key => $value) {
32
+    $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
33
+}
32 34
 
33 35
 // Prepare lang-strings for mgrResAction()
34 36
 $mraTranslations = array(
@@ -44,7 +46,9 @@  discard block
 block discarded – undo
44 46
 	'confirm_delete_plugin' => $_lang["confirm_delete_plugin"],
45 47
 	'confirm_delete_module' => $_lang["confirm_delete_module"],
46 48
 );
47
-foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
49
+foreach($mraTranslations as $key => $value) {
50
+    $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value);
51
+}
48 52
 ?>
49 53
 <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script>
50 54
 <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script>
Please login to merge, or discard this patch.
manager/actions/site_schedule.static.php 3 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('view_eventlog')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 ?>
9 9
 <script type="text/javascript" src="media/script/tablesort.js"></script>
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
 		<div class="form-group" id="lyr1">
18 18
 			<b><?= $_lang["publish_events"] ?></b>
19 19
 			<?php
20
-			$rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC');
21
-			$limit = $modx->db->getRecordCount($rs);
22
-			if($limit < 1) {
23
-				?>
20
+            $rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC');
21
+            $limit = $modx->db->getRecordCount($rs);
22
+            if($limit < 1) {
23
+                ?>
24 24
 				<p><?= $_lang["no_docs_pending_publishing"] ?></p>
25 25
 				<?php
26
-			} else {
27
-				?>
26
+            } else {
27
+                ?>
28 28
 				<div class="table-responsive">
29 29
 					<table class="grid sortabletable" id="table-1">
30 30
 						<thead>
@@ -36,34 +36,34 @@  discard block
 block discarded – undo
36 36
 						</thead>
37 37
 						<tbody>
38 38
 						<?php
39
-						while($row = $modx->db->getRow($rs)) {
40
-							?>
39
+                        while($row = $modx->db->getRow($rs)) {
40
+                            ?>
41 41
 							<tr>
42 42
 								<td class="text-right"><?= $row['id'] ?></td>
43 43
 								<td><a href="index.php?a=3&id=<?= $row['id'] ?>"><?= $row['pagetitle'] ?></a></td>
44 44
 								<td class="text-nowrap text-right"><?= $modx->toDateFormat($row['pub_date'] + $server_offset_time) ?></td>
45 45
 							</tr>
46 46
 							<?php
47
-						}
48
-						?>
47
+                        }
48
+                        ?>
49 49
 						</tbody>
50 50
 					</table>
51 51
 				</div>
52 52
 				<?php
53
-			}
54
-			?>
53
+            }
54
+            ?>
55 55
 		</div>
56 56
 		<div class="form-group" id="lyr2">
57 57
 			<b><?= $_lang["unpublish_events"] ?></b>
58 58
 			<?php
59
-			$rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC');
60
-			$limit = $modx->db->getRecordCount($rs);
61
-			if($limit < 1) {
62
-				?>
59
+            $rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC');
60
+            $limit = $modx->db->getRecordCount($rs);
61
+            if($limit < 1) {
62
+                ?>
63 63
 				<p><?= $_lang["no_docs_pending_unpublishing"] ?></p>
64 64
 				<?php
65
-			} else {
66
-				?>
65
+            } else {
66
+                ?>
67 67
 				<div class="table-responsive">
68 68
 					<table class="grid sortabletable" id="table-2">
69 69
 						<thead>
@@ -75,34 +75,34 @@  discard block
 block discarded – undo
75 75
 						</thead>
76 76
 						<tbody>
77 77
 						<?php
78
-						while($row = $modx->db->getRow($rs)) {
79
-							?>
78
+                        while($row = $modx->db->getRow($rs)) {
79
+                            ?>
80 80
 							<tr>
81 81
 								<td class="text-right"><?= $row['id'] ?></td>
82 82
 								<td><a href="index.php?a=3&id=<?= $row['id'] ?>"><?= $row['pagetitle'] ?></a></td>
83 83
 								<td class="text-nowrap text-right"><?= $modx->toDateFormat($row['unpub_date'] + $server_offset_time) ?></td>
84 84
 							</tr>
85 85
 							<?php
86
-						}
87
-						?>
86
+                        }
87
+                        ?>
88 88
 						</tbody>
89 89
 					</table>
90 90
 				</div>
91 91
 				<?php
92
-			}
93
-			?>
92
+            }
93
+            ?>
94 94
 		</div>
95 95
 		<div class="form-group">
96 96
 			<b><?= $_lang["all_events"] ?></b>
97 97
 			<?php
98
-			$rs = $modx->db->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC");
99
-			$limit = $modx->db->getRecordCount($rs);
100
-			if($limit < 1) {
101
-				?>
98
+            $rs = $modx->db->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC");
99
+            $limit = $modx->db->getRecordCount($rs);
100
+            if($limit < 1) {
101
+                ?>
102 102
 				<p><?= $_lang["no_docs_pending_pubunpub"] ?></p>
103 103
 				<?php
104
-			} else {
105
-				?>
104
+            } else {
105
+                ?>
106 106
 				<div class="table-responsive">
107 107
 					<table class="grid sortabletable" id="table-3">
108 108
 						<thead>
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 						</thead>
116 116
 						<tbody>
117 117
 						<?php
118
-						while($row = $modx->db->getRow($rs)) {
119
-							?>
118
+                        while($row = $modx->db->getRow($rs)) {
119
+                            ?>
120 120
 							<tr>
121 121
 								<td class="text-right"><?= $row['id'] ?></td>
122 122
 								<td><a href="index.php?a=3&id=<?= $row['id'] ?>"><?= $row['pagetitle'] ?></a></td>
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
 								<td class="text-nowrap text-right"><?= $row['unpub_date'] == 0 ? "" : $modx->toDateFormat($row['unpub_date'] + $server_offset_time) ?></td>
125 125
 							</tr>
126 126
 							<?php
127
-						}
128
-						?>
127
+                        }
128
+                        ?>
129 129
 						</tbody>
130 130
 					</table>
131 131
 				</div>
132 132
 				<?php
133
-			}
134
-			?>
133
+            }
134
+            ?>
135 135
 		</div>
136 136
 	</div>
137 137
 </div>
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (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
 ?>
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 		<div class="form-group" id="lyr1">
18 18
 			<b><?= $_lang["publish_events"] ?></b>
19 19
 			<?php
20
-			$rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC');
20
+			$rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > ".time()."", 'pub_date ASC');
21 21
 			$limit = $modx->db->getRecordCount($rs);
22
-			if($limit < 1) {
22
+			if ($limit < 1) {
23 23
 				?>
24 24
 				<p><?= $_lang["no_docs_pending_publishing"] ?></p>
25 25
 				<?php
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 						</thead>
37 37
 						<tbody>
38 38
 						<?php
39
-						while($row = $modx->db->getRow($rs)) {
39
+						while ($row = $modx->db->getRow($rs)) {
40 40
 							?>
41 41
 							<tr>
42 42
 								<td class="text-right"><?= $row['id'] ?></td>
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 		<div class="form-group" id="lyr2">
57 57
 			<b><?= $_lang["unpublish_events"] ?></b>
58 58
 			<?php
59
-			$rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC');
59
+			$rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > ".time()."", 'unpub_date ASC');
60 60
 			$limit = $modx->db->getRecordCount($rs);
61
-			if($limit < 1) {
61
+			if ($limit < 1) {
62 62
 				?>
63 63
 				<p><?= $_lang["no_docs_pending_unpublishing"] ?></p>
64 64
 				<?php
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 						</thead>
76 76
 						<tbody>
77 77
 						<?php
78
-						while($row = $modx->db->getRow($rs)) {
78
+						while ($row = $modx->db->getRow($rs)) {
79 79
 							?>
80 80
 							<tr>
81 81
 								<td class="text-right"><?= $row['id'] ?></td>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			<?php
98 98
 			$rs = $modx->db->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC");
99 99
 			$limit = $modx->db->getRecordCount($rs);
100
-			if($limit < 1) {
100
+			if ($limit < 1) {
101 101
 				?>
102 102
 				<p><?= $_lang["no_docs_pending_pubunpub"] ?></p>
103 103
 				<?php
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 						</thead>
116 116
 						<tbody>
117 117
 						<?php
118
-						while($row = $modx->db->getRow($rs)) {
118
+						while ($row = $modx->db->getRow($rs)) {
119 119
 							?>
120 120
 							<tr>
121 121
 								<td class="text-right"><?= $row['id'] ?></td>
Please login to merge, or discard this patch.
Braces   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if(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
 ?>
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 			<?php
20 20
 			$rs = $modx->db->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC');
21 21
 			$limit = $modx->db->getRecordCount($rs);
22
-			if($limit < 1) {
22
+			if($limit < 1) {
23 23
 				?>
24 24
 				<p><?= $_lang["no_docs_pending_publishing"] ?></p>
25 25
 				<?php
26
-			} else {
26
+			} else {
27 27
 				?>
28 28
 				<div class="table-responsive">
29 29
 					<table class="grid sortabletable" id="table-1">
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 						</thead>
37 37
 						<tbody>
38 38
 						<?php
39
-						while($row = $modx->db->getRow($rs)) {
39
+						while($row = $modx->db->getRow($rs)) {
40 40
 							?>
41 41
 							<tr>
42 42
 								<td class="text-right"><?= $row['id'] ?></td>
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 			<?php
59 59
 			$rs = $modx->db->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC');
60 60
 			$limit = $modx->db->getRecordCount($rs);
61
-			if($limit < 1) {
61
+			if($limit < 1) {
62 62
 				?>
63 63
 				<p><?= $_lang["no_docs_pending_unpublishing"] ?></p>
64 64
 				<?php
65
-			} else {
65
+			} else {
66 66
 				?>
67 67
 				<div class="table-responsive">
68 68
 					<table class="grid sortabletable" id="table-2">
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 						</thead>
76 76
 						<tbody>
77 77
 						<?php
78
-						while($row = $modx->db->getRow($rs)) {
78
+						while($row = $modx->db->getRow($rs)) {
79 79
 							?>
80 80
 							<tr>
81 81
 								<td class="text-right"><?= $row['id'] ?></td>
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 			<?php
98 98
 			$rs = $modx->db->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC");
99 99
 			$limit = $modx->db->getRecordCount($rs);
100
-			if($limit < 1) {
100
+			if($limit < 1) {
101 101
 				?>
102 102
 				<p><?= $_lang["no_docs_pending_pubunpub"] ?></p>
103 103
 				<?php
104
-			} else {
104
+			} else {
105 105
 				?>
106 106
 				<div class="table-responsive">
107 107
 					<table class="grid sortabletable" id="table-3">
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 						</thead>
116 116
 						<tbody>
117 117
 						<?php
118
-						while($row = $modx->db->getRow($rs)) {
118
+						while($row = $modx->db->getRow($rs)) {
119 119
 							?>
120 120
 							<tr>
121 121
 								<td class="text-right"><?= $row['id'] ?></td>
Please login to merge, or discard this patch.
manager/actions/mutate_module.dynamic.php 4 patches
Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
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
 switch($modx->manager->action) {
6
-	case 107:
7
-		if(!$modx->hasPermission('new_module')) {
8
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
-		}
10
-		break;
11
-	case 108:
12
-		if(!$modx->hasPermission('edit_module')) {
13
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
14
-		}
15
-		break;
16
-	default:
17
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    case 107:
7
+        if(!$modx->hasPermission('new_module')) {
8
+            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
+        }
10
+        break;
11
+    case 108:
12
+        if(!$modx->hasPermission('edit_module')) {
13
+            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
14
+        }
15
+        break;
16
+    default:
17
+        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
18 18
 }
19 19
 $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
20 20
 // Get table names (alphabetical)
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
 $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars');
31 31
 // create globally unique identifiers (guid)
32 32
 function createGUID() {
33
-	srand((double) microtime() * 1000000);
34
-	$r = rand();
35
-	$u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1);
36
-	$m = md5($u);
37
-	return $m;
33
+    srand((double) microtime() * 1000000);
34
+    $r = rand();
35
+    $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1);
36
+    $m = md5($u);
37
+    return $m;
38 38
 }
39 39
 
40 40
 // check to see the module editor isn't locked
41 41
 if($lockedEl = $modx->elementIsLocked(6, $id)) {
42
-	$modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module']));
42
+    $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module']));
43 43
 }
44 44
 // end check for lock
45 45
 
@@ -47,22 +47,22 @@  discard block
 block discarded – undo
47 47
 $modx->lockElement(6, $id);
48 48
 
49 49
 if(isset($_GET['id'])) {
50
-	$rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
51
-	$content = $modx->db->getRow($rs);
52
-	if(!$content) {
53
-		$modx->webAlertAndQuit("Module not found for id '{$id}'.");
54
-	}
55
-	$content['properties'] = str_replace("&", "&amp;", $content['properties']);
56
-	$_SESSION['itemname'] = $content['name'];
57
-	if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
58
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
59
-	}
50
+    $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
51
+    $content = $modx->db->getRow($rs);
52
+    if(!$content) {
53
+        $modx->webAlertAndQuit("Module not found for id '{$id}'.");
54
+    }
55
+    $content['properties'] = str_replace("&", "&amp;", $content['properties']);
56
+    $_SESSION['itemname'] = $content['name'];
57
+    if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
58
+        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
59
+    }
60 60
 } else {
61
-	$_SESSION['itemname'] = $_lang["new_module"];
62
-	$content['wrap'] = '1';
61
+    $_SESSION['itemname'] = $_lang["new_module"];
62
+    $content['wrap'] = '1';
63 63
 }
64 64
 if($modx->manager->hasFormValues()) {
65
-	$modx->manager->loadFormValues();
65
+    $modx->manager->loadFormValues();
66 66
 }
67 67
 
68 68
 // Add lock-element JS-Script
@@ -433,18 +433,18 @@  discard block
 block discarded – undo
433 433
 
434 434
 <form name="mutate" id="mutate" class="module" method="post" action="index.php?a=109">
435 435
 	<?php
436
-	// invoke OnModFormPrerender event
437
-	$evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
438
-	if(is_array($evtOut)) {
439
-		echo implode('', $evtOut);
440
-	}
441
-
442
-	// Prepare internal params & info-tab via parseDocBlock
443
-	$modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : '';
444
-	$docBlock = $modx->parseDocBlockFromString($modulecode);
445
-	$docBlockList = $modx->convertDocBlockIntoList($docBlock);
446
-	$internal = array();
447
-	?>
436
+    // invoke OnModFormPrerender event
437
+    $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
438
+    if(is_array($evtOut)) {
439
+        echo implode('', $evtOut);
440
+    }
441
+
442
+    // Prepare internal params & info-tab via parseDocBlock
443
+    $modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : '';
444
+    $docBlock = $modx->parseDocBlockFromString($modulecode);
445
+    $docBlockList = $modx->convertDocBlockIntoList($docBlock);
446
+    $internal = array();
447
+    ?>
448 448
 	<input type="hidden" name="id" value="<?= $content['id'] ?>">
449 449
 	<input type="hidden" name="mode" value="<?= $modx->manager->action ?>">
450 450
 
@@ -497,11 +497,11 @@  discard block
 block discarded – undo
497 497
 							<select name="categoryid" class="form-control" onchange="documentDirty=true;">
498 498
 								<option>&nbsp;</option>
499 499
 								<?php
500
-								include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
501
-								foreach(getCategories() as $n => $v) {
502
-									echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n";
503
-								}
504
-								?>
500
+                                include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
501
+                                foreach(getCategories() as $n => $v) {
502
+                                    echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n";
503
+                                }
504
+                                ?>
505 505
 							</select>
506 506
 						</div>
507 507
 					</div>
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 							<i class="<?= $_style["actions_save"] ?>"></i> <?= $_lang['manage_depends'] ?></a>
609 609
 					</div>
610 610
 					<?php
611
-					$ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name, 
611
+                    $ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name, 
612 612
 					CASE smd.type
613 613
 						WHEN 10 THEN 'Chunk'
614 614
 						WHEN 20 THEN 'Document'
@@ -624,17 +624,17 @@  discard block
 block discarded – undo
624 624
 						LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50
625 625
 						LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name');
626 626
 
627
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
628
-					$grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items
629
-					$grd->noRecordMsg = $_lang['no_records_found'];
630
-					$grd->cssClass = 'grid';
631
-					$grd->columnHeaderClass = 'gridHeader';
632
-					$grd->itemClass = 'gridItem';
633
-					$grd->altItemClass = 'gridAltItem';
634
-					$grd->columns = $_lang['element_name'] . " ," . $_lang['type'];
635
-					$grd->fields = "name,type";
636
-					echo $grd->render();
637
-					?>
627
+                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
628
+                    $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items
629
+                    $grd->noRecordMsg = $_lang['no_records_found'];
630
+                    $grd->cssClass = 'grid';
631
+                    $grd->columnHeaderClass = 'gridHeader';
632
+                    $grd->itemClass = 'gridItem';
633
+                    $grd->altItemClass = 'gridAltItem';
634
+                    $grd->columns = $_lang['element_name'] . " ," . $_lang['type'];
635
+                    $grd->fields = "name,type";
636
+                    echo $grd->render();
637
+                    ?>
638 638
 				</div>
639 639
 			</div>
640 640
 		<?php endif; ?>
@@ -646,12 +646,12 @@  discard block
 block discarded – undo
646 646
 			<div class="container container-body">
647 647
 				<?php if($use_udperms == 1) : ?>
648 648
 					<?php
649
-					// fetch user access permissions for the module
650
-					$rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
651
-					$groupsarray = $modx->db->getColumn('usergroup', $rs);
649
+                    // fetch user access permissions for the module
650
+                    $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
651
+                    $groupsarray = $modx->db->getColumn('usergroup', $rs);
652 652
 
653
-					if($modx->hasPermission('access_permissions')) {
654
-						?>
653
+                    if($modx->hasPermission('access_permissions')) {
654
+                        ?>
655 655
 						<!-- User Group Access Permissions -->
656 656
 						<script type="text/javascript">
657 657
 							function makePublic(b) {
@@ -675,28 +675,28 @@  discard block
 block discarded – undo
675 675
 						</script>
676 676
 						<p><?= $_lang['module_group_access_msg'] ?></p>
677 677
 						<?php
678
-					}
679
-					$chk = '';
680
-					$rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
681
-					while($row = $modx->db->getRow($rs)) {
682
-						$groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array();
683
-						$checked = in_array($row['id'], $groupsarray);
684
-						if($modx->hasPermission('access_permissions')) {
685
-							if($checked) {
686
-								$notPublic = true;
687
-							}
688
-							$chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n";
689
-						} else {
690
-							if($checked) {
691
-								$chks = '<input type="hidden" name="usrgroups[]"  value="' . $row['id'] . '" />' . "\n" . $chks;
692
-							}
693
-						}
694
-					}
695
-					if($modx->hasPermission('access_permissions')) {
696
-						$chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks;
697
-					}
698
-					echo $chks;
699
-					?>
678
+                    }
679
+                    $chk = '';
680
+                    $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
681
+                    while($row = $modx->db->getRow($rs)) {
682
+                        $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array();
683
+                        $checked = in_array($row['id'], $groupsarray);
684
+                        if($modx->hasPermission('access_permissions')) {
685
+                            if($checked) {
686
+                                $notPublic = true;
687
+                            }
688
+                            $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n";
689
+                        } else {
690
+                            if($checked) {
691
+                                $chks = '<input type="hidden" name="usrgroups[]"  value="' . $row['id'] . '" />' . "\n" . $chks;
692
+                            }
693
+                        }
694
+                    }
695
+                    if($modx->hasPermission('access_permissions')) {
696
+                        $chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks;
697
+                    }
698
+                    echo $chks;
699
+                    ?>
700 700
 				<?php endif; ?>
701 701
 			</div>
702 702
 		</div>
@@ -712,11 +712,11 @@  discard block
 block discarded – undo
712 712
 
713 713
 		<input type="submit" name="save" style="display:none;">
714 714
 		<?php
715
-		// invoke OnModFormRender event
716
-		$evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
717
-		if(is_array($evtOut)) {
718
-			echo implode('', $evtOut);
719
-		}
720
-		?>
715
+        // invoke OnModFormRender event
716
+        $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
717
+        if(is_array($evtOut)) {
718
+            echo implode('', $evtOut);
719
+        }
720
+        ?>
721 721
 </form>
722 722
 <script type="text/javascript">setTimeout('showParameters();', 10);</script>
Please login to merge, or discard this patch.
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
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
 switch($modx->manager->action) {
6
-	case 107:
7
-		if(!$modx->hasPermission('new_module')) {
8
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
-		}
10
-		break;
11
-	case 108:
12
-		if(!$modx->hasPermission('edit_module')) {
13
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
14
-		}
15
-		break;
16
-	default:
17
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+	    case 107:
7
+		    if(!$modx->hasPermission('new_module')) {
8
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
+		    }
10
+		    break;
11
+	    case 108:
12
+		    if(!$modx->hasPermission('edit_module')) {
13
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
14
+		    }
15
+		    break;
16
+	    default:
17
+		    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
18 18
 }
19 19
 $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
20 20
 // Get table names (alphabetical)
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (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
-switch($modx->manager->action) {
5
+switch ($modx->manager->action) {
6 6
 	case 107:
7
-		if(!$modx->hasPermission('new_module')) {
7
+		if (!$modx->hasPermission('new_module')) {
8 8
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
9 9
 		}
10 10
 		break;
11 11
 	case 108:
12
-		if(!$modx->hasPermission('edit_module')) {
12
+		if (!$modx->hasPermission('edit_module')) {
13 13
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
14 14
 		}
15 15
 		break;
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
 $tbl_site_templates = $modx->getFullTableName('site_templates');
30 30
 $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars');
31 31
 // create globally unique identifiers (guid)
32
-function createGUID() {
32
+function createGUID(){
33 33
 	srand((double) microtime() * 1000000);
34 34
 	$r = rand();
35
-	$u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1);
35
+	$u = uniqid(getmypid().$r.(double) microtime() * 1000000, 1);
36 36
 	$m = md5($u);
37 37
 	return $m;
38 38
 }
39 39
 
40 40
 // check to see the module editor isn't locked
41
-if($lockedEl = $modx->elementIsLocked(6, $id)) {
41
+if ($lockedEl = $modx->elementIsLocked(6, $id)) {
42 42
 	$modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module']));
43 43
 }
44 44
 // end check for lock
@@ -46,29 +46,29 @@  discard block
 block discarded – undo
46 46
 // Lock snippet for other users to edit
47 47
 $modx->lockElement(6, $id);
48 48
 
49
-if(isset($_GET['id'])) {
49
+if (isset($_GET['id'])) {
50 50
 	$rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
51 51
 	$content = $modx->db->getRow($rs);
52
-	if(!$content) {
52
+	if (!$content) {
53 53
 		$modx->webAlertAndQuit("Module not found for id '{$id}'.");
54 54
 	}
55 55
 	$content['properties'] = str_replace("&", "&amp;", $content['properties']);
56 56
 	$_SESSION['itemname'] = $content['name'];
57
-	if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
57
+	if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
58 58
 		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
59 59
 	}
60 60
 } else {
61 61
 	$_SESSION['itemname'] = $_lang["new_module"];
62 62
 	$content['wrap'] = '1';
63 63
 }
64
-if($modx->manager->hasFormValues()) {
64
+if ($modx->manager->hasFormValues()) {
65 65
 	$modx->manager->loadFormValues();
66 66
 }
67 67
 
68 68
 // Add lock-element JS-Script
69 69
 $lockElementId = $id;
70 70
 $lockElementType = 6;
71
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
71
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
72 72
 ?>
73 73
 <script type="text/javascript">
74 74
 	function loadDependencies() {
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 	function BrowseServer() {
416 416
 		var w = screen.width * 0.7;
417 417
 		var h = screen.height * 0.7;
418
-		OpenServerBrowser("<?= MODX_MANAGER_URL;?>media/browser/<?= $which_browser;?>/browser.php?Type=images", w, h);
418
+		OpenServerBrowser("<?= MODX_MANAGER_URL; ?>media/browser/<?= $which_browser; ?>/browser.php?Type=images", w, h);
419 419
 	}
420 420
 
421 421
 	function SetUrl(url, width, height, alt) {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 	<?php
436 436
 	// invoke OnModFormPrerender event
437 437
 	$evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
438
-	if(is_array($evtOut)) {
438
+	if (is_array($evtOut)) {
439 439
 		echo implode('', $evtOut);
440 440
 	}
441 441
 
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 	<input type="hidden" name="mode" value="<?= $modx->manager->action ?>">
450 450
 
451 451
 	<h1>
452
-		<i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i>
452
+		<i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i>
453 453
 	</h1>
454 454
 
455 455
 	<?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -474,8 +474,8 @@  discard block
 block discarded – undo
474 474
 						<div class="col-md-9 col-lg-10">
475 475
 							<div class="form-control-name clearfix">
476 476
 								<input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
477
-								<?php if($modx->hasPermission('save_role')): ?>
478
-									<label class="custom-control" title="<?= $_lang['lock_module'] . "\n" . $_lang['lock_module_msg'] ?>" tooltip>
477
+								<?php if ($modx->hasPermission('save_role')): ?>
478
+									<label class="custom-control" title="<?= $_lang['lock_module']."\n".$_lang['lock_module_msg'] ?>" tooltip>
479 479
 										<input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> />
480 480
 										<i class="fa fa-lock"></i>
481 481
 									</label>
@@ -497,9 +497,9 @@  discard block
 block discarded – undo
497 497
 							<select name="categoryid" class="form-control" onchange="documentDirty=true;">
498 498
 								<option>&nbsp;</option>
499 499
 								<?php
500
-								include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
501
-								foreach(getCategories() as $n => $v) {
502
-									echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n";
500
+								include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
501
+								foreach (getCategories() as $n => $v) {
502
+									echo "\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category'])."</option>\n";
503 503
 								}
504 504
 								?>
505 505
 							</select>
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 				<div class="form-group">
532 532
 					<div class="form-row">
533 533
 						<label for="disabled"><input name="disabled" id="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> />
534
-							<?= ($content['disabled'] == 1 ? '<span class="text-danger">' . $_lang['module_disabled'] . '</span>' : $_lang['module_disabled']) ?></label>
534
+							<?= ($content['disabled'] == 1 ? '<span class="text-danger">'.$_lang['module_disabled'].'</span>' : $_lang['module_disabled']) ?></label>
535 535
 					</div>
536 536
 					<div class="form-row">
537 537
 						<label for="parse_docblock">
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 			</div>
597 597
 			<!-- HTML text editor end -->
598 598
 		</div>
599
-		<?php if($modx->manager->action == '108'): ?>
599
+		<?php if ($modx->manager->action == '108'): ?>
600 600
 			<!-- Dependencies -->
601 601
 			<div class="tab-page" id="tabDepend">
602 602
 				<h2 class="tab"><?= $_lang['settings_dependencies'] ?></h2>
@@ -624,14 +624,14 @@  discard block
 block discarded – undo
624 624
 						LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50
625 625
 						LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name');
626 626
 
627
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
627
+					include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
628 628
 					$grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items
629 629
 					$grd->noRecordMsg = $_lang['no_records_found'];
630 630
 					$grd->cssClass = 'grid';
631 631
 					$grd->columnHeaderClass = 'gridHeader';
632 632
 					$grd->itemClass = 'gridItem';
633 633
 					$grd->altItemClass = 'gridAltItem';
634
-					$grd->columns = $_lang['element_name'] . " ," . $_lang['type'];
634
+					$grd->columns = $_lang['element_name']." ,".$_lang['type'];
635 635
 					$grd->fields = "name,type";
636 636
 					echo $grd->render();
637 637
 					?>
@@ -644,13 +644,13 @@  discard block
 block discarded – undo
644 644
 			<h2 class="tab"><?= $_lang['access_permissions'] ?></h2>
645 645
 			<script type="text/javascript">tp.addTabPage(document.getElementById("tabPermissions"));</script>
646 646
 			<div class="container container-body">
647
-				<?php if($use_udperms == 1) : ?>
647
+				<?php if ($use_udperms == 1) : ?>
648 648
 					<?php
649 649
 					// fetch user access permissions for the module
650 650
 					$rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
651 651
 					$groupsarray = $modx->db->getColumn('usergroup', $rs);
652 652
 
653
-					if($modx->hasPermission('access_permissions')) {
653
+					if ($modx->hasPermission('access_permissions')) {
654 654
 						?>
655 655
 						<!-- User Group Access Permissions -->
656 656
 						<script type="text/javascript">
@@ -678,22 +678,22 @@  discard block
 block discarded – undo
678 678
 					}
679 679
 					$chk = '';
680 680
 					$rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
681
-					while($row = $modx->db->getRow($rs)) {
681
+					while ($row = $modx->db->getRow($rs)) {
682 682
 						$groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array();
683 683
 						$checked = in_array($row['id'], $groupsarray);
684
-						if($modx->hasPermission('access_permissions')) {
685
-							if($checked) {
684
+						if ($modx->hasPermission('access_permissions')) {
685
+							if ($checked) {
686 686
 								$notPublic = true;
687 687
 							}
688
-							$chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n";
688
+							$chks .= '<label><input type="checkbox" name="usrgroups[]" value="'.$row['id'].'"'.($checked ? ' checked="checked"' : '').' onclick="makePublic(false)" /> '.$row['name']."</label><br />\n";
689 689
 						} else {
690
-							if($checked) {
691
-								$chks = '<input type="hidden" name="usrgroups[]"  value="' . $row['id'] . '" />' . "\n" . $chks;
690
+							if ($checked) {
691
+								$chks = '<input type="hidden" name="usrgroups[]"  value="'.$row['id'].'" />'."\n".$chks;
692 692
 							}
693 693
 						}
694 694
 					}
695
-					if($modx->hasPermission('access_permissions')) {
696
-						$chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks;
695
+					if ($modx->hasPermission('access_permissions')) {
696
+						$chks = '<label><input type="checkbox" name="chkallgroups"'.(!$notPublic ? ' checked="checked"' : '').' onclick="makePublic(true)" /><span class="warning"> '.$_lang['all_usr_groups'].'</span></label><br />'."\n".$chks;
697 697
 					}
698 698
 					echo $chks;
699 699
 					?>
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 		<?php
715 715
 		// invoke OnModFormRender event
716 716
 		$evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
717
-		if(is_array($evtOut)) {
717
+		if (is_array($evtOut)) {
718 718
 			echo implode('', $evtOut);
719 719
 		}
720 720
 		?>
Please login to merge, or discard this patch.
Braces   +22 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if(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
-switch($modx->manager->action) {
5
+switch($modx->manager->action) {
6 6
 	case 107:
7
-		if(!$modx->hasPermission('new_module')) {
7
+		if(!$modx->hasPermission('new_module')) {
8 8
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
9 9
 		}
10 10
 		break;
11 11
 	case 108:
12
-		if(!$modx->hasPermission('edit_module')) {
12
+		if(!$modx->hasPermission('edit_module')) {
13 13
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
14 14
 		}
15 15
 		break;
@@ -29,7 +29,8 @@  discard block
 block discarded – undo
29 29
 $tbl_site_templates = $modx->getFullTableName('site_templates');
30 30
 $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars');
31 31
 // create globally unique identifiers (guid)
32
-function createGUID() {
32
+function createGUID()
33
+{
33 34
 	srand((double) microtime() * 1000000);
34 35
 	$r = rand();
35 36
 	$u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1);
@@ -38,7 +39,7 @@  discard block
 block discarded – undo
38 39
 }
39 40
 
40 41
 // check to see the module editor isn't locked
41
-if($lockedEl = $modx->elementIsLocked(6, $id)) {
42
+if($lockedEl = $modx->elementIsLocked(6, $id)) {
42 43
 	$modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module']));
43 44
 }
44 45
 // end check for lock
@@ -46,22 +47,22 @@  discard block
 block discarded – undo
46 47
 // Lock snippet for other users to edit
47 48
 $modx->lockElement(6, $id);
48 49
 
49
-if(isset($_GET['id'])) {
50
+if(isset($_GET['id'])) {
50 51
 	$rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
51 52
 	$content = $modx->db->getRow($rs);
52
-	if(!$content) {
53
+	if(!$content) {
53 54
 		$modx->webAlertAndQuit("Module not found for id '{$id}'.");
54 55
 	}
55 56
 	$content['properties'] = str_replace("&", "&amp;", $content['properties']);
56 57
 	$_SESSION['itemname'] = $content['name'];
57
-	if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
58
+	if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
58 59
 		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
59 60
 	}
60
-} else {
61
+} else {
61 62
 	$_SESSION['itemname'] = $_lang["new_module"];
62 63
 	$content['wrap'] = '1';
63 64
 }
64
-if($modx->manager->hasFormValues()) {
65
+if($modx->manager->hasFormValues()) {
65 66
 	$modx->manager->loadFormValues();
66 67
 }
67 68
 
@@ -435,7 +436,7 @@  discard block
 block discarded – undo
435 436
 	<?php
436 437
 	// invoke OnModFormPrerender event
437 438
 	$evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
438
-	if(is_array($evtOut)) {
439
+	if(is_array($evtOut)) {
439 440
 		echo implode('', $evtOut);
440 441
 	}
441 442
 
@@ -498,7 +499,7 @@  discard block
 block discarded – undo
498 499
 								<option>&nbsp;</option>
499 500
 								<?php
500 501
 								include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
501
-								foreach(getCategories() as $n => $v) {
502
+								foreach(getCategories() as $n => $v) {
502 503
 									echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n";
503 504
 								}
504 505
 								?>
@@ -650,7 +651,7 @@  discard block
 block discarded – undo
650 651
 					$rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
651 652
 					$groupsarray = $modx->db->getColumn('usergroup', $rs);
652 653
 
653
-					if($modx->hasPermission('access_permissions')) {
654
+					if($modx->hasPermission('access_permissions')) {
654 655
 						?>
655 656
 						<!-- User Group Access Permissions -->
656 657
 						<script type="text/javascript">
@@ -678,21 +679,21 @@  discard block
 block discarded – undo
678 679
 					}
679 680
 					$chk = '';
680 681
 					$rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
681
-					while($row = $modx->db->getRow($rs)) {
682
+					while($row = $modx->db->getRow($rs)) {
682 683
 						$groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array();
683 684
 						$checked = in_array($row['id'], $groupsarray);
684
-						if($modx->hasPermission('access_permissions')) {
685
-							if($checked) {
685
+						if($modx->hasPermission('access_permissions')) {
686
+							if($checked) {
686 687
 								$notPublic = true;
687 688
 							}
688 689
 							$chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n";
689
-						} else {
690
-							if($checked) {
690
+						} else {
691
+							if($checked) {
691 692
 								$chks = '<input type="hidden" name="usrgroups[]"  value="' . $row['id'] . '" />' . "\n" . $chks;
692 693
 							}
693 694
 						}
694 695
 					}
695
-					if($modx->hasPermission('access_permissions')) {
696
+					if($modx->hasPermission('access_permissions')) {
696 697
 						$chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks;
697 698
 					}
698 699
 					echo $chks;
@@ -714,7 +715,7 @@  discard block
 block discarded – undo
714 715
 		<?php
715 716
 		// invoke OnModFormRender event
716 717
 		$evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
717
-		if(is_array($evtOut)) {
718
+		if(is_array($evtOut)) {
718 719
 			echo implode('', $evtOut);
719 720
 		}
720 721
 		?>
Please login to merge, or discard this patch.
manager/actions/web_user_management.static.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('edit_web_user')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 // initialize page view state - the $_PAGE object
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 
12 12
 // get and save search string
13 13
 if($_REQUEST['op'] == 'reset') {
14
-	$query = '';
15
-	$_PAGE['vs']['search'] = '';
14
+    $query = '';
15
+    $_PAGE['vs']['search'] = '';
16 16
 } else {
17
-	$query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18
-	$sqlQuery = $modx->db->escape($query);
19
-	$_PAGE['vs']['search'] = $query;
17
+    $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18
+    $sqlQuery = $modx->db->escape($query);
19
+    $_PAGE['vs']['search'] = $query;
20 20
 }
21 21
 
22 22
 // get & save listmode
@@ -120,29 +120,29 @@  discard block
 block discarded – undo
120 120
 			<div class="row">
121 121
 				<div class="table-responsive">
122 122
 					<?php
123
-					$ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu 
123
+                    $ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu 
124 124
 			INNER JOIN " . $modx->getFullTableName("web_user_attributes") . " wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username');
125
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
126
-					$grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
127
-					$grd->noRecordMsg = $_lang["no_records_found"];
128
-					$grd->cssClass = "table data";
129
-					$grd->columnHeaderClass = "tableHeader";
130
-					$grd->itemClass = "tableItem";
131
-					$grd->altItemClass = "tableAltItem";
132
-					$grd->fields = "id,username,fullname,email,gender,blocked";
133
-					$grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_gender"] . " ," . $_lang["user_block"];
134
-					$grd->colWidths = "1%,,,,1%,1%";
135
-					$grd->colAligns = "center,,,,center,right' nowrap='nowrap";
136
-					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>";
137
-					if($listmode == '1') {
138
-						$grd->pageSize = 0;
139
-					}
140
-					if($_REQUEST['op'] == 'reset') {
141
-						$grd->pageNumber = 1;
142
-					}
143
-					// render grid
144
-					echo $grd->render();
145
-					?>
125
+                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
126
+                    $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
127
+                    $grd->noRecordMsg = $_lang["no_records_found"];
128
+                    $grd->cssClass = "table data";
129
+                    $grd->columnHeaderClass = "tableHeader";
130
+                    $grd->itemClass = "tableItem";
131
+                    $grd->altItemClass = "tableAltItem";
132
+                    $grd->fields = "id,username,fullname,email,gender,blocked";
133
+                    $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_gender"] . " ," . $_lang["user_block"];
134
+                    $grd->colWidths = "1%,,,,1%,1%";
135
+                    $grd->colAligns = "center,,,,center,right' nowrap='nowrap";
136
+                    $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>";
137
+                    if($listmode == '1') {
138
+                        $grd->pageSize = 0;
139
+                    }
140
+                    if($_REQUEST['op'] == 'reset') {
141
+                        $grd->pageNumber = 1;
142
+                    }
143
+                    // render grid
144
+                    echo $grd->render();
145
+                    ?>
146 146
 				</div>
147 147
 			</div>
148 148
 		</div>
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (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('edit_web_user')) {
5
+if (!$modx->hasPermission('edit_web_user')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 $modx->manager->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 16
 } else {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 
27 27
 // context menu
28
-include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
28
+include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php";
29 29
 $cm = new ContextMenu("cntxm", 150);
30 30
 $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0));
31 31
 $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0));
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
 			<div class="row">
121 121
 				<div class="table-responsive">
122 122
 					<?php
123
-					$ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu 
124
-			INNER JOIN " . $modx->getFullTableName("web_user_attributes") . " wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username');
125
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
123
+					$ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users")." wu 
124
+			INNER JOIN " . $modx->getFullTableName("web_user_attributes")." wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username');
125
+					include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
126 126
 					$grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
127 127
 					$grd->noRecordMsg = $_lang["no_records_found"];
128 128
 					$grd->cssClass = "table data";
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 					$grd->itemClass = "tableItem";
131 131
 					$grd->altItemClass = "tableAltItem";
132 132
 					$grd->fields = "id,username,fullname,email,gender,blocked";
133
-					$grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_gender"] . " ," . $_lang["user_block"];
133
+					$grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["user_full_name"]." ,".$_lang["email"]." ,".$_lang["user_gender"]." ,".$_lang["user_block"];
134 134
 					$grd->colWidths = "1%,,,,1%,1%";
135 135
 					$grd->colAligns = "center,,,,center,right' nowrap='nowrap";
136
-					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>";
137
-					if($listmode == '1') {
136
+					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='".$_style["icons_user"]."'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='".$_lang["click_to_edit_title"]."'>[+value+]</a>";
137
+					if ($listmode == '1') {
138 138
 						$grd->pageSize = 0;
139 139
 					}
140
-					if($_REQUEST['op'] == 'reset') {
140
+					if ($_REQUEST['op'] == 'reset') {
141 141
 						$grd->pageNumber = 1;
142 142
 					}
143 143
 					// render grid
Please login to merge, or discard this patch.
manager/actions/mutate_plugin.dynamic.php 2 patches
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch ($modx->manager->action) {
7
-    case 102:
8
-        if (!$modx->hasPermission('edit_plugin')) {
9
-            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-        }
11
-        break;
12
-    case 101:
13
-        if (!$modx->hasPermission('new_plugin')) {
7
+        case 102:
8
+            if (!$modx->hasPermission('edit_plugin')) {
9
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+            }
11
+            break;
12
+        case 101:
13
+            if (!$modx->hasPermission('new_plugin')) {
14
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+            }
16
+            break;
17
+        default:
14 18
             $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-        }
16
-        break;
17
-    default:
18
-        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 // Add lock-element JS-Script
57 57
 $lockElementId = $id;
58 58
 $lockElementType = 5;
59
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
59
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
60 60
 
61 61
 function bold($cond = false)
62 62
 {
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
     <input type="hidden" name="mode" value="<?= $modx->manager->action ?>">
479 479
 
480 480
     <h1>
481
-        <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i>
481
+        <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i>
482 482
     </h1>
483 483
 
484 484
     <?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
                             <div class="form-control-name clearfix">
505 505
                                 <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
506 506
                                 <?php if ($modx->hasPermission('save_role')): ?>
507
-                                <label class="custom-control" title="<?= $_lang['lock_plugin'] . "\n" . $_lang['lock_plugin_msg'] ?>" tooltip>
507
+                                <label class="custom-control" title="<?= $_lang['lock_plugin']."\n".$_lang['lock_plugin_msg'] ?>" tooltip>
508 508
                                     <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> />
509 509
                                     <i class="fa fa-lock"></i>
510 510
                                 </label>
@@ -528,9 +528,9 @@  discard block
 block discarded – undo
528 528
                             <select name="categoryid" class="form-control" onchange="documentDirty=true;">
529 529
                                 <option>&nbsp;</option>
530 530
                                 <?php
531
-                                include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
531
+                                include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
532 532
                                 foreach (getCategories() as $n => $v) {
533
-                                    echo '<option value="' . $v['id'] . '"' . ($content["category"] == $v["id"] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v["category"]) . "</option>";
533
+                                    echo '<option value="'.$v['id'].'"'.($content["category"] == $v["id"] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v["category"])."</option>";
534 534
                                 }
535 535
                                 ?>
536 536
                             </select>
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
                 <?php if ($modx->hasPermission('save_role')): ?>
547 547
                 <div class="form-group">
548 548
                     <div class="form-row">
549
-                        <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['plugin_disabled'] . "</span>" : $_lang['plugin_disabled']) ?></label>
549
+                        <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['plugin_disabled']."</span>" : $_lang['plugin_disabled']) ?></label>
550 550
                     </div>
551 551
                     <div class="form-row">
552 552
                         <label>
@@ -593,11 +593,11 @@  discard block
 block discarded – undo
593 593
                             <select name="moduleguid" class="form-control" onchange="documentDirty=true;">
594 594
                                 <option>&nbsp;</option>
595 595
                                 <?php
596
-                                $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules") . " sm 
597
-								INNER JOIN " . $modx->getFullTableName("site_module_depobj") . " smd ON smd.module=sm.id AND smd.type=30
598
-								INNER JOIN " . $modx->getFullTableName("site_plugins") . " sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name');
596
+                                $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules")." sm 
597
+								INNER JOIN " . $modx->getFullTableName("site_module_depobj")." smd ON smd.module=sm.id AND smd.type=30
598
+								INNER JOIN " . $modx->getFullTableName("site_plugins")." sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name');
599 599
                                 while ($row = $modx->db->getRow($ds)) {
600
-                                    echo "<option value='" . $row['guid'] . "'" . ($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row["name"]) . "</option>";
600
+                                    echo "<option value='".$row['guid']."'".($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row["name"])."</option>";
601 601
                                 }
602 602
                                 ?>
603 603
                             </select>
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
                                 echoEventRows($evtnames);
659 659
                             }
660 660
                             echo '<hr class="clear">';
661
-                            echo '<div class="form-group"><b>' . $services[$srv - 1] . '</b></div>';
661
+                            echo '<div class="form-group"><b>'.$services[$srv - 1].'</b></div>';
662 662
                         }
663 663
                         // display group name
664 664
                         if ($grp != $row['groupname']) {
@@ -667,9 +667,9 @@  discard block
 block discarded – undo
667 667
                                 echoEventRows($evtnames);
668 668
                             }
669 669
                             echo '<hr class="clear">';
670
-                            echo '<div class="form-group"><b>' . $row['groupname'] . '</b></div>';
670
+                            echo '<div class="form-group"><b>'.$row['groupname'].'</b></div>';
671 671
                         }
672
-                        $evtnames[] = '<input name="sysevents[]" id="' . $row['name'] . '" type="checkbox" ' . (in_array($row['id'], $evts) ? ' checked="checked" ' : '') . 'class="inputBox" value="' . $row['id'] . '" /> <label for="' . $row['name'] . '" ' . bold(in_array($row['id'], $evts)) . '> ' . $row['name'] . '</label>' . "\n";
672
+                        $evtnames[] = '<input name="sysevents[]" id="'.$row['name'].'" type="checkbox" '.(in_array($row['id'], $evts) ? ' checked="checked" ' : '').'class="inputBox" value="'.$row['id'].'" /> <label for="'.$row['name'].'" '.bold(in_array($row['id'], $evts)).'> '.$row['name'].'</label>'."\n";
673 673
                         if (count($evtnames) == 2) {
674 674
                             echoEventRows($evtnames);
675 675
                         }
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 
682 682
                 function echoEventRows(&$evtnames)
683 683
                 {
684
-                    echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">' . implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames) . '</div></div>';
684
+                    echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">'.implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames).'</div></div>';
685 685
                     $evtnames = array();
686 686
                 }
687 687
 
Please login to merge, or discard this patch.