Completed
Push — develop ( cb7ecf...5e631f )
by Dmytro
17s
created
manager/actions/modules.static.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) {
@@ -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["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0));
31 31
 if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
@@ -108,24 +108,24 @@  discard block
 block discarded – undo
108 108
     <div class="table-responsive">
109 109
         <?php
110 110
         if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
111
-            $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon
112
-				FROM ' . $modx->getFullTableName('site_modules') . ' AS sm
113
-				LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
114
-				LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
115
-                WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1
111
+            $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"'.$_lang['yes'].'","-") as disabled, IF(sm.icon<>"",sm.icon,"'.$_style['icons_modules'].'") as icon
112
+				FROM ' . $modx->getFullTableName('site_modules').' AS sm
113
+				LEFT JOIN ' . $modx->getFullTableName('site_module_access').' AS sma ON sma.module = sm.id
114
+				LEFT JOIN ' . $modx->getFullTableName('member_groups').' AS mg ON sma.usergroup = mg.user_group
115
+                WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID().') AND sm.disabled != 1 AND sm.locked != 1
116 116
                 ORDER BY sm.name');
117 117
             if ($modx->hasPermission('edit_module')) {
118
-                $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
118
+                $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
119 119
             } else if ($modx->hasPermission('exec_module')) {
120
-                $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
120
+                $title = "<a href='index.php?a=112&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
121 121
             } else {
122 122
                 $title = '[+value+]';
123 123
             }
124 124
         } else {
125 125
             $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name");
126
-            $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
126
+            $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
127 127
         }
128
-        include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
128
+        include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
129 129
         $grd = new DataGrid('', $rs, $number_of_results); // set page size to 0 t show all items
130 130
         $grd->noRecordMsg = $_lang["no_records_found"];
131 131
         $grd->cssClass = "table data";
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
         $grd->itemClass = "tableItem";
134 134
         $grd->altItemClass = "tableAltItem";
135 135
         $grd->fields = "icon,name,description,locked,disabled";
136
-        $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["description"] . " ," . $_lang["locked"] . " ," . $_lang["disabled"];
136
+        $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["description"]." ,".$_lang["locked"]." ,".$_lang["disabled"];
137 137
         $grd->colWidths = "34,,,60,60";
138 138
         $grd->colAligns = "center,,,center,center";
139
-        $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title;
139
+        $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='[+value+]'></i></a>||template:".$title;
140 140
         if ($listmode == '1') {
141 141
             $grd->pageSize = 0;
142 142
         }
Please login to merge, or discard this patch.
Braces   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) {
5
+if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 $modx->getManagerApi()->initPageViewState();
11 11
 
12 12
 // get and save search string
13
-if ($_REQUEST['op'] == 'reset') {
13
+if ($_REQUEST['op'] == 'reset') {
14 14
     $query = '';
15 15
     $_PAGE['vs']['search'] = '';
16
-} else {
16
+} else {
17 17
     $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18 18
     $sqlQuery = $modx->getDatabase()->escape($query);
19 19
     $_PAGE['vs']['search'] = $query;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
29 29
 $cm = new ContextMenu("cntxm", 150);
30 30
 $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0));
31
-if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
31
+if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
32 32
     $cm->addSeparator();
33 33
 }
34 34
 $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['actions_edit'], (!$modx->hasPermission('edit_module') ? 1 : 0));
@@ -107,21 +107,21 @@  discard block
 block discarded – undo
107 107
 <div class="tab-page">
108 108
     <div class="table-responsive">
109 109
         <?php
110
-        if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
110
+        if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
111 111
             $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon
112 112
 				FROM ' . $modx->getFullTableName('site_modules') . ' AS sm
113 113
 				LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
114 114
 				LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
115 115
                 WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1
116 116
                 ORDER BY sm.name');
117
-            if ($modx->hasPermission('edit_module')) {
117
+            if ($modx->hasPermission('edit_module')) {
118 118
                 $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
119
-            } else if ($modx->hasPermission('exec_module')) {
119
+            } else if ($modx->hasPermission('exec_module')) {
120 120
                 $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
121
-            } else {
121
+            } else {
122 122
                 $title = '[+value+]';
123 123
             }
124
-        } else {
124
+        } else {
125 125
             $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name");
126 126
             $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
127 127
         }
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
         $grd->colWidths = "34,,,60,60";
138 138
         $grd->colAligns = "center,,,center,center";
139 139
         $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title;
140
-        if ($listmode == '1') {
140
+        if ($listmode == '1') {
141 141
             $grd->pageSize = 0;
142 142
         }
143
-        if ($_REQUEST['op'] == 'reset') {
143
+        if ($_REQUEST['op'] == 'reset') {
144 144
             $grd->pageNumber = 1;
145 145
         }
146 146
         // render grid
Please login to merge, or discard this patch.
manager/actions/eventlog.dynamic.php 3 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if( ! defined('IN_MANAGER_MODE') || 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
 // Get table Names (alphabetical)
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 
17 17
 // get and save search string
18 18
 if($_REQUEST['op'] == 'reset') {
19
-	$sqlQuery = $query = '';
20
-	$_PAGE['vs']['search'] = '';
19
+    $sqlQuery = $query = '';
20
+    $_PAGE['vs']['search'] = '';
21 21
 } else {
22
-	$sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
23
-	if(!is_numeric($sqlQuery)) {
24
-		$sqlQuery = $modx->getDatabase()->escape($query);
25
-	}
26
-	$_PAGE['vs']['search'] = $query;
22
+    $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
23
+    if(!is_numeric($sqlQuery)) {
24
+        $sqlQuery = $modx->getDatabase()->escape($query);
25
+    }
26
+    $_PAGE['vs']['search'] = $query;
27 27
 }
28 28
 
29 29
 // get & save listmode
@@ -125,33 +125,33 @@  discard block
 block discarded – undo
125 125
 			<div class="row">
126 126
 				<div class="table-responsive">
127 127
 					<?php
128
-					$ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el 
128
+                    $ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el 
129 129
 			LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0
130 130
 			LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
131
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
132
-					$grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
133
-					$grd->pagerClass = '';
134
-					$grd->pageClass = 'page-item';
135
-					$grd->selPageClass = 'page-item active';
136
-					$grd->noRecordMsg = $_lang['no_records_found'];
137
-					$grd->cssClass = "table data nowrap";
138
-					$grd->columnHeaderClass = "tableHeader";
139
-					$grd->itemClass = "tableItem";
140
-					$grd->altItemClass = "tableAltItem";
141
-					$grd->fields = "type,source,createdon,eventid,username";
142
-					$grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid'];
143
-					$grd->colWidths = "1%,,1%,1%,1%";
144
-					$grd->colAligns = "center,,,center,center";
145
-					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p';
146
-					if($listmode == '1') {
147
-						$grd->pageSize = 0;
148
-					}
149
-					if($_REQUEST['op'] == 'reset') {
150
-						$grd->pageNumber = 1;
151
-					}
152
-					// render grid
153
-					echo $grd->render();
154
-					?>
131
+                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
132
+                    $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
133
+                    $grd->pagerClass = '';
134
+                    $grd->pageClass = 'page-item';
135
+                    $grd->selPageClass = 'page-item active';
136
+                    $grd->noRecordMsg = $_lang['no_records_found'];
137
+                    $grd->cssClass = "table data nowrap";
138
+                    $grd->columnHeaderClass = "tableHeader";
139
+                    $grd->itemClass = "tableItem";
140
+                    $grd->altItemClass = "tableAltItem";
141
+                    $grd->fields = "type,source,createdon,eventid,username";
142
+                    $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid'];
143
+                    $grd->colWidths = "1%,,1%,1%,1%";
144
+                    $grd->colAligns = "center,,,center,center";
145
+                    $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p';
146
+                    if($listmode == '1') {
147
+                        $grd->pageSize = 0;
148
+                    }
149
+                    if($_REQUEST['op'] == 'reset') {
150
+                        $grd->pageNumber = 1;
151
+                    }
152
+                    // render grid
153
+                    echo $grd->render();
154
+                    ?>
155 155
 				</div>
156 156
 			</div>
157 157
 		</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( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('view_eventlog')) {
5
+if (!$modx->hasPermission('view_eventlog')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 $modx->getManagerApi()->initPageViewState();
16 16
 
17 17
 // get and save search string
18
-if($_REQUEST['op'] == 'reset') {
18
+if ($_REQUEST['op'] == 'reset') {
19 19
 	$sqlQuery = $query = '';
20 20
 	$_PAGE['vs']['search'] = '';
21 21
 } else {
22 22
 	$sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
23
-	if(!is_numeric($sqlQuery)) {
23
+	if (!is_numeric($sqlQuery)) {
24 24
 		$sqlQuery = $modx->getDatabase()->escape($query);
25 25
 	}
26 26
 	$_PAGE['vs']['search'] = $query;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $_PAGE['vs']['lm'] = $listmode;
32 32
 
33 33
 // context menu
34
-include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
34
+include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php";
35 35
 $cm = new ContextMenu("cntxm", 150);
36 36
 $cm->addItem($_lang['view_log'], "js:menuAction(1)", $_style['actions_preview']);
37 37
 $cm->addSeparator();
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 					<?php
128 128
 					$ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el 
129 129
 			LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0
130
-			LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
131
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
130
+			LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "".(is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '')."(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
131
+					include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
132 132
 					$grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
133 133
 					$grd->pagerClass = '';
134 134
 					$grd->pageClass = 'page-item';
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 					$grd->itemClass = "tableItem";
140 140
 					$grd->altItemClass = "tableAltItem";
141 141
 					$grd->fields = "type,source,createdon,eventid,username";
142
-					$grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid'];
142
+					$grd->columns = $_lang['type']." ,".$_lang['source']." ,".$_lang['date']." ,".$_lang['event_id']." ,".$_lang['sysinfo_userid'];
143 143
 					$grd->colWidths = "1%,,1%,1%,1%";
144 144
 					$grd->colAligns = "center,,,center,center";
145
-					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p';
146
-					if($listmode == '1') {
145
+					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang['click_to_context']."'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='".$_lang['click_to_view_details']."'>[+source+]</a>||date: ".$modx->toDateFormat(null, 'formatOnly').' %I:%M %p';
146
+					if ($listmode == '1') {
147 147
 						$grd->pageSize = 0;
148 148
 					}
149
-					if($_REQUEST['op'] == 'reset') {
149
+					if ($_REQUEST['op'] == 'reset') {
150 150
 						$grd->pageNumber = 1;
151 151
 					}
152 152
 					// render grid
Please login to merge, or discard this patch.
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('view_eventlog')) {
5
+if(!$modx->hasPermission('view_eventlog')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 $modx->getManagerApi()->initPageViewState();
16 16
 
17 17
 // get and save search string
18
-if($_REQUEST['op'] == 'reset') {
18
+if($_REQUEST['op'] == 'reset') {
19 19
 	$sqlQuery = $query = '';
20 20
 	$_PAGE['vs']['search'] = '';
21
-} else {
21
+} else {
22 22
 	$sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
23
-	if(!is_numeric($sqlQuery)) {
23
+	if(!is_numeric($sqlQuery)) {
24 24
 		$sqlQuery = $modx->getDatabase()->escape($query);
25 25
 	}
26 26
 	$_PAGE['vs']['search'] = $query;
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
 					$grd->colWidths = "1%,,1%,1%,1%";
144 144
 					$grd->colAligns = "center,,,center,center";
145 145
 					$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p';
146
-					if($listmode == '1') {
146
+					if($listmode == '1') {
147 147
 						$grd->pageSize = 0;
148 148
 					}
149
-					if($_REQUEST['op'] == 'reset') {
149
+					if($_REQUEST['op'] == 'reset') {
150 150
 						$grd->pageNumber = 1;
151 151
 					}
152 152
 					// render grid
Please login to merge, or discard this patch.
manager/actions/mutate_htmlsnippet.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->getManagerApi()->action) {
7
-    case 78:
8
-        if (!$modx->hasPermission('edit_chunk')) {
9
-            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-        }
11
-        break;
12
-    case 77:
13
-        if (!$modx->hasPermission('new_chunk')) {
7
+        case 78:
8
+            if (!$modx->hasPermission('edit_chunk')) {
9
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+            }
11
+            break;
12
+        case 77:
13
+            if (!$modx->hasPermission('new_chunk')) {
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']) ? (int)$_REQUEST['id'] : 0;
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21
-$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
21
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
22 22
 
23 23
 // Get table names (alphabetical)
24 24
 $tbl_site_htmlsnippets = $modx->getFullTableName('site_htmlsnippets');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     $content['name'] = $_REQUEST['itemname'];
48 48
 } else {
49 49
     $_SESSION['itemname'] = $_lang["new_htmlsnippet"];
50
-    $content['category'] = (int)$_REQUEST['catid'];
50
+    $content['category'] = (int) $_REQUEST['catid'];
51 51
 }
52 52
 
53 53
 if ($modx->getManagerApi()->hasFormValues()) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 // Add lock-element JS-Script
66 66
 $lockElementId = $id;
67 67
 $lockElementType = 3;
68
-require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php');
68
+require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php');
69 69
 
70 70
 // Print RTE Javascript function
71 71
 ?>
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         <input type="hidden" name="mode" value="<?= $modx->getManagerApi()->action ?>" />
137 137
 
138 138
         <h1>
139
-            <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i>
139
+            <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i>
140 140
         </h1>
141 141
 
142 142
         <?= $_style['actionbuttons']['dynamic']['element'] ?>
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                             <div class="form-control-name clearfix">
161 161
                                 <input name="name" type="text" maxlength="100" value="<?= $modx->getPhpCompat()->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" />
162 162
                                 <?php if ($modx->hasPermission('save_role')): ?>
163
-                                    <label class="custom-control" title="<?= $_lang['lock_htmlsnippet'] . "\n" . $_lang['lock_htmlsnippet_msg'] ?>" tooltip>
163
+                                    <label class="custom-control" title="<?= $_lang['lock_htmlsnippet']."\n".$_lang['lock_htmlsnippet_msg'] ?>" tooltip>
164 164
                                         <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 || $content['locked'] == 'on' ? ' checked="checked"' : '') ?> />
165 165
                                         <i class="fa fa-lock"></i>
166 166
                                     </label>
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
                             <select name="categoryid" class="form-control" onchange="documentDirty=true;">
185 185
                                 <option>&nbsp;</option>
186 186
                                 <?php
187
-                                include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
187
+                                include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
188 188
                                 foreach (getCategories() as $n => $v) {
189
-                                    echo "\t\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '') . '>' . $modx->getPhpCompat()->htmlspecialchars($v['category']) . "</option>\n";
189
+                                    echo "\t\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '').'>'.$modx->getPhpCompat()->htmlspecialchars($v['category'])."</option>\n";
190 190
                                 }
191 191
                                 ?>
192 192
                             </select>
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                     </div>
201 201
                     <?php if ($_SESSION['mgrRole'] == 1): ?>
202 202
                         <div class="form-row">
203
-                            <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['disabled'] . "</span>" : $_lang['disabled']) ?></label>
203
+                            <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['disabled']."</span>" : $_lang['disabled']) ?></label>
204 204
                         </div>
205 205
                     <?php endif; ?>
206 206
                 </div>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                             $evtOut = $modx->invokeEvent('OnRichTextEditorRegister');
217 217
                             if (is_array($evtOut)) {
218 218
                                 foreach ($evtOut as $i => $editor) {
219
-                                    echo "\t" . '<option value="' . $editor . '"' . ($which_editor == $editor ? ' selected="selected"' : '') . '>' . $editor . "</option>\n";
219
+                                    echo "\t".'<option value="'.$editor.'"'.($which_editor == $editor ? ' selected="selected"' : '').'>'.$editor."</option>\n";
220 220
                                 }
221 221
                             }
222 222
                             ?>
Please login to merge, or discard this patch.
manager/processors/empty_table.processor.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 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
 if(!$modx->hasPermission('settings')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $modx->getDatabase()->truncate($modx->getFullTableName('manager_log'));
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('settings')) {
5
+if (!$modx->hasPermission('settings')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $modx->getDatabase()->truncate($modx->getFullTableName('manager_log'));
10 10
 
11
-$header="Location: index.php?a=13";
11
+$header = "Location: index.php?a=13";
12 12
 header($header);
Please login to merge, or discard this patch.
manager/processors/remove_content.processor.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 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
 if(!$modx->hasPermission('delete_document')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $rs = $modx->getDatabase()->select('id', $modx->getFullTableName('site_content'), "deleted=1");
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 
12 12
 // invoke OnBeforeEmptyTrash event
13 13
 $modx->invokeEvent("OnBeforeEmptyTrash",
14
-						array(
15
-							"ids"=>$ids
16
-						));
14
+                        array(
15
+                            "ids"=>$ids
16
+                        ));
17 17
 
18 18
 // remove the document groups link.
19 19
 $sql = "DELETE document_groups
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 //'undelete' the document.
33 33
 $modx->getDatabase()->delete($modx->getFullTableName('site_content'), "deleted=1");
34 34
 
35
-	// invoke OnEmptyTrash event
36
-	$modx->invokeEvent("OnEmptyTrash",
37
-						array(
38
-							"ids"=>$ids
39
-						));
35
+    // invoke OnEmptyTrash event
36
+    $modx->invokeEvent("OnEmptyTrash",
37
+                        array(
38
+                            "ids"=>$ids
39
+                        ));
40 40
 
41
-	// empty cache
42
-	$modx->clearCache('full');
41
+    // empty cache
42
+    $modx->clearCache('full');
43 43
 
44
-	// finished emptying cache - redirect
45
-	$header="Location: index.php?a=2&r=1";
46
-	header($header);
44
+    // finished emptying cache - redirect
45
+    $header="Location: index.php?a=2&r=1";
46
+    header($header);
Please login to merge, or discard this patch.
manager/processors/execute_module.processor.php 3 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -3,51 +3,51 @@  discard block
 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
 if(!$modx->hasPermission('exec_module')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10 10
 if($id==0) {
11
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
11
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // check if user has access permission, except admins
15 15
 if($_SESSION['mgrRole']!=1){
16
-	$rs = $modx->getDatabase()->select(
17
-		'sma.usergroup,mg.member',
18
-		$modx->getFullTableName("site_module_access")." sma
16
+    $rs = $modx->getDatabase()->select(
17
+        'sma.usergroup,mg.member',
18
+        $modx->getFullTableName("site_module_access")." sma
19 19
 			LEFT JOIN ".$modx->getFullTableName("member_groups")." mg ON mg.user_group = sma.usergroup AND member='".$modx->getLoginUserID()."'",
20
-		"sma.module = '{$id}'"
21
-		);
22
-	//initialize permission to -1, if it stays -1 no permissions
23
-	//attached so permission granted
24
-	$permissionAccessInt = -1;
20
+        "sma.module = '{$id}'"
21
+        );
22
+    //initialize permission to -1, if it stays -1 no permissions
23
+    //attached so permission granted
24
+    $permissionAccessInt = -1;
25 25
 
26
-	while ($row = $modx->getDatabase()->getRow($rs)) {
27
-		if($row["usergroup"] && $row["member"]) {
28
-			//if there are permissions and this member has permission, ofcourse
29
-			//this is granted
30
-			$permissionAccessInt = 1;
31
-		} elseif ($permissionAccessInt==-1) {
32
-			//if there are permissions but this member has no permission and the
33
-			//variable was still in init state we set permission to 0; no permissions
34
-			$permissionAccessInt = 0;
35
-		}
36
-	}
26
+    while ($row = $modx->getDatabase()->getRow($rs)) {
27
+        if($row["usergroup"] && $row["member"]) {
28
+            //if there are permissions and this member has permission, ofcourse
29
+            //this is granted
30
+            $permissionAccessInt = 1;
31
+        } elseif ($permissionAccessInt==-1) {
32
+            //if there are permissions but this member has no permission and the
33
+            //variable was still in init state we set permission to 0; no permissions
34
+            $permissionAccessInt = 0;
35
+        }
36
+    }
37 37
 
38
-	if($permissionAccessInt==0) {
39
-		$modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106");
40
-	}
38
+    if($permissionAccessInt==0) {
39
+        $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106");
40
+    }
41 41
 }
42 42
 
43 43
 // get module data
44 44
 $rs = $modx->getDatabase()->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'");
45 45
 $content = $modx->getDatabase()->getRow($rs);
46 46
 if(!$content) {
47
-	$modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106");
47
+    $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106");
48 48
 }
49 49
 if($content['disabled']) {
50
-	$modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106");
50
+    $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106");
51 51
 }
52 52
 
53 53
 // Set the item name for logger
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 $output = evalModule($content["modulecode"],$parameter);
64 64
 if (strpos(trim($output),'<')===0 && strpos(trim($output),'<?xml')!==0) {
65
-	echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller
65
+    echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller
66 66
 }
67 67
 echo $output;
68 68
 include MODX_MANAGER_PATH."includes/sysalert.display.inc.php";
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('exec_module')) {
5
+if (!$modx->hasPermission('exec_module')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10
-if($id==0) {
9
+$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
10
+if ($id == 0) {
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // check if user has access permission, except admins
15
-if($_SESSION['mgrRole']!=1){
15
+if ($_SESSION['mgrRole'] != 1) {
16 16
 	$rs = $modx->getDatabase()->select(
17 17
 		'sma.usergroup,mg.member',
18 18
 		$modx->getFullTableName("site_module_access")." sma
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 	$permissionAccessInt = -1;
25 25
 
26 26
 	while ($row = $modx->getDatabase()->getRow($rs)) {
27
-		if($row["usergroup"] && $row["member"]) {
27
+		if ($row["usergroup"] && $row["member"]) {
28 28
 			//if there are permissions and this member has permission, ofcourse
29 29
 			//this is granted
30 30
 			$permissionAccessInt = 1;
31
-		} elseif ($permissionAccessInt==-1) {
31
+		} elseif ($permissionAccessInt == -1) {
32 32
 			//if there are permissions but this member has no permission and the
33 33
 			//variable was still in init state we set permission to 0; no permissions
34 34
 			$permissionAccessInt = 0;
35 35
 		}
36 36
 	}
37 37
 
38
-	if($permissionAccessInt==0) {
38
+	if ($permissionAccessInt == 0) {
39 39
 		$modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106");
40 40
 	}
41 41
 }
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 // get module data
44 44
 $rs = $modx->getDatabase()->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'");
45 45
 $content = $modx->getDatabase()->getRow($rs);
46
-if(!$content) {
46
+if (!$content) {
47 47
 	$modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106");
48 48
 }
49
-if($content['disabled']) {
49
+if ($content['disabled']) {
50 50
 	$modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106");
51 51
 }
52 52
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 $_SESSION['itemname'] = $content['name'];
61 61
 
62 62
 
63
-$output = evalModule($content["modulecode"],$parameter);
64
-if (strpos(trim($output),'<')===0 && strpos(trim($output),'<?xml')!==0) {
63
+$output = evalModule($content["modulecode"], $parameter);
64
+if (strpos(trim($output), '<') === 0 && strpos(trim($output), '<?xml') !== 0) {
65 65
 	echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller
66 66
 }
67 67
 echo $output;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 }
13 13
 
14 14
 // check if user has access permission, except admins
15
-if($_SESSION['mgrRole']!=1){
15
+if($_SESSION['mgrRole']!=1) {
16 16
 	$rs = $modx->getDatabase()->select(
17 17
 		'sma.usergroup,mg.member',
18 18
 		$modx->getFullTableName("site_module_access")." sma
Please login to merge, or discard this patch.
manager/processors/remove_locks.processor.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -4,23 +4,23 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+    if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 
9
-	// Remove all locks
10
-	$modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks'));
9
+    // Remove all locks
10
+    $modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks'));
11 11
 
12
-	$header = "Location: index.php?a=2";
13
-	header($header);
12
+    $header = "Location: index.php?a=2";
13
+    header($header);
14 14
 } else {
15
-	// Remove single locks via AJAX / window.onbeforeunload
16
-	$type = (int)$_GET['type'];
17
-	$id = (int)$_GET['id'];
18
-	$includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
19
-	if($type && $id) {
20
-		$modx->unlockElement($type, $id, $includeAllUsers);
21
-		echo '1';
22
-		exit;
23
-	} else {
24
-		echo 'No type or id sent with request.';
25
-	}
15
+    // Remove single locks via AJAX / window.onbeforeunload
16
+    $type = (int)$_GET['type'];
17
+    $id = (int)$_GET['id'];
18
+    $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
19
+    if($type && $id) {
20
+        $modx->unlockElement($type, $id, $includeAllUsers);
21
+        echo '1';
22
+        exit;
23
+    } else {
24
+        echo 'No type or id sent with request.';
25
+    }
26 26
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
6
-if(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+if (!isset($_GET['id'])) {
7
+	if (!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 
9 9
 	// Remove all locks
10 10
 	$modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks'));
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	header($header);
14 14
 } else {
15 15
 	// Remove single locks via AJAX / window.onbeforeunload
16
-	$type = (int)$_GET['type'];
17
-	$id = (int)$_GET['id'];
16
+	$type = (int) $_GET['type'];
17
+	$id = (int) $_GET['id'];
18 18
 	$includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
19
-	if($type && $id) {
19
+	if ($type && $id) {
20 20
 		$modx->unlockElement($type, $id, $includeAllUsers);
21 21
 		echo '1';
22 22
 		exit;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+	if(!$modx->hasPermission('remove_locks')) {
8
+	    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
+	}
8 10
 
9 11
 	// Remove all locks
10 12
 	$modx->getDatabase()->truncate($modx->getFullTableName('active_user_locks'));
Please login to merge, or discard this patch.
manager/processors/web_access_groups.processor.php 2 patches
Indentation   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 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
 if(!$modx->hasPermission('web_access_permissions')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 // web access group processor.
@@ -20,111 +20,111 @@  discard block
 block discarded – undo
20 20
 $operation = $_REQUEST['operation'];
21 21
 
22 22
 switch ($operation) {
23
-	case "add_user_group" :
24
-		$newgroup = $_REQUEST['newusergroup'];
25
-		if(empty($newgroup)) {
26
-			$modx->webAlertAndQuit("No group name specified.");
27
-		} else {
28
-			$id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_webgroup_names);
23
+    case "add_user_group" :
24
+        $newgroup = $_REQUEST['newusergroup'];
25
+        if(empty($newgroup)) {
26
+            $modx->webAlertAndQuit("No group name specified.");
27
+        } else {
28
+            $id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_webgroup_names);
29 29
 
30
-			// invoke OnWebCreateGroup event
31
-			$modx->invokeEvent('OnWebCreateGroup', array(
32
-				'groupid'   => $id,
33
-				'groupname' => $newgroup,
34
-			));
35
-		}
36
-	break;
37
-	case "add_document_group" :
38
-		$newgroup = $_REQUEST['newdocgroup'];
39
-		if(empty($newgroup)) {
40
-			$modx->webAlertAndQuit("No group name specified.");
41
-		} else {
42
-			$id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_documentgroup_names);
30
+            // invoke OnWebCreateGroup event
31
+            $modx->invokeEvent('OnWebCreateGroup', array(
32
+                'groupid'   => $id,
33
+                'groupname' => $newgroup,
34
+            ));
35
+        }
36
+    break;
37
+    case "add_document_group" :
38
+        $newgroup = $_REQUEST['newdocgroup'];
39
+        if(empty($newgroup)) {
40
+            $modx->webAlertAndQuit("No group name specified.");
41
+        } else {
42
+            $id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_documentgroup_names);
43 43
 
44
-			// invoke OnCreateDocGroup event
45
-			$modx->invokeEvent('OnCreateDocGroup', array(
46
-				'groupid'   => $id,
47
-				'groupname' => $newgroup,
48
-			));
49
-		}
50
-	break;
51
-	case "delete_user_group" :
52
-		$updategroupaccess = true;
53
-		$usergroup = (int)$_REQUEST['usergroup'];
54
-		if(empty($usergroup)) {
55
-			$modx->webAlertAndQuit("No user group id specified for deletion.");
56
-		} else {
57
-			$modx->getDatabase()->delete($tbl_webgroup_names, "id='{$usergroup}'");
44
+            // invoke OnCreateDocGroup event
45
+            $modx->invokeEvent('OnCreateDocGroup', array(
46
+                'groupid'   => $id,
47
+                'groupname' => $newgroup,
48
+            ));
49
+        }
50
+    break;
51
+    case "delete_user_group" :
52
+        $updategroupaccess = true;
53
+        $usergroup = (int)$_REQUEST['usergroup'];
54
+        if(empty($usergroup)) {
55
+            $modx->webAlertAndQuit("No user group id specified for deletion.");
56
+        } else {
57
+            $modx->getDatabase()->delete($tbl_webgroup_names, "id='{$usergroup}'");
58 58
 
59
-			$modx->getDatabase()->delete($tbl_webgroup_access, "webgroup='{$usergroup}'");
59
+            $modx->getDatabase()->delete($tbl_webgroup_access, "webgroup='{$usergroup}'");
60 60
 
61
-			$modx->getDatabase()->delete($tbl_web_groups, "webuser='{$usergroup}'");
62
-		}
63
-	break;
64
-	case "delete_document_group" :
65
-		$group = (int)$_REQUEST['documentgroup'];
66
-		if(empty($group)) {
67
-			$modx->webAlertAndQuit("No document group id specified for deletion.");
68
-		} else {
69
-			$modx->getDatabase()->delete($tbl_documentgroup_names, "id='{$group}'");
61
+            $modx->getDatabase()->delete($tbl_web_groups, "webuser='{$usergroup}'");
62
+        }
63
+    break;
64
+    case "delete_document_group" :
65
+        $group = (int)$_REQUEST['documentgroup'];
66
+        if(empty($group)) {
67
+            $modx->webAlertAndQuit("No document group id specified for deletion.");
68
+        } else {
69
+            $modx->getDatabase()->delete($tbl_documentgroup_names, "id='{$group}'");
70 70
 
71
-			$modx->getDatabase()->delete($tbl_webgroup_access, "documentgroup='{$group}'");
71
+            $modx->getDatabase()->delete($tbl_webgroup_access, "documentgroup='{$group}'");
72 72
 
73
-			$modx->getDatabase()->delete($tbl_document_groups, "document_group='{$group}'");
74
-		}
75
-	break;
76
-	case "rename_user_group" :
77
-		$newgroupname = $_REQUEST['newgroupname'];
78
-		if(empty($newgroupname)) {
79
-			$modx->webAlertAndQuit("No group name specified.");
80
-		}
81
-		$groupid = (int)$_REQUEST['groupid'];
82
-		if(empty($groupid)) {
83
-			$modx->webAlertAndQuit("No user group id specified for rename.");
84
-		}
85
-		$modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'");
86
-	break;
87
-	case "rename_document_group" :
88
-		$newgroupname = $_REQUEST['newgroupname'];
89
-		if(empty($newgroupname)) {
90
-			$modx->webAlertAndQuit("No group name specified.");
91
-		}
92
-		$groupid = (int)$_REQUEST['groupid'];
93
-		if(empty($groupid)) {
94
-			$modx->webAlertAndQuit("No document group id specified for rename.");
95
-		}
96
-		$modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'");
97
-	break;
98
-	case "add_document_group_to_user_group" :
99
-		$updategroupaccess = true;
100
-		$usergroup = (int)$_REQUEST['usergroup'];
101
-		$docgroup = (int)$_REQUEST['docgroup'];
102
-		$rs = $modx->getDatabase()->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'");
103
-		$limit = $modx->getDatabase()->getValue($rs);
104
-		if($limit<=0) {
105
-			$modx->getDatabase()->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access);
106
-		} else {
107
-			//alert user that coupling already exists?
108
-		}
109
-	break;
110
-	case "remove_document_group_from_user_group" :
111
-		$updategroupaccess = true;
112
-		$coupling = (int)$_REQUEST['coupling'];
113
-		$modx->getDatabase()->delete($tbl_webgroup_access, "id='{$coupling}'");
114
-	break;
115
-	default :
116
-		$modx->webAlertAndQuit("No operation set in request.");
73
+            $modx->getDatabase()->delete($tbl_document_groups, "document_group='{$group}'");
74
+        }
75
+    break;
76
+    case "rename_user_group" :
77
+        $newgroupname = $_REQUEST['newgroupname'];
78
+        if(empty($newgroupname)) {
79
+            $modx->webAlertAndQuit("No group name specified.");
80
+        }
81
+        $groupid = (int)$_REQUEST['groupid'];
82
+        if(empty($groupid)) {
83
+            $modx->webAlertAndQuit("No user group id specified for rename.");
84
+        }
85
+        $modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'");
86
+    break;
87
+    case "rename_document_group" :
88
+        $newgroupname = $_REQUEST['newgroupname'];
89
+        if(empty($newgroupname)) {
90
+            $modx->webAlertAndQuit("No group name specified.");
91
+        }
92
+        $groupid = (int)$_REQUEST['groupid'];
93
+        if(empty($groupid)) {
94
+            $modx->webAlertAndQuit("No document group id specified for rename.");
95
+        }
96
+        $modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'");
97
+    break;
98
+    case "add_document_group_to_user_group" :
99
+        $updategroupaccess = true;
100
+        $usergroup = (int)$_REQUEST['usergroup'];
101
+        $docgroup = (int)$_REQUEST['docgroup'];
102
+        $rs = $modx->getDatabase()->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'");
103
+        $limit = $modx->getDatabase()->getValue($rs);
104
+        if($limit<=0) {
105
+            $modx->getDatabase()->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access);
106
+        } else {
107
+            //alert user that coupling already exists?
108
+        }
109
+    break;
110
+    case "remove_document_group_from_user_group" :
111
+        $updategroupaccess = true;
112
+        $coupling = (int)$_REQUEST['coupling'];
113
+        $modx->getDatabase()->delete($tbl_webgroup_access, "id='{$coupling}'");
114
+    break;
115
+    default :
116
+        $modx->webAlertAndQuit("No operation set in request.");
117 117
 }
118 118
 
119 119
 // secure web documents - flag as private
120 120
 if($updategroupaccess==true){
121
-	include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122
-	secureWebDocument();
121
+    include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122
+    secureWebDocument();
123 123
 
124
-	// Update the private group column
125
-	$modx->getDatabase()->update(
126
-		'dgn.private_webgroup = (wga.webgroup IS NOT NULL)',
127
-		"{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_webgroup_access} AS wga ON wga.documentgroup = dgn.id");
124
+    // Update the private group column
125
+    $modx->getDatabase()->update(
126
+        'dgn.private_webgroup = (wga.webgroup IS NOT NULL)',
127
+        "{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_webgroup_access} AS wga ON wga.documentgroup = dgn.id");
128 128
 }
129 129
 
130 130
 $header = "Location: index.php?a=91";
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('web_access_permissions')) {
5
+if (!$modx->hasPermission('web_access_permissions')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 switch ($operation) {
23 23
 	case "add_user_group" :
24 24
 		$newgroup = $_REQUEST['newusergroup'];
25
-		if(empty($newgroup)) {
25
+		if (empty($newgroup)) {
26 26
 			$modx->webAlertAndQuit("No group name specified.");
27 27
 		} else {
28 28
 			$id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_webgroup_names);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	break;
37 37
 	case "add_document_group" :
38 38
 		$newgroup = $_REQUEST['newdocgroup'];
39
-		if(empty($newgroup)) {
39
+		if (empty($newgroup)) {
40 40
 			$modx->webAlertAndQuit("No group name specified.");
41 41
 		} else {
42 42
 			$id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_documentgroup_names);
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	break;
51 51
 	case "delete_user_group" :
52 52
 		$updategroupaccess = true;
53
-		$usergroup = (int)$_REQUEST['usergroup'];
54
-		if(empty($usergroup)) {
53
+		$usergroup = (int) $_REQUEST['usergroup'];
54
+		if (empty($usergroup)) {
55 55
 			$modx->webAlertAndQuit("No user group id specified for deletion.");
56 56
 		} else {
57 57
 			$modx->getDatabase()->delete($tbl_webgroup_names, "id='{$usergroup}'");
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 		}
63 63
 	break;
64 64
 	case "delete_document_group" :
65
-		$group = (int)$_REQUEST['documentgroup'];
66
-		if(empty($group)) {
65
+		$group = (int) $_REQUEST['documentgroup'];
66
+		if (empty($group)) {
67 67
 			$modx->webAlertAndQuit("No document group id specified for deletion.");
68 68
 		} else {
69 69
 			$modx->getDatabase()->delete($tbl_documentgroup_names, "id='{$group}'");
@@ -75,33 +75,33 @@  discard block
 block discarded – undo
75 75
 	break;
76 76
 	case "rename_user_group" :
77 77
 		$newgroupname = $_REQUEST['newgroupname'];
78
-		if(empty($newgroupname)) {
78
+		if (empty($newgroupname)) {
79 79
 			$modx->webAlertAndQuit("No group name specified.");
80 80
 		}
81
-		$groupid = (int)$_REQUEST['groupid'];
82
-		if(empty($groupid)) {
81
+		$groupid = (int) $_REQUEST['groupid'];
82
+		if (empty($groupid)) {
83 83
 			$modx->webAlertAndQuit("No user group id specified for rename.");
84 84
 		}
85 85
 		$modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'");
86 86
 	break;
87 87
 	case "rename_document_group" :
88 88
 		$newgroupname = $_REQUEST['newgroupname'];
89
-		if(empty($newgroupname)) {
89
+		if (empty($newgroupname)) {
90 90
 			$modx->webAlertAndQuit("No group name specified.");
91 91
 		}
92
-		$groupid = (int)$_REQUEST['groupid'];
93
-		if(empty($groupid)) {
92
+		$groupid = (int) $_REQUEST['groupid'];
93
+		if (empty($groupid)) {
94 94
 			$modx->webAlertAndQuit("No document group id specified for rename.");
95 95
 		}
96 96
 		$modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'");
97 97
 	break;
98 98
 	case "add_document_group_to_user_group" :
99 99
 		$updategroupaccess = true;
100
-		$usergroup = (int)$_REQUEST['usergroup'];
101
-		$docgroup = (int)$_REQUEST['docgroup'];
100
+		$usergroup = (int) $_REQUEST['usergroup'];
101
+		$docgroup = (int) $_REQUEST['docgroup'];
102 102
 		$rs = $modx->getDatabase()->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'");
103 103
 		$limit = $modx->getDatabase()->getValue($rs);
104
-		if($limit<=0) {
104
+		if ($limit <= 0) {
105 105
 			$modx->getDatabase()->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access);
106 106
 		} else {
107 107
 			//alert user that coupling already exists?
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	break;
110 110
 	case "remove_document_group_from_user_group" :
111 111
 		$updategroupaccess = true;
112
-		$coupling = (int)$_REQUEST['coupling'];
112
+		$coupling = (int) $_REQUEST['coupling'];
113 113
 		$modx->getDatabase()->delete($tbl_webgroup_access, "id='{$coupling}'");
114 114
 	break;
115 115
 	default :
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 }
118 118
 
119 119
 // secure web documents - flag as private
120
-if($updategroupaccess==true){
120
+if ($updategroupaccess == true) {
121 121
 	include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122 122
 	secureWebDocument();
123 123
 
Please login to merge, or discard this patch.
manager/processors/delete_plugin.processor.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 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
 if(!$modx->hasPermission('delete_plugin')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10 10
 if($id==0) {
11
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
11
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // Set the item name for logger
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 
18 18
 // invoke OnBeforePluginFormDelete event
19 19
 $modx->invokeEvent("OnBeforePluginFormDelete",
20
-	array(
21
-		"id"	=> $id
22
-	));
20
+    array(
21
+        "id"	=> $id
22
+    ));
23 23
 
24 24
 // delete the plugin.
25 25
 $modx->getDatabase()->delete($modx->getFullTableName('site_plugins'), "id='{$id}'");
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 
30 30
 // invoke OnPluginFormDelete event
31 31
 $modx->invokeEvent("OnPluginFormDelete",
32
-	array(
33
-		"id"	=> $id
34
-	));
32
+    array(
33
+        "id"	=> $id
34
+    ));
35 35
 
36 36
 // empty cache
37 37
 $modx->clearCache('full');
Please login to merge, or discard this patch.