Completed
Push — develop ( 8dee05 )
by Dmytro
20:08
created
manager/actions/modules.static.php 2 patches
Spacing   +11 added lines, -11 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'))) {
@@ -107,22 +107,22 @@  discard block
 block discarded – undo
107 107
     <div class="table-responsive">
108 108
         <?php
109 109
         if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
110
-            $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon
111
-				FROM ' . $modx->getDatabase()->getFullTableName('site_modules') . ' AS sm
112
-				LEFT JOIN ' . $modx->getDatabase()->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
113
-				LEFT JOIN ' . $modx->getDatabase()->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
114
-                WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1
110
+            $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"'.$_lang['yes'].'","-") as disabled, IF(sm.icon<>"",sm.icon,"'.$_style['icons_modules'].'") as icon
111
+				FROM ' . $modx->getDatabase()->getFullTableName('site_modules').' AS sm
112
+				LEFT JOIN ' . $modx->getDatabase()->getFullTableName('site_module_access').' AS sma ON sma.module = sm.id
113
+				LEFT JOIN ' . $modx->getDatabase()->getFullTableName('member_groups').' AS mg ON sma.usergroup = mg.user_group
114
+                WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID().') AND sm.disabled != 1 AND sm.locked != 1
115 115
                 ORDER BY sm.name');
116 116
             if ($modx->hasPermission('edit_module')) {
117
-                $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
117
+                $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
118 118
             } else if ($modx->hasPermission('exec_module')) {
119
-                $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
119
+                $title = "<a href='index.php?a=112&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
120 120
             } else {
121 121
                 $title = '[+value+]';
122 122
             }
123 123
         } else {
124 124
             $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getDatabase()->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name");
125
-            $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
125
+            $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>";
126 126
         }
127 127
         $grd = new \EvolutionCMS\Support\DataGrid('', $rs, $number_of_results); // set page size to 0 t show all items
128 128
         $grd->noRecordMsg = $_lang["no_records_found"];
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
         $grd->itemClass = "tableItem";
132 132
         $grd->altItemClass = "tableAltItem";
133 133
         $grd->fields = "icon,name,description,locked,disabled";
134
-        $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["description"] . " ," . $_lang["locked"] . " ," . $_lang["disabled"];
134
+        $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["description"]." ,".$_lang["locked"]." ,".$_lang["disabled"];
135 135
         $grd->colWidths = "34,,,60,60";
136 136
         $grd->colAligns = "center,,,center,center";
137
-        $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title;
137
+        $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='[+value+]'></i></a>||template:".$title;
138 138
         if ($listmode == '1') {
139 139
             $grd->pageSize = 0;
140 140
         }
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;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 // context menu
28 28
 $cm = new \EvolutionCMS\Support\ContextMenu("cntxm", 150);
29 29
 $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0));
30
-if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
30
+if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
31 31
     $cm->addSeparator();
32 32
 }
33 33
 $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['actions_edit'], (!$modx->hasPermission('edit_module') ? 1 : 0));
@@ -106,21 +106,21 @@  discard block
 block discarded – undo
106 106
 <div class="tab-page">
107 107
     <div class="table-responsive">
108 108
         <?php
109
-        if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
109
+        if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
110 110
             $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon
111 111
 				FROM ' . $modx->getDatabase()->getFullTableName('site_modules') . ' AS sm
112 112
 				LEFT JOIN ' . $modx->getDatabase()->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
113 113
 				LEFT JOIN ' . $modx->getDatabase()->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
114 114
                 WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1
115 115
                 ORDER BY sm.name');
116
-            if ($modx->hasPermission('edit_module')) {
116
+            if ($modx->hasPermission('edit_module')) {
117 117
                 $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
118
-            } else if ($modx->hasPermission('exec_module')) {
118
+            } else if ($modx->hasPermission('exec_module')) {
119 119
                 $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
120
-            } else {
120
+            } else {
121 121
                 $title = '[+value+]';
122 122
             }
123
-        } else {
123
+        } else {
124 124
             $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getDatabase()->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name");
125 125
             $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>";
126 126
         }
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
         $grd->colWidths = "34,,,60,60";
136 136
         $grd->colAligns = "center,,,center,center";
137 137
         $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title;
138
-        if ($listmode == '1') {
138
+        if ($listmode == '1') {
139 139
             $grd->pageSize = 0;
140 140
         }
141
-        if ($_REQUEST['op'] == 'reset') {
141
+        if ($_REQUEST['op'] == 'reset') {
142 142
             $grd->pageNumber = 1;
143 143
         }
144 144
         // render grid
Please login to merge, or discard this patch.
manager/actions/user_management.static.php 2 patches
Indentation   +53 added lines, -53 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('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->getDatabase()->escape($query);
19
-	$_PAGE['vs']['search'] = $query;
17
+    $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18
+    $sqlQuery = $modx->getDatabase()->escape($query);
19
+    $_PAGE['vs']['search'] = $query;
20 20
 }
21 21
 
22 22
 // get & save listmode
@@ -119,54 +119,54 @@  discard block
 block discarded – undo
119 119
 			<div class="row">
120 120
 				<div class="table-responsive">
121 121
 					<?php
122
-					$where = "";
123
-					if(!$modx->hasPermission('save_role')) {
124
-						$where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
125
-					}
126
-					if(!empty($sqlQuery)) {
127
-						$where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
128
-					}
129
-					$ds = $modx->getDatabase()->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin, mua.logincount", $modx->getDatabase()->getFullTableName('manager_users') . " AS mu 
122
+                    $where = "";
123
+                    if(!$modx->hasPermission('save_role')) {
124
+                        $where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
125
+                    }
126
+                    if(!empty($sqlQuery)) {
127
+                        $where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
128
+                    }
129
+                    $ds = $modx->getDatabase()->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin, mua.logincount", $modx->getDatabase()->getFullTableName('manager_users') . " AS mu 
130 130
 			INNER JOIN " . $modx->getDatabase()->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id 
131 131
 			LEFT JOIN " . $modx->getDatabase()->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
132
-					$grd = new \EvolutionCMS\Support\DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
133
-					$grd->noRecordMsg = $_lang["no_records_found"];
134
-					$grd->cssClass = "table data";
135
-					$grd->columnHeaderClass = "tableHeader";
136
-					$grd->itemClass = "tableItem";
137
-					$grd->altItemClass = "tableAltItem";
138
-					$grd->fields = "id,username,fullname,role,email,thislogin,logincount,blocked";
139
-					$grd->columns = implode(',', array(
140
-						$_lang["icon"],
141
-						$_lang["name"],
142
-						$_lang["user_full_name"],
143
-						$_lang['role'],
144
-						$_lang["email"],
145
-						$_lang["user_prevlogin"],
146
-						$_lang["user_logincount"],
147
-						$_lang["user_block"]
148
-					));
149
-					$grd->colWidths = "1%,,,,,1%,1%,1%";
150
-					$grd->colAligns = "center,,,,,right' nowrap='nowrap,right,center";
151
-					$grd->colTypes = implode('||', array(
152
-						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
153
-						'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
154
-						'template:[+fullname+]',
155
-						'template:[+role+]',
156
-						'template:[+email+]',
157
-						'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M',
158
-						'template:[+logincount+]',
159
-						'template:[+blocked+]'
160
-					));
161
-					if($listmode == '1') {
162
-						$grd->pageSize = 0;
163
-					}
164
-					if($_REQUEST['op'] == 'reset') {
165
-						$grd->pageNumber = 1;
166
-					}
167
-					// render grid
168
-					echo $grd->render();
169
-					?>
132
+                    $grd = new \EvolutionCMS\Support\DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
133
+                    $grd->noRecordMsg = $_lang["no_records_found"];
134
+                    $grd->cssClass = "table data";
135
+                    $grd->columnHeaderClass = "tableHeader";
136
+                    $grd->itemClass = "tableItem";
137
+                    $grd->altItemClass = "tableAltItem";
138
+                    $grd->fields = "id,username,fullname,role,email,thislogin,logincount,blocked";
139
+                    $grd->columns = implode(',', array(
140
+                        $_lang["icon"],
141
+                        $_lang["name"],
142
+                        $_lang["user_full_name"],
143
+                        $_lang['role'],
144
+                        $_lang["email"],
145
+                        $_lang["user_prevlogin"],
146
+                        $_lang["user_logincount"],
147
+                        $_lang["user_block"]
148
+                    ));
149
+                    $grd->colWidths = "1%,,,,,1%,1%,1%";
150
+                    $grd->colAligns = "center,,,,,right' nowrap='nowrap,right,center";
151
+                    $grd->colTypes = implode('||', array(
152
+                        'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
153
+                        'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
154
+                        'template:[+fullname+]',
155
+                        'template:[+role+]',
156
+                        'template:[+email+]',
157
+                        'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M',
158
+                        'template:[+logincount+]',
159
+                        'template:[+blocked+]'
160
+                    ));
161
+                    if($listmode == '1') {
162
+                        $grd->pageSize = 0;
163
+                    }
164
+                    if($_REQUEST['op'] == 'reset') {
165
+                        $grd->pageNumber = 1;
166
+                    }
167
+                    // render grid
168
+                    echo $grd->render();
169
+                    ?>
170 170
 				</div>
171 171
 			</div>
172 172
 		</div>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 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('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->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 16
 } else {
@@ -120,15 +120,15 @@  discard block
 block discarded – undo
120 120
 				<div class="table-responsive">
121 121
 					<?php
122 122
 					$where = "";
123
-					if(!$modx->hasPermission('save_role')) {
124
-						$where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
123
+					if (!$modx->hasPermission('save_role')) {
124
+						$where .= (empty($where) ? "" : " AND ")."mua.role != 1";
125 125
 					}
126
-					if(!empty($sqlQuery)) {
127
-						$where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
126
+					if (!empty($sqlQuery)) {
127
+						$where .= (empty($where) ? "" : " AND ")."((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
128 128
 					}
129
-					$ds = $modx->getDatabase()->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin, mua.logincount", $modx->getDatabase()->getFullTableName('manager_users') . " AS mu 
130
-			INNER JOIN " . $modx->getDatabase()->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id 
131
-			LEFT JOIN " . $modx->getDatabase()->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
129
+					$ds = $modx->getDatabase()->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin, mua.logincount", $modx->getDatabase()->getFullTableName('manager_users')." AS mu 
130
+			INNER JOIN " . $modx->getDatabase()->getFullTableName('user_attributes')." AS mua ON mua.internalKey=mu.id 
131
+			LEFT JOIN " . $modx->getDatabase()->getFullTableName('user_roles')." AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
132 132
 					$grd = new \EvolutionCMS\Support\DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
133 133
 					$grd->noRecordMsg = $_lang["no_records_found"];
134 134
 					$grd->cssClass = "table data";
@@ -149,19 +149,19 @@  discard block
 block discarded – undo
149 149
 					$grd->colWidths = "1%,,,,,1%,1%,1%";
150 150
 					$grd->colAligns = "center,,,,,right' nowrap='nowrap,right,center";
151 151
 					$grd->colTypes = implode('||', array(
152
-						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
153
-						'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
152
+						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="'.$_lang['click_to_context'].'"><i class="'.$_style['icons_user'].'"></i></a>',
153
+						'template:<a href="index.php?a=12&id=[+id+]" title="'.$_lang['click_to_edit_title'].'">[+value+]</a>',
154 154
 						'template:[+fullname+]',
155 155
 						'template:[+role+]',
156 156
 						'template:[+email+]',
157
-						'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M',
157
+						'date: '.$modx->toDateFormat('[+thislogin+]', 'formatOnly').' %H:%M',
158 158
 						'template:[+logincount+]',
159 159
 						'template:[+blocked+]'
160 160
 					));
161
-					if($listmode == '1') {
161
+					if ($listmode == '1') {
162 162
 						$grd->pageSize = 0;
163 163
 					}
164
-					if($_REQUEST['op'] == 'reset') {
164
+					if ($_REQUEST['op'] == 'reset') {
165 165
 						$grd->pageNumber = 1;
166 166
 					}
167 167
 					// render grid
Please login to merge, or discard this patch.
manager/actions/logging.static.php 2 patches
Spacing   +27 added lines, -27 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('logs')) {
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
                             $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username');
29 29
                             foreach ($logs_user as $row) {
30 30
                                 $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : '';
31
-                                echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n";
31
+                                echo "\t\t".'<option value="'.$row['internalKey'].'"'.$selectedtext.'>'.$row['username']."</option>\n";
32 32
                             }
33 33
                             ?>
34 34
                         </select>
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                                     continue;
50 50
                                 }
51 51
                                 $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : '';
52
-                                echo "\t\t" . '<option value="' . $row['action'] . '"' . $selectedtext . '>' . $row['action'] . ' - ' . $action . "</option>\n";
52
+                                echo "\t\t".'<option value="'.$row['action'].'"'.$selectedtext.'>'.$row['action'].' - '.$action."</option>\n";
53 53
                             }
54 54
                             ?>
55 55
                         </select>
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                             $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid');
66 66
                             foreach ($logs_items as $row) {
67 67
                                 $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : '';
68
-                                echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n";
68
+                                echo "\t\t".'<option value="'.$row['itemid'].'"'.$selectedtext.'>'.$row['itemid']."</option>\n";
69 69
                             }
70 70
                             ?>
71 71
                         </select>
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                             $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname');
82 82
                             foreach ($logs_names as $row) {
83 83
                                 $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : '';
84
-                                echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n";
84
+                                echo "\t\t".'<option value="'.$row['itemname'].'"'.$selectedtext.'>'.$row['itemname']."</option>\n";
85 85
                             }
86 86
                             ?>
87 87
                         </select>
@@ -139,26 +139,26 @@  discard block
 block discarded – undo
139 139
     // get the selections the user made.
140 140
     $sqladd = array();
141 141
     if ($_REQUEST['searchuser'] != 0) {
142
-        $sqladd[] = "internalKey='" . (int)$_REQUEST['searchuser'] . "'";
142
+        $sqladd[] = "internalKey='".(int) $_REQUEST['searchuser']."'";
143 143
     }
144 144
     if ($_REQUEST['action'] != 0) {
145
-        $sqladd[] = "action=" . (int)$_REQUEST['action'];
145
+        $sqladd[] = "action=".(int) $_REQUEST['action'];
146 146
     }
147 147
     if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
148
-        $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'";
148
+        $sqladd[] = "itemid='".$_REQUEST['itemid']."'";
149 149
     }
150 150
     if ($_REQUEST['itemname'] != '0') {
151
-        $sqladd[] = "itemname='" . $modx->getDatabase()->escape($_REQUEST['itemname']) . "'";
151
+        $sqladd[] = "itemname='".$modx->getDatabase()->escape($_REQUEST['itemname'])."'";
152 152
     }
153 153
     if ($_REQUEST['message'] != "") {
154
-        $sqladd[] = "message LIKE '%" . $modx->getDatabase()->escape($_REQUEST['message']) . "%'";
154
+        $sqladd[] = "message LIKE '%".$modx->getDatabase()->escape($_REQUEST['message'])."%'";
155 155
     }
156 156
     // date stuff
157 157
     if ($_REQUEST['datefrom'] != "") {
158
-        $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']);
158
+        $sqladd[] = "timestamp>".$modx->toTimeStamp($_REQUEST['datefrom']);
159 159
     }
160 160
     if ($_REQUEST['dateto'] != "") {
161
-        $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']);
161
+        $sqladd[] = "timestamp<".$modx->toTimeStamp($_REQUEST['dateto']);
162 162
     }
163 163
 
164 164
     // If current position is not set, set it to zero
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     // Number of result to display on the page, will be in the LIMIT of the sql query also
172 172
     $int_num_result = is_numeric($_REQUEST['nrresults']) ? $_REQUEST['nrresults'] : $number_of_logs;
173 173
 
174
-    $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)
174
+    $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)
175 175
 
176 176
     // build the sql
177 177
     $limit = $num_rows = $modx->getDatabase()->getValue($modx->getDatabase()->select('COUNT(*)', $modx->getDatabase()->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : '')));
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
     $rs = $modx->getDatabase()->select('*', $modx->getDatabase()->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}");
180 180
 
181 181
 if ($limit < 1) {
182
-    echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>';
182
+    echo '<p>'.$_lang["mgrlog_emptysrch"].'</p>';
183 183
 } else {
184
-    echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>';
184
+    echo '<p>'.$_lang["mgrlog_sortinst"].'</p>';
185 185
 
186 186
     // New instance of the Paging class, you can modify the color and the width of the html table
187 187
     $p = new EvolutionCMS\Support\Paginate($num_rows, $int_cur_position, $int_num_result, $extargv);
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
     $current_row = $int_cur_position / $int_num_result;
193 193
 
194 194
     // Display the result as you like...
195
-    print "<p>" . $_lang["paging_showing"] . " " . $array_paging['lower'];
196
-    print " " . $_lang["paging_to"] . " " . $array_paging['upper'];
197
-    print " (" . $array_paging['total'] . " " . $_lang["paging_total"] . ")<br />";
198
-    $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " ");
199
-    $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " ");
195
+    print "<p>".$_lang["paging_showing"]." ".$array_paging['lower'];
196
+    print " ".$_lang["paging_to"]." ".$array_paging['upper'];
197
+    print " (".$array_paging['total']." ".$_lang["paging_total"].")<br />";
198
+    $paging = $array_paging['first_link'].$_lang["paging_first"].(isset($array_paging['first_link']) ? "</a> " : " ");
199
+    $paging .= $array_paging['previous_link'].$_lang["paging_prev"].(isset($array_paging['previous_link']) ? "</a> " : " ");
200 200
     $pagesfound = sizeof($array_row_paging);
201 201
     if ($pagesfound > 6) {
202 202
         $paging .= $array_row_paging[$current_row - 2]; // ."&nbsp;";
@@ -206,11 +206,11 @@  discard block
 block discarded – undo
206 206
         $paging .= $array_row_paging[$current_row + 2]; // ."&nbsp;";
207 207
     } else {
208 208
         for ($i = 0; $i < $pagesfound; $i++) {
209
-            $paging .= $array_row_paging[$i] . "&nbsp;";
209
+            $paging .= $array_row_paging[$i]."&nbsp;";
210 210
         }
211 211
     }
212
-    $paging .= $array_paging['next_link'] . $_lang["paging_next"] . (isset($array_paging['next_link']) ? "</a> " : " ") . " ";
213
-    $paging .= $array_paging['last_link'] . $_lang["paging_last"] . (isset($array_paging['last_link']) ? "</a> " : " ") . " ";
212
+    $paging .= $array_paging['next_link'].$_lang["paging_next"].(isset($array_paging['next_link']) ? "</a> " : " ")." ";
213
+    $paging .= $array_paging['last_link'].$_lang["paging_last"].(isset($array_paging['last_link']) ? "</a> " : " ")." ";
214 214
     // The above exemple print somethings like:
215 215
     // 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 >>>
216 216
     // Of course you can now play with array_row_paging in order to print
@@ -246,16 +246,16 @@  discard block
 block discarded – undo
246 246
                     if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
247 247
                         $item = '<div style="text-align:center;">-</div>';
248 248
                     } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
249
-                        $item = '<a href="index.php?a=3&amp;id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>';
249
+                        $item = '<a href="index.php?a=3&amp;id='.$logentry['itemid'].'">'.$logentry['itemname'].'</a>';
250 250
                     } else {
251 251
                         $item = $logentry['itemname'];
252 252
                     }
253 253
                     //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true'
254
-                    $user_drill = 'index.php?a=13&searchuser=' . $logentry['internalKey'] . '&itemname=0&log_submit=true';
254
+                    $user_drill = 'index.php?a=13&searchuser='.$logentry['internalKey'].'&itemname=0&log_submit=true';
255 255
                     ?>
256 256
                     <tr>
257
-                        <td><?= '<a href="' . $user_drill . '">' . $logentry['username'] . '</a>' ?></td>
258
-                        <td class="text-nowrap"><?= '[' . $logentry['action'] . '] ' . $logentry['message'] ?></td>
257
+                        <td><?= '<a href="'.$user_drill.'">'.$logentry['username'].'</a>' ?></td>
258
+                        <td class="text-nowrap"><?= '['.$logentry['action'].'] '.$logentry['message'] ?></td>
259 259
                         <td class="text-xs-right"><?= $logentry['itemid'] ?></td>
260 260
                         <td><?= $item ?></td>
261 261
                         <td class="text-nowrap"><?= $modx->toDateFormat($logentry['timestamp'] + $server_offset_time) ?></td>
Please login to merge, or discard this patch.
Braces   +27 added lines, -27 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('logs')) {
5
+if (!$modx->hasPermission('logs')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                             <?php
27 27
                             // get all users currently in the log
28 28
                             $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username');
29
-                            foreach ($logs_user as $row) {
29
+                            foreach ($logs_user as $row) {
30 30
                                 $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : '';
31 31
                                 echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n";
32 32
                             }
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
                             <?php
43 43
                             // get all available actions in the log
44 44
                             $logs_actions = record_sort(array_unique_multi($logs, 'action'), 'action');
45
-                            foreach ($logs_actions as $row) {
45
+                            foreach ($logs_actions as $row) {
46 46
                                 $action = EvolutionCMS\Legacy\LogHandler::getAction($row['action']);
47
-                                if ($action == 'Idle') {
47
+                                if ($action == 'Idle') {
48 48
                                     continue;
49 49
                                 }
50 50
                                 $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : '';
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                             <?php
63 63
                             // get all itemid currently in logging
64 64
                             $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid');
65
-                            foreach ($logs_items as $row) {
65
+                            foreach ($logs_items as $row) {
66 66
                                 $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : '';
67 67
                                 echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n";
68 68
                             }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                             <?php
79 79
                             // get all itemname currently in logging
80 80
                             $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname');
81
-                            foreach ($logs_names as $row) {
81
+                            foreach ($logs_names as $row) {
82 82
                                 $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : '';
83 83
                                 echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n";
84 84
                             }
@@ -134,36 +134,36 @@  discard block
 block discarded – undo
134 134
     <div class="container container-body">
135 135
 
136 136
 <?php
137
-if (isset($_REQUEST['log_submit'])) {
137
+if (isset($_REQUEST['log_submit'])) {
138 138
     // get the selections the user made.
139 139
     $sqladd = array();
140
-    if ($_REQUEST['searchuser'] != 0) {
140
+    if ($_REQUEST['searchuser'] != 0) {
141 141
         $sqladd[] = "internalKey='" . (int)$_REQUEST['searchuser'] . "'";
142 142
     }
143
-    if ($_REQUEST['action'] != 0) {
143
+    if ($_REQUEST['action'] != 0) {
144 144
         $sqladd[] = "action=" . (int)$_REQUEST['action'];
145 145
     }
146
-    if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
146
+    if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
147 147
         $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'";
148 148
     }
149
-    if ($_REQUEST['itemname'] != '0') {
149
+    if ($_REQUEST['itemname'] != '0') {
150 150
         $sqladd[] = "itemname='" . $modx->getDatabase()->escape($_REQUEST['itemname']) . "'";
151 151
     }
152
-    if ($_REQUEST['message'] != "") {
152
+    if ($_REQUEST['message'] != "") {
153 153
         $sqladd[] = "message LIKE '%" . $modx->getDatabase()->escape($_REQUEST['message']) . "%'";
154 154
     }
155 155
     // date stuff
156
-    if ($_REQUEST['datefrom'] != "") {
156
+    if ($_REQUEST['datefrom'] != "") {
157 157
         $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']);
158 158
     }
159
-    if ($_REQUEST['dateto'] != "") {
159
+    if ($_REQUEST['dateto'] != "") {
160 160
         $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']);
161 161
     }
162 162
 
163 163
     // If current position is not set, set it to zero
164
-    if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
164
+    if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
165 165
         $int_cur_position = 0;
166
-    } else {
166
+    } else {
167 167
         $int_cur_position = $_REQUEST['int_cur_position'];
168 168
     }
169 169
 
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 
178 178
     $rs = $modx->getDatabase()->select('*', $modx->getDatabase()->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}");
179 179
 
180
-if ($limit < 1) {
180
+if ($limit < 1) {
181 181
     echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>';
182
-} else {
182
+} else {
183 183
     echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>';
184 184
 
185 185
     // New instance of the Paging class, you can modify the color and the width of the html table
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
     $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " ");
198 198
     $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " ");
199 199
     $pagesfound = sizeof($array_row_paging);
200
-    if ($pagesfound > 6) {
200
+    if ($pagesfound > 6) {
201 201
         $paging .= $array_row_paging[$current_row - 2]; // ."&nbsp;";
202 202
         $paging .= $array_row_paging[$current_row - 1]; // ."&nbsp;";
203 203
         $paging .= $array_row_paging[$current_row]; // ."&nbsp;";
204 204
         $paging .= $array_row_paging[$current_row + 1]; // ."&nbsp;";
205 205
         $paging .= $array_row_paging[$current_row + 2]; // ."&nbsp;";
206
-    } else {
207
-        for ($i = 0; $i < $pagesfound; $i++) {
206
+    } else {
207
+        for ($i = 0; $i < $pagesfound; $i++) {
208 208
             $paging .= $array_row_paging[$i] . "&nbsp;";
209 209
         }
210 210
     }
@@ -241,12 +241,12 @@  discard block
 block discarded – undo
241 241
                 // grab the entire log file...
242 242
                 $logentries = array();
243 243
                 $i = 0;
244
-                while ($logentry = $modx->getDatabase()->getRow($rs)) {
245
-                    if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
244
+                while ($logentry = $modx->getDatabase()->getRow($rs)) {
245
+                    if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
246 246
                         $item = '<div style="text-align:center;">-</div>';
247
-                    } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
247
+                    } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
248 248
                         $item = '<a href="index.php?a=3&amp;id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>';
249
-                    } else {
249
+                    } else {
250 250
                         $item = $logentry['itemname'];
251 251
                     }
252 252
                     //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true'
@@ -283,6 +283,6 @@  discard block
 block discarded – undo
283 283
     // @see index.php @ 915
284 284
     global $action;
285 285
     $action = 1;
286
-} else {
286
+} else {
287 287
     echo $_lang["mgrlog_noquery"];
288 288
 }
Please login to merge, or discard this patch.
manager/includes/user_settings.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 if (!empty($user_id)) {
15 15
     // Raymond: grab the user settings from the database.
16 16
     $rs = $modx->getDatabase()->select('setting_name, setting_value', $modx->getDatabase()->getFullTableName('user_settings'),
17
-        "user=" . $modx->getLoginUserID());
17
+        "user=".$modx->getLoginUserID());
18 18
 
19 19
     $which_browser_default = $which_browser;
20 20
     while ($row = $modx->getDatabase()->getRow($rs)) {
Please login to merge, or discard this patch.
manager/includes/secure_mgr_documents.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@
 block discarded – undo
20 20
         ($docid > 0 ? "id='$docid'" : "privatemgr = 1"));
21 21
     $rs = $modx->getDatabase()->select(
22 22
         'DISTINCT sc.id',
23
-        $modx->getDatabase()->getFullTableName("site_content") . " sc
24
-			LEFT JOIN " . $modx->getDatabase()->getFullTableName("document_groups") . " dg ON dg.document = sc.id
25
-			LEFT JOIN " . $modx->getDatabase()->getFullTableName("membergroup_access") . " mga ON mga.documentgroup = dg.document_group",
26
-        ($docid > 0 ? " sc.id='{$docid}' AND " : "") . "mga.id>0"
23
+        $modx->getDatabase()->getFullTableName("site_content")." sc
24
+			LEFT JOIN " . $modx->getDatabase()->getFullTableName("document_groups")." dg ON dg.document = sc.id
25
+			LEFT JOIN " . $modx->getDatabase()->getFullTableName("membergroup_access")." mga ON mga.documentgroup = dg.document_group",
26
+        ($docid > 0 ? " sc.id='{$docid}' AND " : "")."mga.id>0"
27 27
     );
28 28
     $ids = $modx->getDatabase()->getColumn("id", $rs);
29 29
     if (count($ids) > 0) {
30 30
         $modx->getDatabase()->update('privatemgr = 1', $modx->getDatabase()->getFullTableName("site_content"),
31
-            "id IN (" . implode(", ", $ids) . ")");
31
+            "id IN (".implode(", ", $ids).")");
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
manager/includes/messageCount.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,15 +4,15 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 $rs = $modx->getDatabase()->select('COUNT(*)', $modx->getDatabase()->getFullTableName('user_messages'),
7
-    "recipient=" . $modx->getLoginUserID() . " AND messageread=0");
7
+    "recipient=".$modx->getLoginUserID()." AND messageread=0");
8 8
 $nrnewmessages = $modx->getDatabase()->getValue($rs);
9
-$rs = $modx->getDatabase()->select('COUNT(*)', $modx->getDatabase()->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID());
9
+$rs = $modx->getDatabase()->select('COUNT(*)', $modx->getDatabase()->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID());
10 10
 $nrtotalmessages = $modx->getDatabase()->getValue($rs);
11 11
 $messagesallowed = $modx->hasPermission('messages');
12 12
 
13 13
 // ajax response
14 14
 if (isset($_POST['updateMsgCount'])) {
15 15
     header("Content-Type: application/json; charset=utf-8");
16
-    print $nrnewmessages . ',' . $nrtotalmessages;
16
+    print $nrnewmessages.','.$nrtotalmessages;
17 17
     exit;
18 18
 }
Please login to merge, or discard this patch.
manager/includes/secure_web_documents.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@
 block discarded – undo
20 20
         ($docid > 0 ? "id='$docid'" : "privateweb = 1"));
21 21
     $rs = $modx->getDatabase()->select(
22 22
         'DISTINCT sc.id',
23
-        $modx->getDatabase()->getFullTableName("site_content") . " sc
24
-			LEFT JOIN " . $modx->getDatabase()->getFullTableName("document_groups") . " dg ON dg.document = sc.id
25
-			LEFT JOIN " . $modx->getDatabase()->getFullTableName("webgroup_access") . " wga ON wga.documentgroup = dg.document_group",
26
-        ($docid > 0 ? " sc.id='{$docid}' AND " : "") . "wga.id>0"
23
+        $modx->getDatabase()->getFullTableName("site_content")." sc
24
+			LEFT JOIN " . $modx->getDatabase()->getFullTableName("document_groups")." dg ON dg.document = sc.id
25
+			LEFT JOIN " . $modx->getDatabase()->getFullTableName("webgroup_access")." wga ON wga.documentgroup = dg.document_group",
26
+        ($docid > 0 ? " sc.id='{$docid}' AND " : "")."wga.id>0"
27 27
     );
28 28
     $ids = $modx->getDatabase()->getColumn("id", $rs);
29 29
     if (count($ids) > 0) {
30 30
         $modx->getDatabase()->update('privateweb = 1', $modx->getDatabase()->getFullTableName("site_content"),
31
-            "id IN (" . implode(", ", $ids) . ")");
31
+            "id IN (".implode(", ", $ids).")");
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
manager/includes/categories.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     $newCat = $modx->getDatabase()->escape($newCat);
35 35
     $cats = $modx->getDatabase()->select('id', $modx->getDatabase()->getFullTableName('categories'), "category='{$newCat}'");
36 36
     if ($cat = $modx->getDatabase()->getValue($cats)) {
37
-        return (int)$cat;
37
+        return (int) $cat;
38 38
     }
39 39
 
40 40
     return 0;
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/tpl/tpl_javascript.php 1 patch
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 <script src="js/FileAPI/FileAPI.exif.js" type="text/javascript"></script>
8 8
 <script src="js/browser/joiner.php" type="text/javascript"></script>
9 9
 <script src="js_localize.php?lng=<?php echo $this->lang ?>" type="text/javascript"></script>
10
-<?php IF (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
10
+<?php if (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
11 11
 <script src="<?php echo $this->config['_tinyMCEPath'] ?>/tiny_mce_popup.js" type="text/javascript"></script>
12
-<?php ENDIF ?>
13
-<?php IF (file_exists("themes/{$this->config['theme']}/init.js")): ?>
12
+<?php endif ?>
13
+<?php if (file_exists("themes/{$this->config['theme']}/init.js")): ?>
14 14
 <script src="themes/<?php echo $this->config['theme'] ?>/init.js" type="text/javascript"></script>
15
-<?php ENDIF ?>
15
+<?php endif ?>
16 16
 <script type="text/javascript">
17 17
 browser.version = "<?php echo self::VERSION ?>";
18 18
 browser.support.chromeFrame = <?php echo (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), " chromeframe") !== false) ? "true" : "false" ?>;
@@ -29,19 +29,19 @@  discard block
 block discarded – undo
29 29
 browser.allowedExts = /<?php echo str_replace(' ', '|', strtolower(text::clearWhitespaces($this->types[$this->type]))) ?>$/;
30 30
 browser.deniedExts = /<?php echo str_replace(' ', '|', strtolower(text::clearWhitespaces($this->config['deniedExts']))) ?>$/;
31 31
 browser.maxFileSize = <?php echo text::jsValue($this->config['maxfilesize']) ?>;
32
-<?php IF (isset($this->get['opener']) && strlen($this->get['opener'])): ?>
32
+<?php if (isset($this->get['opener']) && strlen($this->get['opener'])): ?>
33 33
 browser.opener.name = "<?php echo text::jsValue($this->get['opener']) ?>";
34
-<?php ENDIF ?>
35
-<?php IF (isset($this->opener['CKEditor']['funcNum']) && preg_match('/^\d+$/', $this->opener['CKEditor']['funcNum'])): ?>
34
+<?php endif ?>
35
+<?php if (isset($this->opener['CKEditor']['funcNum']) && preg_match('/^\d+$/', $this->opener['CKEditor']['funcNum'])): ?>
36 36
 browser.opener.CKEditor = {};
37 37
 browser.opener.CKEditor.funcNum = <?php echo $this->opener['CKEditor']['funcNum'] ?>;
38
-<?php ENDIF ?>
39
-<?php IF (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
38
+<?php endif ?>
39
+<?php if (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']): ?>
40 40
 browser.opener.TinyMCE = true;
41
-<?php ENDIF ?>
42
-<?php IF (isset($this->get['opener']) && ($this->get['opener'] == "tinymce4") && isset($this->get['field'])): ?>
41
+<?php endif ?>
42
+<?php if (isset($this->get['opener']) && ($this->get['opener'] == "tinymce4") && isset($this->get['field'])): ?>
43 43
 browser.opener.TinyMCE4 = "<?= text::jsValue($this->get['field']) ?>";
44
-<?php ENDIF ?>
44
+<?php endif ?>
45 45
 browser.cms = "<?php echo text::jsValue($this->cms) ?>";
46 46
 _.kuki.domain = "<?php echo text::jsValue($this->config['cookieDomain']) ?>";
47 47
 _.kuki.path = "<?php echo text::jsValue($this->config['cookiePath']) ?>";
Please login to merge, or discard this patch.