Completed
Pull Request — develop (#518)
by Agel_Nash
05:24
created
manager/actions/mutate_menuindex_sort.dynamic.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $updateMsg = '';
14 14
 
15 15
 // check permissions on the document
16
-include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php";
16
+include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php";
17 17
 $udperms = new udperms();
18 18
 $udperms->user = $modx->getLoginUserID();
19 19
 $udperms->document = $id;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 if (isset($_POST['listSubmitted'])) {
27
-    $updateMsg .= '<div class="text-success" id="updated">' . $_lang['sort_updated'] . '</div>';
27
+    $updateMsg .= '<div class="text-success" id="updated">'.$_lang['sort_updated'].'</div>';
28 28
     if (strlen($items) > 0) {
29 29
         $items = explode(';', $items);
30 30
         foreach ($items as $key => $value) {
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
     $tblsc = $modx->getFullTableName('site_content');
45 45
     $tbldg = $modx->getFullTableName('document_groups');
46 46
 
47
-    $rs = $modx->db->select('pagetitle', $tblsc, 'id=' . $id . '');
47
+    $rs = $modx->db->select('pagetitle', $tblsc, 'id='.$id.'');
48 48
     $pagetitle = $modx->db->getValue($rs);
49 49
 
50 50
     $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : '';
51 51
     $docgrp_cond = $docgrp ? "OR dg.document_group IN ({$docgrp})" : '';
52
-    $mgrRole = (isset ($_SESSION['mgrRole']) && (string)$_SESSION['mgrRole'] === '1') ? '1' : '0';
53
-    $access = " AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))");
52
+    $mgrRole = (isset ($_SESSION['mgrRole']) && (string) $_SESSION['mgrRole'] === '1') ? '1' : '0';
53
+    $access = " AND (1={$mgrRole} OR sc.privatemgr=0".(!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))");
54 54
 
55
-    $rs = $modx->db->select('sc.id, sc.pagetitle, sc.parent, sc.menuindex, sc.published, sc.hidemenu, sc.deleted, sc.isfolder', $tblsc . 'AS sc LEFT JOIN ' . $tbldg . ' dg ON dg.document=sc.id', 'sc.parent=' . $id . $access . ' GROUP BY sc.id', 'menuindex ASC');
55
+    $rs = $modx->db->select('sc.id, sc.pagetitle, sc.parent, sc.menuindex, sc.published, sc.hidemenu, sc.deleted, sc.isfolder', $tblsc.'AS sc LEFT JOIN '.$tbldg.' dg ON dg.document=sc.id', 'sc.parent='.$id.$access.' GROUP BY sc.id', 'menuindex ASC');
56 56
 
57 57
     if ($modx->db->getRecordCount($rs)) {
58 58
         $ressourcelist .= '<div class="clearfix"><ul id="sortlist" class="sortableList">';
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
             $classes .= ($row['hidemenu']) ? ' notInMenuNode ' : ' inMenuNode';
62 62
             $classes .= ($row['published']) ? ' publishedNode ' : ' unpublishedNode ';
63 63
             $classes = ($row['deleted']) ? ' deletedNode ' : $classes;
64
-            $icon = $row['isfolder'] ? '<i class="' . $_style['files_folder'] . '"></i> ' : ' <i class="' . $_style['files_page_html'] . '"></i> ';
65
-            $ressourcelist .= '<li id="item_' . $row['id'] . '" class="' . $classes . '">' . $icon . $row['pagetitle'] . ' <small>(' . $row['id'] . ')</small></li>';
64
+            $icon = $row['isfolder'] ? '<i class="'.$_style['files_folder'].'"></i> ' : ' <i class="'.$_style['files_page_html'].'"></i> ';
65
+            $ressourcelist .= '<li id="item_'.$row['id'].'" class="'.$classes.'">'.$icon.$row['pagetitle'].' <small>('.$row['id'].')</small></li>';
66 66
         }
67 67
         $ressourcelist .= '</ul></div>';
68 68
     } else {
69
-        $updateMsg = '<p class="text-danger">' . $_lang['sort_nochildren'] . '</p>';
69
+        $updateMsg = '<p class="text-danger">'.$_lang['sort_nochildren'].'</p>';
70 70
     }
71 71
 }
72 72
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 </script>
150 150
 
151 151
 <h1>
152
-    <i class="fa fa-sort-numeric-asc"></i><?= ($pagetitle ? $pagetitle . '<small>(' . $id . ')</small>' : $_lang['sort_menuindex']) ?>
152
+    <i class="fa fa-sort-numeric-asc"></i><?= ($pagetitle ? $pagetitle.'<small>('.$id.')</small>' : $_lang['sort_menuindex']) ?>
153 153
 </h1>
154 154
 
155 155
 <?= $_style['actionbuttons']['dynamic']['save'] ?>
Please login to merge, or discard this patch.
manager/actions/mutate_web_user.dynamic.php 4 patches
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
6 6
 switch($modx->manager->action) {
7
-	case 88:
8
-		if(!$modx->hasPermission('edit_web_user')) {
9
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-		}
11
-		break;
12
-	case 87:
13
-		if(!$modx->hasPermission('new_web_user')) {
14
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-		}
16
-		break;
17
-	default:
18
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+    case 88:
8
+        if(!$modx->hasPermission('edit_web_user')) {
9
+            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+        }
11
+        break;
12
+    case 87:
13
+        if(!$modx->hasPermission('new_web_user')) {
14
+            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+        }
16
+        break;
17
+    default:
18
+        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $user = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
@@ -24,64 +24,64 @@  discard block
 block discarded – undo
24 24
 // check to see the snippet editor isn't locked
25 25
 $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'");
26 26
 if($username = $modx->db->getValue($rs)) {
27
-	$modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user"));
27
+    $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user"));
28 28
 }
29 29
 // end check for lock
30 30
 
31 31
 if($modx->manager->action == '88') {
32
-	// get user attributes
33
-	$rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
34
-	$userdata = $modx->db->getRow($rs);
35
-	if(!$userdata) {
36
-		$modx->webAlertAndQuit("No user returned!");
37
-	}
38
-
39
-	// get user settings
40
-	$rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
41
-	$usersettings = array();
42
-	while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value'];
43
-	extract($usersettings, EXTR_OVERWRITE);
44
-
45
-	// get user name
46
-	$rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
47
-	$usernamedata = $modx->db->getRow($rs);
48
-	if(!$usernamedata) {
49
-		$modx->webAlertAndQuit("No user returned while getting username!");
50
-	}
51
-	$_SESSION['itemname'] = $usernamedata['username'];
32
+    // get user attributes
33
+    $rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
34
+    $userdata = $modx->db->getRow($rs);
35
+    if(!$userdata) {
36
+        $modx->webAlertAndQuit("No user returned!");
37
+    }
38
+
39
+    // get user settings
40
+    $rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
41
+    $usersettings = array();
42
+    while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value'];
43
+    extract($usersettings, EXTR_OVERWRITE);
44
+
45
+    // get user name
46
+    $rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
47
+    $usernamedata = $modx->db->getRow($rs);
48
+    if(!$usernamedata) {
49
+        $modx->webAlertAndQuit("No user returned while getting username!");
50
+    }
51
+    $_SESSION['itemname'] = $usernamedata['username'];
52 52
 } else {
53
-	$userdata = array();
54
-	$usersettings = array();
55
-	$usernamedata = array();
56
-	$_SESSION['itemname'] = $_lang["new_web_user"];
53
+    $userdata = array();
54
+    $usersettings = array();
55
+    $usernamedata = array();
56
+    $_SESSION['itemname'] = $_lang["new_web_user"];
57 57
 }
58 58
 
59 59
 // avoid doubling htmlspecialchars (already encoded in DB)
60 60
 foreach($userdata as $key => $val) {
61
-	$userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']);
61
+    $userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']);
62 62
 };
63 63
 $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']);
64 64
 
65 65
 // restore saved form
66 66
 $formRestored = false;
67 67
 if($modx->manager->hasFormValues()) {
68
-	$modx->manager->loadFormValues();
69
-	// restore post values
70
-	$userdata = array_merge($userdata, $_POST);
71
-	$userdata['dob'] = $modx->toTimeStamp($userdata['dob']);
72
-	$usernamedata['username'] = $userdata['newusername'];
73
-	$usernamedata['oldusername'] = $_POST['oldusername'];
74
-	$usersettings = array_merge($usersettings, $userdata);
75
-	$usersettings['allowed_days'] = is_array($_POST['allowed_days']) ? implode(",", $_POST['allowed_days']) : "";
76
-	extract($usersettings, EXTR_OVERWRITE);
68
+    $modx->manager->loadFormValues();
69
+    // restore post values
70
+    $userdata = array_merge($userdata, $_POST);
71
+    $userdata['dob'] = $modx->toTimeStamp($userdata['dob']);
72
+    $usernamedata['username'] = $userdata['newusername'];
73
+    $usernamedata['oldusername'] = $_POST['oldusername'];
74
+    $usersettings = array_merge($usersettings, $userdata);
75
+    $usersettings['allowed_days'] = is_array($_POST['allowed_days']) ? implode(",", $_POST['allowed_days']) : "";
76
+    extract($usersettings, EXTR_OVERWRITE);
77 77
 }
78 78
 
79 79
 // include the country list language file
80 80
 $_country_lang = array();
81 81
 if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
82
-	include_once "lang/country/" . $manager_language . "_country.inc.php";
82
+    include_once "lang/country/" . $manager_language . "_country.inc.php";
83 83
 } else {
84
-	include_once "lang/country/english_country.inc.php";
84
+    include_once "lang/country/english_country.inc.php";
85 85
 }
86 86
 asort($_country_lang);
87 87
 
@@ -189,12 +189,12 @@  discard block
 block discarded – undo
189 189
 
190 190
 <form action="index.php?a=89" method="post" name="userform">
191 191
 	<?php
192
-	// invoke OnWUsrFormPrerender event
193
-	$evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
194
-	if(is_array($evtOut)) {
195
-		echo implode("", $evtOut);
196
-	}
197
-	?>
192
+    // invoke OnWUsrFormPrerender event
193
+    $evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
194
+    if(is_array($evtOut)) {
195
+        echo implode("", $evtOut);
196
+    }
197
+    ?>
198 198
 	<input type="hidden" name="mode" value="<?php echo $modx->manager->action; ?>" />
199 199
 	<input type="hidden" name="id" value="<?php echo $user ?>" />
200 200
 	<input type="hidden" name="blockedmode" value="<?php echo ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) ? "1" : "0" ?>" />
@@ -324,10 +324,10 @@  discard block
 block discarded – undo
324 324
 								<?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?>
325 325
 								<option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> >&nbsp;</option>
326 326
 								<?php
327
-								foreach($_country_lang as $key => $country) {
328
-									echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>";
329
-								}
330
-								?>
327
+                                foreach($_country_lang as $key => $country) {
328
+                                    echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>";
329
+                                }
330
+                                ?>
331 331
 							</select></td>
332 332
 					</tr>
333 333
 					<tr>
@@ -387,8 +387,8 @@  discard block
 block discarded – undo
387 387
 								<i onClick="document.userform.blockedafter.value=''; return true;" class="clearDate <?php echo $_style["actions_calendar_delete"] ?>" data-tooltip="<?php echo $_lang['remove_date']; ?>"></i></td>
388 388
 						</tr>
389 389
 						<?php
390
-					}
391
-					?>
390
+                    }
391
+                    ?>
392 392
 				</table>
393 393
 			</div>
394 394
 
@@ -496,40 +496,40 @@  discard block
 block discarded – undo
496 496
 				</table>
497 497
 			</div>
498 498
 			<?php
499
-			if($use_udperms == 1) {
500
-
501
-			$groupsarray = array();
502
-
503
-			if($modx->manager->action == '88') { // only do this bit if the user is being edited
504
-				$rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
505
-				$groupsarray = $modx->db->getColumn('webgroup', $rs);
506
-			}
507
-			// retain selected user groups between post
508
-			if(is_array($_POST['user_groups'])) {
509
-				foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v;
510
-			}
511
-			?>
499
+            if($use_udperms == 1) {
500
+
501
+            $groupsarray = array();
502
+
503
+            if($modx->manager->action == '88') { // only do this bit if the user is being edited
504
+                $rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
505
+                $groupsarray = $modx->db->getColumn('webgroup', $rs);
506
+            }
507
+            // retain selected user groups between post
508
+            if(is_array($_POST['user_groups'])) {
509
+                foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v;
510
+            }
511
+            ?>
512 512
 			<div class="tab-page" id="tabPermissions">
513 513
 				<h2 class="tab"><?php echo $_lang['web_access_permissions'] ?></h2>
514 514
 				<script type="text/javascript">tpUser.addTabPage(document.getElementById("tabPermissions"));</script>
515 515
 				<p><?php echo $_lang['access_permissions_user_message'] ?></p>
516 516
 				<?php
517
-				$rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
518
-				while($row = $modx->db->getRow($rs)) {
519
-					echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />';
520
-				}
521
-				}
522
-				?>
517
+                $rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
518
+                while($row = $modx->db->getRow($rs)) {
519
+                    echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />';
520
+                }
521
+                }
522
+                ?>
523 523
 			</div>
524 524
 			<?php
525
-			// invoke OnWUsrFormRender event
526
-			$evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
527
-				"id" => $user
528
-			));
529
-			if(is_array($evtOut)) {
530
-				echo implode("", $evtOut);
531
-			}
532
-			?>
525
+            // invoke OnWUsrFormRender event
526
+            $evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
527
+                "id" => $user
528
+            ));
529
+            if(is_array($evtOut)) {
530
+                echo implode("", $evtOut);
531
+            }
532
+            ?>
533 533
 		</div>
534 534
 	</div>
535 535
 	<input type="submit" name="save" style="display:none">
Please login to merge, or discard this patch.
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch($modx->manager->action) {
7
-	case 88:
8
-		if(!$modx->hasPermission('edit_web_user')) {
9
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-		}
11
-		break;
12
-	case 87:
13
-		if(!$modx->hasPermission('new_web_user')) {
14
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-		}
16
-		break;
17
-	default:
18
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+	    case 88:
8
+		    if(!$modx->hasPermission('edit_web_user')) {
9
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+		    }
11
+		    break;
12
+	    case 87:
13
+		    if(!$modx->hasPermission('new_web_user')) {
14
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+		    }
16
+		    break;
17
+	    default:
18
+		    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $user = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (IN_MANAGER_MODE != "true") {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
6
-switch($modx->manager->action) {
6
+switch ($modx->manager->action) {
7 7
 	case 88:
8
-		if(!$modx->hasPermission('edit_web_user')) {
8
+		if (!$modx->hasPermission('edit_web_user')) {
9 9
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10 10
 		}
11 11
 		break;
12 12
 	case 87:
13
-		if(!$modx->hasPermission('new_web_user')) {
13
+		if (!$modx->hasPermission('new_web_user')) {
14 14
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15 15
 		}
16 16
 		break;
@@ -22,30 +22,30 @@  discard block
 block discarded – undo
22 22
 
23 23
 
24 24
 // check to see the snippet editor isn't locked
25
-$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'");
26
-if($username = $modx->db->getValue($rs)) {
25
+$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='".$modx->getLoginUserID()."'");
26
+if ($username = $modx->db->getValue($rs)) {
27 27
 	$modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user"));
28 28
 }
29 29
 // end check for lock
30 30
 
31
-if($modx->manager->action == '88') {
31
+if ($modx->manager->action == '88') {
32 32
 	// get user attributes
33 33
 	$rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
34 34
 	$userdata = $modx->db->getRow($rs);
35
-	if(!$userdata) {
35
+	if (!$userdata) {
36 36
 		$modx->webAlertAndQuit("No user returned!");
37 37
 	}
38 38
 
39 39
 	// get user settings
40 40
 	$rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
41 41
 	$usersettings = array();
42
-	while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value'];
42
+	while ($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value'];
43 43
 	extract($usersettings, EXTR_OVERWRITE);
44 44
 
45 45
 	// get user name
46 46
 	$rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
47 47
 	$usernamedata = $modx->db->getRow($rs);
48
-	if(!$usernamedata) {
48
+	if (!$usernamedata) {
49 49
 		$modx->webAlertAndQuit("No user returned while getting username!");
50 50
 	}
51 51
 	$_SESSION['itemname'] = $usernamedata['username'];
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 }
58 58
 
59 59
 // avoid doubling htmlspecialchars (already encoded in DB)
60
-foreach($userdata as $key => $val) {
60
+foreach ($userdata as $key => $val) {
61 61
 	$userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']);
62 62
 };
63 63
 $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']);
64 64
 
65 65
 // restore saved form
66 66
 $formRestored = false;
67
-if($modx->manager->hasFormValues()) {
67
+if ($modx->manager->hasFormValues()) {
68 68
 	$modx->manager->loadFormValues();
69 69
 	// restore post values
70 70
 	$userdata = array_merge($userdata, $_POST);
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 
79 79
 // include the country list language file
80 80
 $_country_lang = array();
81
-if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
82
-	include_once "lang/country/" . $manager_language . "_country.inc.php";
81
+if ($manager_language != "english" && file_exists($modx->config['site_manager_path']."includes/lang/country/".$manager_language."_country.inc.php")) {
82
+	include_once "lang/country/".$manager_language."_country.inc.php";
83 83
 } else {
84 84
 	include_once "lang/country/english_country.inc.php";
85 85
 }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	<?php
192 192
 	// invoke OnWUsrFormPrerender event
193 193
 	$evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
194
-	if(is_array($evtOut)) {
194
+	if (is_array($evtOut)) {
195 195
 		echo implode("", $evtOut);
196 196
 	}
197 197
 	?>
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	<input type="hidden" name="blockedmode" value="<?php echo ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) ? "1" : "0" ?>" />
201 201
 
202 202
 	<h1>
203
-        <i class="fa fa fa-users"></i><?= ($usernamedata['username'] ? $usernamedata['username'] . '<small>(' . $usernamedata['id'] . ')</small>' : $_lang['web_user_title']) ?>
203
+        <i class="fa fa fa-users"></i><?= ($usernamedata['username'] ? $usernamedata['username'].'<small>('.$usernamedata['id'].')</small>' : $_lang['web_user_title']) ?>
204 204
     </h1>
205 205
 
206 206
 	<?php echo $_style['actionbuttons']['dynamic']['user'] ?>
@@ -218,13 +218,13 @@  discard block
 block discarded – undo
218 218
 				<table border="0" cellspacing="0" cellpadding="3" class="table table--edit table--editUser">
219 219
 					<tr>
220 220
 						<td colspan="3"><span id="blocked" class="warning">
221
-							<?php if($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) { ?>
221
+							<?php if ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) { ?>
222 222
 								<b><?php echo $_lang['user_is_blocked']; ?></b>
223 223
 							<?php } ?>
224 224
 							</span>
225 225
 							<br /></td>
226 226
 					</tr>
227
-					<?php if(!empty($userdata['id'])) { ?>
227
+					<?php if (!empty($userdata['id'])) { ?>
228 228
 						<tr id="showname" style="display: <?php echo ($modx->manager->action == '88' && (!isset($usernamedata['oldusername']) || $usernamedata['oldusername'] == $usernamedata['username'])) ? $displayStyle : 'none'; ?> ">
229 229
 							<td colspan="3"><i class="<?php echo $_style["icons_user"] ?>"></i>&nbsp;<b><?php echo $modx->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?></b> - <span class="comment"><a href="javascript:;" onClick="changeName();return false;"><?php echo $_lang["change_name"]; ?></a></span>
230 230
 								<input type="hidden" name="oldusername" value="<?php echo $modx->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?>" />
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 						<td><input type="text" name="newusername" class="inputBox" value="<?php echo $modx->htmlspecialchars(isset($_POST['newusername']) ? $_POST['newusername'] : $usernamedata['username']); ?>" onChange='documentDirty=true;' maxlength="100" /></td>
238 238
 					</tr>
239 239
 					<tr>
240
-						<th><?php echo $modx->manager->action == '87' ? $_lang['password'] . ":" : $_lang['change_password_new'] . ":"; ?></th>
240
+						<th><?php echo $modx->manager->action == '87' ? $_lang['password'].":" : $_lang['change_password_new'].":"; ?></th>
241 241
 						<td>&nbsp;</td>
242 242
 						<td><input name="newpasswordcheck" type="checkbox" onClick="changestate(document.userform.newpassword);changePasswordState(document.userform.newpassword);"<?php echo $modx->manager->action == "87" ? " checked disabled" : ""; ?>>
243 243
 							<input type="hidden" name="newpassword" value="<?php echo $modx->manager->action == "87" ? 1 : 0; ?>" onChange="documentDirty=true;" />
@@ -324,8 +324,8 @@  discard block
 block discarded – undo
324 324
 								<?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?>
325 325
 								<option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> >&nbsp;</option>
326 326
 								<?php
327
-								foreach($_country_lang as $key => $country) {
328
-									echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>";
327
+								foreach ($_country_lang as $key => $country) {
328
+									echo "<option value=\"$key\"".(isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '').">$country</option>";
329 329
 								}
330 330
 								?>
331 331
 							</select></td>
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 						<td>&nbsp;</td>
352 352
 						<td><textarea type="text" name="comment" class="inputBox" rows="5" onChange="documentDirty=true;"><?php echo $modx->htmlspecialchars(isset($_POST['comment']) ? $_POST['comment'] : $userdata['comment']); ?></textarea></td>
353 353
 					</tr>
354
-					<?php if($modx->manager->action == '88') { ?>
354
+					<?php if ($modx->manager->action == '88') { ?>
355 355
 						<tr>
356 356
 							<th><?php echo $_lang['user_logincount']; ?>:</th>
357 357
 							<td>&nbsp;</td>
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 					function BrowseServer() {
473 473
 						var w = screen.width * 0.7;
474 474
 						var h = screen.height * 0.7;
475
-						OpenServerBrowser("<?php echo MODX_MANAGER_URL;?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h);
475
+						OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h);
476 476
 					}
477 477
 
478 478
 					function SetUrl(url, width, height, alt) {
@@ -491,22 +491,22 @@  discard block
 block discarded – undo
491 491
 						<td class='comment'><?php echo $_lang["user_photo_message"] ?></td>
492 492
 					</tr>
493 493
 					<tr>
494
-						<td colspan="2" align="center"><img name="iphoto" src="<?php echo isset($_POST['photo']) ? (strpos($_POST['photo'], "http://") === false ? MODX_SITE_URL : "") . $_POST['photo'] : !empty($userdata['photo']) ? (strpos($userdata['photo'], "http://") === false ? MODX_SITE_URL : "") . $userdata['photo'] : $_style["tx"]; ?>" /></td>
494
+						<td colspan="2" align="center"><img name="iphoto" src="<?php echo isset($_POST['photo']) ? (strpos($_POST['photo'], "http://") === false ? MODX_SITE_URL : "").$_POST['photo'] : !empty($userdata['photo']) ? (strpos($userdata['photo'], "http://") === false ? MODX_SITE_URL : "").$userdata['photo'] : $_style["tx"]; ?>" /></td>
495 495
 					</tr>
496 496
 				</table>
497 497
 			</div>
498 498
 			<?php
499
-			if($use_udperms == 1) {
499
+			if ($use_udperms == 1) {
500 500
 
501 501
 			$groupsarray = array();
502 502
 
503
-			if($modx->manager->action == '88') { // only do this bit if the user is being edited
503
+			if ($modx->manager->action == '88') { // only do this bit if the user is being edited
504 504
 				$rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
505 505
 				$groupsarray = $modx->db->getColumn('webgroup', $rs);
506 506
 			}
507 507
 			// retain selected user groups between post
508
-			if(is_array($_POST['user_groups'])) {
509
-				foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v;
508
+			if (is_array($_POST['user_groups'])) {
509
+				foreach ($_POST['user_groups'] as $n => $v) $groupsarray[] = $v;
510 510
 			}
511 511
 			?>
512 512
 			<div class="tab-page" id="tabPermissions">
@@ -515,8 +515,8 @@  discard block
 block discarded – undo
515 515
 				<p><?php echo $_lang['access_permissions_user_message'] ?></p>
516 516
 				<?php
517 517
 				$rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
518
-				while($row = $modx->db->getRow($rs)) {
519
-					echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />';
518
+				while ($row = $modx->db->getRow($rs)) {
519
+					echo '<label><input type="checkbox" name="user_groups[]" value="'.$row['id'].'"'.(in_array($row['id'], $groupsarray) ? ' checked="checked"' : '').' />'.$row['name'].'</label><br />';
520 520
 				}
521 521
 				}
522 522
 				?>
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 			$evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
527 527
 				"id" => $user
528 528
 			));
529
-			if(is_array($evtOut)) {
529
+			if (is_array($evtOut)) {
530 530
 				echo implode("", $evtOut);
531 531
 			}
532 532
 			?>
Please login to merge, or discard this patch.
Braces   +27 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if(IN_MANAGER_MODE != "true") {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
6
-switch($modx->manager->action) {
6
+switch($modx->manager->action) {
7 7
 	case 88:
8
-		if(!$modx->hasPermission('edit_web_user')) {
8
+		if(!$modx->hasPermission('edit_web_user')) {
9 9
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10 10
 		}
11 11
 		break;
12 12
 	case 87:
13
-		if(!$modx->hasPermission('new_web_user')) {
13
+		if(!$modx->hasPermission('new_web_user')) {
14 14
 			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15 15
 		}
16 16
 		break;
@@ -23,33 +23,35 @@  discard block
 block discarded – undo
23 23
 
24 24
 // check to see the snippet editor isn't locked
25 25
 $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'");
26
-if($username = $modx->db->getValue($rs)) {
26
+if($username = $modx->db->getValue($rs)) {
27 27
 	$modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user"));
28 28
 }
29 29
 // end check for lock
30 30
 
31
-if($modx->manager->action == '88') {
31
+if($modx->manager->action == '88') {
32 32
 	// get user attributes
33 33
 	$rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
34 34
 	$userdata = $modx->db->getRow($rs);
35
-	if(!$userdata) {
35
+	if(!$userdata) {
36 36
 		$modx->webAlertAndQuit("No user returned!");
37 37
 	}
38 38
 
39 39
 	// get user settings
40 40
 	$rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
41 41
 	$usersettings = array();
42
-	while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value'];
42
+	while($row = $modx->db->getRow($rs)) {
43
+	    $usersettings[$row['setting_name']] = $row['setting_value'];
44
+	}
43 45
 	extract($usersettings, EXTR_OVERWRITE);
44 46
 
45 47
 	// get user name
46 48
 	$rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
47 49
 	$usernamedata = $modx->db->getRow($rs);
48
-	if(!$usernamedata) {
50
+	if(!$usernamedata) {
49 51
 		$modx->webAlertAndQuit("No user returned while getting username!");
50 52
 	}
51 53
 	$_SESSION['itemname'] = $usernamedata['username'];
52
-} else {
54
+} else {
53 55
 	$userdata = array();
54 56
 	$usersettings = array();
55 57
 	$usernamedata = array();
@@ -57,14 +59,14 @@  discard block
 block discarded – undo
57 59
 }
58 60
 
59 61
 // avoid doubling htmlspecialchars (already encoded in DB)
60
-foreach($userdata as $key => $val) {
62
+foreach($userdata as $key => $val) {
61 63
 	$userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']);
62 64
 };
63 65
 $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']);
64 66
 
65 67
 // restore saved form
66 68
 $formRestored = false;
67
-if($modx->manager->hasFormValues()) {
69
+if($modx->manager->hasFormValues()) {
68 70
 	$modx->manager->loadFormValues();
69 71
 	// restore post values
70 72
 	$userdata = array_merge($userdata, $_POST);
@@ -78,9 +80,9 @@  discard block
 block discarded – undo
78 80
 
79 81
 // include the country list language file
80 82
 $_country_lang = array();
81
-if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
83
+if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
82 84
 	include_once "lang/country/" . $manager_language . "_country.inc.php";
83
-} else {
85
+} else {
84 86
 	include_once "lang/country/english_country.inc.php";
85 87
 }
86 88
 asort($_country_lang);
@@ -191,7 +193,7 @@  discard block
 block discarded – undo
191 193
 	<?php
192 194
 	// invoke OnWUsrFormPrerender event
193 195
 	$evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
194
-	if(is_array($evtOut)) {
196
+	if(is_array($evtOut)) {
195 197
 		echo implode("", $evtOut);
196 198
 	}
197 199
 	?>
@@ -324,7 +326,7 @@  discard block
 block discarded – undo
324 326
 								<?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?>
325 327
 								<option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> >&nbsp;</option>
326 328
 								<?php
327
-								foreach($_country_lang as $key => $country) {
329
+								foreach($_country_lang as $key => $country) {
328 330
 									echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>";
329 331
 								}
330 332
 								?>
@@ -496,17 +498,20 @@  discard block
 block discarded – undo
496 498
 				</table>
497 499
 			</div>
498 500
 			<?php
499
-			if($use_udperms == 1) {
501
+			if($use_udperms == 1) {
500 502
 
501 503
 			$groupsarray = array();
502 504
 
503
-			if($modx->manager->action == '88') { // only do this bit if the user is being edited
505
+			if($modx->manager->action == '88') {
506
+// only do this bit if the user is being edited
504 507
 				$rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
505 508
 				$groupsarray = $modx->db->getColumn('webgroup', $rs);
506 509
 			}
507 510
 			// retain selected user groups between post
508
-			if(is_array($_POST['user_groups'])) {
509
-				foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v;
511
+			if(is_array($_POST['user_groups'])) {
512
+				foreach($_POST['user_groups'] as $n => $v) {
513
+				    $groupsarray[] = $v;
514
+				}
510 515
 			}
511 516
 			?>
512 517
 			<div class="tab-page" id="tabPermissions">
@@ -515,7 +520,7 @@  discard block
 block discarded – undo
515 520
 				<p><?php echo $_lang['access_permissions_user_message'] ?></p>
516 521
 				<?php
517 522
 				$rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
518
-				while($row = $modx->db->getRow($rs)) {
523
+				while($row = $modx->db->getRow($rs)) {
519 524
 					echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />';
520 525
 				}
521 526
 				}
@@ -526,7 +531,7 @@  discard block
 block discarded – undo
526 531
 			$evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
527 532
 				"id" => $user
528 533
 			));
529
-			if(is_array($evtOut)) {
534
+			if(is_array($evtOut)) {
530 535
 				echo implode("", $evtOut);
531 536
 			}
532 537
 			?>
Please login to merge, or discard this patch.
manager/actions/mutate_template_tv_rank.dynamic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $templatename = '';
20 20
 
21 21
 if (isset($_POST['listSubmitted'])) {
22
-    $updateMsg .= '<div class="text-success" id="updated">' . $_lang['sort_updated'] . '</div>';
22
+    $updateMsg .= '<div class="text-success" id="updated">'.$_lang['sort_updated'].'</div>';
23 23
     foreach ($_POST as $listName => $listValue) {
24 24
         if ($listName == 'listSubmitted' || $listName == 'reset') {
25 25
             continue;
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
     while ($row = $modx->db->getRow($rs)) {
48 48
         $templatename = $row['templatename'];
49 49
         $caption = $row['caption'] != '' ? $row['caption'] : $row['name'];
50
-        $sortableList .= '<li id="item_' . $row['id'] . '"><i class="fa fa-list-alt"></i> ' . $caption . ' <small class="protectedNode" style="float:right">[*' . $row['name'] . '*]</small></li>';
50
+        $sortableList .= '<li id="item_'.$row['id'].'"><i class="fa fa-list-alt"></i> '.$caption.' <small class="protectedNode" style="float:right">[*'.$row['name'].'*]</small></li>';
51 51
     }
52 52
     $sortableList .= '</ul></div>';
53 53
 } else {
54
-    $updateMsg = '<p class="text-danger">' . $_lang['tmplvars_novars'] . '</p>';
54
+    $updateMsg = '<p class="text-danger">'.$_lang['tmplvars_novars'].'</p>';
55 55
 }
56 56
 ?>
57 57
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 </script>
129 129
 
130 130
 <h1>
131
-    <i class="fa fa-sort-numeric-asc"></i><?= ($templatename ? $templatename . '<small>(' . $id . ')</small>' : $_lang['template_tv_edit_title']) ?>
131
+    <i class="fa fa-sort-numeric-asc"></i><?= ($templatename ? $templatename.'<small>('.$id.')</small>' : $_lang['template_tv_edit_title']) ?>
132 132
 </h1>
133 133
 
134 134
 <?= $_style['actionbuttons']['dynamic']['save'] ?>
Please login to merge, or discard this patch.
manager/actions/messages.static.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         <div class="container container-body" id="lyr3">
17 17
             <b><?= $_lang['messages_read_message'] ?></b>
18 18
             <?php
19
-            $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='" . (int)$_REQUEST['id'] . "'");
19
+            $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='".(int) $_REQUEST['id']."'");
20 20
             $message = $modx->db->getRow($rs);
21 21
             if (!$message) {
22 22
                 echo "Wrong number of messages returned!";
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         <p><b><?= $_lang['messages_inbox'] ?></b></p>
88 88
         <?php
89 89
         // Get  number of rows
90
-        $rs = $modx->db->select('count(id)', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . "");
90
+        $rs = $modx->db->select('count(id)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()."");
91 91
         $num_rows = $modx->db->getValue($rs);
92 92
 
93 93
         // ==============================================================
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
101 101
             $int_cur_position = 0;
102 102
         } else {
103
-            $int_cur_position = (int)$_REQUEST['int_cur_position'];
103
+            $int_cur_position = (int) $_REQUEST['int_cur_position'];
104 104
         }
105 105
 
106 106
         // Number of result to display on the page, will be in the LIMIT of the sql query also
@@ -117,21 +117,21 @@  discard block
 block discarded – undo
117 117
         $array_row_paging = $p->getPagingRowArray();
118 118
 
119 119
         // Display the result as you like...
120
-        $pager .= $_lang['showing'] . " " . $array_paging['lower'];
121
-        $pager .= " " . $_lang['to'] . " " . $array_paging['upper'];
122
-        $pager .= " (" . $array_paging['total'] . " " . $_lang['total'] . ")";
123
-        $pager .= "<br />" . $array_paging['previous_link'] . "&lt;&lt;" . (isset($array_paging['previous_link']) ? "</a> " : " ");
120
+        $pager .= $_lang['showing']." ".$array_paging['lower'];
121
+        $pager .= " ".$_lang['to']." ".$array_paging['upper'];
122
+        $pager .= " (".$array_paging['total']." ".$_lang['total'].")";
123
+        $pager .= "<br />".$array_paging['previous_link']."&lt;&lt;".(isset($array_paging['previous_link']) ? "</a> " : " ");
124 124
         for ($i = 0; $i < sizeof($array_row_paging); $i++) {
125
-            $pager .= $array_row_paging[$i] . "&nbsp;";
125
+            $pager .= $array_row_paging[$i]."&nbsp;";
126 126
         }
127
-        $pager .= $array_paging['next_link'] . "&gt;&gt;" . (isset($array_paging['next_link']) ? "</a>" : "");
127
+        $pager .= $array_paging['next_link']."&gt;&gt;".(isset($array_paging['next_link']) ? "</a>" : "");
128 128
 
129 129
         // The above exemple print somethings like:
130 130
         // 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 >>>
131 131
         // Of course you can now play with array_row_paging in order to print
132 132
         // only the results you would like...
133 133
 
134
-        $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . "", 'postdate DESC', "{$int_cur_position}, {$int_num_result}");
134
+        $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()."", 'postdate DESC', "{$int_cur_position}, {$int_num_result}");
135 135
         $limit = $modx->db->getRecordCount($rs);
136 136
         if ($limit < 1) {
137 137
             echo $_lang['messages_no_messages'];
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         <p><b><?= $_lang['messages_compose'] ?></b></p>
190 190
         <?php
191 191
         if (($_REQUEST['m'] == 'rp' || $_REQUEST['m'] == 'f') && isset($_REQUEST['id'])) {
192
-            $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='" . $_REQUEST['id'] . "'");
192
+            $rs = $modx->db->select('*', $modx->getFullTableName('user_messages'), "id='".$_REQUEST['id']."'");
193 193
             $message = $modx->db->getRow($rs);
194 194
             if (!$message) {
195 195
                 echo "Wrong number of messages returned!";
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                     }
209 209
                     $subjecttext = $_REQUEST['m'] == 'rp' ? "Re: " : "Fwd: ";
210 210
                     $subjecttext .= $message['subject'];
211
-                    $messagetext = "\n\n\n-----\n" . $_lang['messages_from'] . ": $sendername\n" . $_lang['messages_sent'] . ": " . $modx->toDateFormat($message['postdate'] + $server_offset_time) . "\n" . $_lang['messages_subject'] . ": " . $message['subject'] . "\n\n" . $message['message'];
211
+                    $messagetext = "\n\n\n-----\n".$_lang['messages_from'].": $sendername\n".$_lang['messages_sent'].": ".$modx->toDateFormat($message['postdate'] + $server_offset_time)."\n".$_lang['messages_subject'].": ".$message['subject']."\n\n".$message['message'];
212 212
                     if ($_REQUEST['m'] == 'rp') {
213 213
                         $recipientindex = $message['sender'];
214 214
                     }
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
 
296 296
 <?php
297 297
 // count messages again, as any action on the messages page may have altered the message count
298
-$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . " and messageread=0");
298
+$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()." and messageread=0");
299 299
 $_SESSION['nrnewmessages'] = $modx->db->getValue($rs);
300
-$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID() . "");
300
+$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()."");
301 301
 $_SESSION['nrtotalmessages'] = $modx->db->getValue($rs);
302 302
 $messagesallowed = $modx->hasPermission('messages');
303 303
 ?>
Please login to merge, or discard this patch.
manager/actions/access_permissions.dynamic.php 2 patches
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('access_permissions')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 // Get table names (alphabetical)
@@ -18,24 +18,24 @@  discard block
 block discarded – undo
18 18
 // find all document groups, for the select :)
19 19
 $rs = $modx->db->select('*', $tbl_documentgroup_names, '', 'name');
20 20
 if($modx->db->getRecordCount($rs) < 1) {
21
-	$docgroupselector = '[no groups to add]';
21
+    $docgroupselector = '[no groups to add]';
22 22
 } else {
23
-	$docgroupselector = '<select name="docgroup">' . "\n";
24
-	while($row = $modx->db->getRow($rs)) {
25
-		$docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n";
26
-	}
27
-	$docgroupselector .= "</select>\n";
23
+    $docgroupselector = '<select name="docgroup">' . "\n";
24
+    while($row = $modx->db->getRow($rs)) {
25
+        $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n";
26
+    }
27
+    $docgroupselector .= "</select>\n";
28 28
 }
29 29
 
30 30
 $rs = $modx->db->select('*', $tbl_membergroup_names, '', 'name');
31 31
 if($modx->db->getRecordCount($rs) < 1) {
32
-	$usrgroupselector = '[no user groups]';
32
+    $usrgroupselector = '[no user groups]';
33 33
 } else {
34
-	$usrgroupselector = '<select name="usergroup">' . "\n";
35
-	while($row = $modx->db->getRow($rs)) {
36
-		$usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n";
37
-	}
38
-	$usrgroupselector .= "</select>\n";
34
+    $usrgroupselector = '<select name="usergroup">' . "\n";
35
+    while($row = $modx->db->getRow($rs)) {
36
+        $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n";
37
+    }
38
+    $usrgroupselector .= "</select>\n";
39 39
 }
40 40
 
41 41
 ?>
@@ -96,24 +96,24 @@  discard block
 block discarded – undo
96 96
 				</form>
97 97
 			</div>
98 98
 			<?php
99
-			$rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames
99
+            $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames
100 100
 			LEFT JOIN ' . $tbl_member_groups . ' AS groups ON groups.user_group = groupnames.id
101 101
 			LEFT JOIN ' . $tbl_manager_users . ' AS users ON users.id = groups.member', '', 'groupnames.name, user_name');
102
-			if($modx->db->getRecordCount($rs) < 1) {
103
-				?>
102
+            if($modx->db->getRecordCount($rs) < 1) {
103
+                ?>
104 104
 				<div class="text-danger"><?= $_lang['no_groups_found'] ?></div>
105 105
 				<?php
106
-			} else {
107
-			?>
106
+            } else {
107
+            ?>
108 108
 			<div class="form-group">
109 109
 				<?php
110
-				$pid = '';
111
-				while($row = $modx->db->getRow($rs)) {
112
-					if($pid != $row['id']) {
113
-						if($pid != '') {
114
-							echo '</div><div class="form-group">';
115
-						}
116
-						?>
110
+                $pid = '';
111
+                while($row = $modx->db->getRow($rs)) {
112
+                    if($pid != $row['id']) {
113
+                        if($pid != '') {
114
+                            echo '</div><div class="form-group">';
115
+                        }
116
+                        ?>
117 117
 						<form method="post" action="index.php" name="accesspermissions">
118 118
 							<input type="hidden" name="a" value="41" />
119 119
 							<input type="hidden" name="groupid" value="<?= $row['id'] ?>" />
@@ -128,21 +128,21 @@  discard block
 block discarded – undo
128 128
 						</form>
129 129
 						<?= $_lang['access_permissions_users_in_group'] ?>
130 130
 						<?php
131
-					}
132
-					if(!$row['user_id']) {
133
-						?>
131
+                    }
132
+                    if(!$row['user_id']) {
133
+                        ?>
134 134
 						<i><?= $_lang['access_permissions_no_users_in_group'] ?></i>
135 135
 						<?php
136
-						$pid = $row['id'];
137
-						continue;
138
-					}
139
-					?>
136
+                        $pid = $row['id'];
137
+                        continue;
138
+                    }
139
+                    ?>
140 140
 					<?= ($pid == $row['id'] ? ', ' : '') ?><a href="index.php?a=12&id=<?= $row['user_id'] ?>"><?= $row['user_name'] ?></a>
141 141
 					<?php
142
-					$pid = $row['id'];
143
-				}
144
-				}
145
-				?>
142
+                    $pid = $row['id'];
143
+                }
144
+                }
145
+                ?>
146 146
 			</div>
147 147
 		</div>
148 148
 	</div>
@@ -167,24 +167,24 @@  discard block
 block discarded – undo
167 167
 				</form>
168 168
 			</div>
169 169
 			<?php
170
-			$rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames
170
+            $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames
171 171
 			LEFT JOIN ' . $tbl_document_groups . ' AS dg ON dg.document_group = dgnames.id
172 172
 			LEFT JOIN ' . $tbl_site_content . ' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id');
173
-			if($modx->db->getRecordCount($rs) < 1) {
174
-				?>
173
+            if($modx->db->getRecordCount($rs) < 1) {
174
+                ?>
175 175
 				<div class="text-danger"><?= $_lang['no_groups_found'] ?></div>
176 176
 				<?php
177
-			} else {
178
-			?>
177
+            } else {
178
+            ?>
179 179
 			<div class="form-group">
180 180
 				<?php
181
-				$pid = '';
182
-				while($row = $modx->db->getRow($rs)) {
183
-					if($pid != $row['id']) {
184
-						if($pid != '') {
185
-							echo '</div><div class="form-group">';
186
-						}
187
-						?>
181
+                $pid = '';
182
+                while($row = $modx->db->getRow($rs)) {
183
+                    if($pid != $row['id']) {
184
+                        if($pid != '') {
185
+                            echo '</div><div class="form-group">';
186
+                        }
187
+                        ?>
188 188
 						<form method="post" action="index.php" name="accesspermissions">
189 189
 							<input type="hidden" name="a" value="41" />
190 190
 							<input type="hidden" name="groupid" value="<?= $row['id'] ?>" />
@@ -199,21 +199,21 @@  discard block
 block discarded – undo
199 199
 						</form>
200 200
 						<?= $_lang['access_permissions_resources_in_group'] ?>
201 201
 						<?php
202
-					}
203
-					if(!$row['doc_id']) {
204
-						?>
202
+                    }
203
+                    if(!$row['doc_id']) {
204
+                        ?>
205 205
 						<i><?= $_lang['access_permissions_no_resources_in_group'] ?></i>
206 206
 						<?php
207
-						$pid = $row['id'];
208
-						continue;
209
-					}
210
-					?>
207
+                        $pid = $row['id'];
208
+                        continue;
209
+                    }
210
+                    ?>
211 211
 					<?= ($pid == $row['id'] ? ', ' : '') ?><a href="index.php?a=3&id=<?= $row['doc_id'] ?>" title="<?= $modx->htmlspecialchars($row['doc_title']) ?>"><?= $row['doc_id'] ?></a>
212 212
 					<?php
213
-					$pid = $row['id'];
214
-				}
215
-				}
216
-				?>
213
+                    $pid = $row['id'];
214
+                }
215
+                }
216
+                ?>
217 217
 			</div>
218 218
 		</div>
219 219
 	</div>
@@ -225,16 +225,16 @@  discard block
 block discarded – undo
225 225
 		<div class="container container-body">
226 226
 			<p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p>
227 227
 			<?php
228
-			// User/Document Group Links
229
-			$rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames
228
+            // User/Document Group Links
229
+            $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames
230 230
 			LEFT JOIN ' . $tbl_membergroup_access . ' AS groupacc ON groupacc.membergroup = groupnames.id
231 231
 			LEFT JOIN ' . $tbl_documentgroup_names . ' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name');
232
-			if($modx->db->getRecordCount($rs) < 1) {
233
-				?>
232
+            if($modx->db->getRecordCount($rs) < 1) {
233
+                ?>
234 234
 				<div class="text-danger"><?= $_lang['no_groups_found'] ?></div>
235 235
 				<?php
236
-			} else {
237
-				?>
236
+            } else {
237
+                ?>
238 238
 				<div class="form-group">
239 239
 					<b><?= $_lang["access_permissions_group_link"] ?></b>
240 240
 					<form method="post" action="index.php" name="accesspermissions">
@@ -250,38 +250,38 @@  discard block
 block discarded – undo
250 250
 				<hr>
251 251
 				<ul>
252 252
 					<?php
253
-					$pid = '';
254
-					while($row = $modx->db->getRow($rs)) {
255
-						if($row['id'] != $pid) {
256
-							if($pid != '') {
257
-								echo '</ul></li>';
258
-							} // close previous one
259
-							?>
253
+                    $pid = '';
254
+                    while($row = $modx->db->getRow($rs)) {
255
+                        if($row['id'] != $pid) {
256
+                            if($pid != '') {
257
+                                echo '</ul></li>';
258
+                            } // close previous one
259
+                            ?>
260 260
 							<li><b><?= $row['name'] ?></b></li>
261 261
 							<?php
262
-							if(!$row['dg_id']) {
263
-								echo '<i>' . $_lang['no_groups_found'] . '</i></li>';
264
-								$pid = '';
265
-								continue;
266
-							} else {
267
-								echo '<ul>';
268
-							}
269
-						}
270
-						if(!$row['dg_id']) {
271
-							continue;
272
-						}
273
-						?>
262
+                            if(!$row['dg_id']) {
263
+                                echo '<i>' . $_lang['no_groups_found'] . '</i></li>';
264
+                                $pid = '';
265
+                                continue;
266
+                            } else {
267
+                                echo '<ul>';
268
+                            }
269
+                        }
270
+                        if(!$row['dg_id']) {
271
+                            continue;
272
+                        }
273
+                        ?>
274 274
 						<li><?= $row['dg_name'] ?>
275 275
 							<small><i>(<a class="text-danger" href="index.php?a=41&coupling=<?= $row['link_id'] ?>&operation=remove_document_group_from_user_group"><?= $_lang['remove'] ?></a>)</i></small>
276 276
 						</li>
277 277
 						<?php
278
-						$pid = $row['id'];
279
-					}
280
-					?>
278
+                        $pid = $row['id'];
279
+                    }
280
+                    ?>
281 281
 				</ul>
282 282
 				<?php
283
-			}
284
-			?>
283
+            }
284
+            ?>
285 285
 		</div>
286 286
 	</div>
287 287
 
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (IN_MANAGER_MODE != "true") {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('access_permissions')) {
5
+if (!$modx->hasPermission('access_permissions')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -17,23 +17,23 @@  discard block
 block discarded – undo
17 17
 
18 18
 // find all document groups, for the select :)
19 19
 $rs = $modx->db->select('*', $tbl_documentgroup_names, '', 'name');
20
-if($modx->db->getRecordCount($rs) < 1) {
20
+if ($modx->db->getRecordCount($rs) < 1) {
21 21
 	$docgroupselector = '[no groups to add]';
22 22
 } else {
23
-	$docgroupselector = '<select name="docgroup">' . "\n";
24
-	while($row = $modx->db->getRow($rs)) {
25
-		$docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n";
23
+	$docgroupselector = '<select name="docgroup">'."\n";
24
+	while ($row = $modx->db->getRow($rs)) {
25
+		$docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n";
26 26
 	}
27 27
 	$docgroupselector .= "</select>\n";
28 28
 }
29 29
 
30 30
 $rs = $modx->db->select('*', $tbl_membergroup_names, '', 'name');
31
-if($modx->db->getRecordCount($rs) < 1) {
31
+if ($modx->db->getRecordCount($rs) < 1) {
32 32
 	$usrgroupselector = '[no user groups]';
33 33
 } else {
34
-	$usrgroupselector = '<select name="usergroup">' . "\n";
35
-	while($row = $modx->db->getRow($rs)) {
36
-		$usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n";
34
+	$usrgroupselector = '<select name="usergroup">'."\n";
35
+	while ($row = $modx->db->getRow($rs)) {
36
+		$usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n";
37 37
 	}
38 38
 	$usrgroupselector .= "</select>\n";
39 39
 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	<div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div>
70 70
 </div>
71 71
 
72
-<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div>
72
+<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div>
73 73
 
74 74
 <div class="tab-pane" id="uapPane">
75 75
 	<script type="text/javascript">
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 				</form>
97 97
 			</div>
98 98
 			<?php
99
-			$rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames
100
-			LEFT JOIN ' . $tbl_member_groups . ' AS groups ON groups.user_group = groupnames.id
101
-			LEFT JOIN ' . $tbl_manager_users . ' AS users ON users.id = groups.member', '', 'groupnames.name, user_name');
102
-			if($modx->db->getRecordCount($rs) < 1) {
99
+			$rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names.' AS groupnames
100
+			LEFT JOIN ' . $tbl_member_groups.' AS groups ON groups.user_group = groupnames.id
101
+			LEFT JOIN ' . $tbl_manager_users.' AS users ON users.id = groups.member', '', 'groupnames.name, user_name');
102
+			if ($modx->db->getRecordCount($rs) < 1) {
103 103
 				?>
104 104
 				<div class="text-danger"><?= $_lang['no_groups_found'] ?></div>
105 105
 				<?php
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 			<div class="form-group">
109 109
 				<?php
110 110
 				$pid = '';
111
-				while($row = $modx->db->getRow($rs)) {
112
-					if($pid != $row['id']) {
113
-						if($pid != '') {
111
+				while ($row = $modx->db->getRow($rs)) {
112
+					if ($pid != $row['id']) {
113
+						if ($pid != '') {
114 114
 							echo '</div><div class="form-group">';
115 115
 						}
116 116
 						?>
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 						<?= $_lang['access_permissions_users_in_group'] ?>
130 130
 						<?php
131 131
 					}
132
-					if(!$row['user_id']) {
132
+					if (!$row['user_id']) {
133 133
 						?>
134 134
 						<i><?= $_lang['access_permissions_no_users_in_group'] ?></i>
135 135
 						<?php
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
 				</form>
168 168
 			</div>
169 169
 			<?php
170
-			$rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames
171
-			LEFT JOIN ' . $tbl_document_groups . ' AS dg ON dg.document_group = dgnames.id
172
-			LEFT JOIN ' . $tbl_site_content . ' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id');
173
-			if($modx->db->getRecordCount($rs) < 1) {
170
+			$rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names.' AS dgnames
171
+			LEFT JOIN ' . $tbl_document_groups.' AS dg ON dg.document_group = dgnames.id
172
+			LEFT JOIN ' . $tbl_site_content.' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id');
173
+			if ($modx->db->getRecordCount($rs) < 1) {
174 174
 				?>
175 175
 				<div class="text-danger"><?= $_lang['no_groups_found'] ?></div>
176 176
 				<?php
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
 			<div class="form-group">
180 180
 				<?php
181 181
 				$pid = '';
182
-				while($row = $modx->db->getRow($rs)) {
183
-					if($pid != $row['id']) {
184
-						if($pid != '') {
182
+				while ($row = $modx->db->getRow($rs)) {
183
+					if ($pid != $row['id']) {
184
+						if ($pid != '') {
185 185
 							echo '</div><div class="form-group">';
186 186
 						}
187 187
 						?>
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 						<?= $_lang['access_permissions_resources_in_group'] ?>
201 201
 						<?php
202 202
 					}
203
-					if(!$row['doc_id']) {
203
+					if (!$row['doc_id']) {
204 204
 						?>
205 205
 						<i><?= $_lang['access_permissions_no_resources_in_group'] ?></i>
206 206
 						<?php
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
 			<p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p>
227 227
 			<?php
228 228
 			// User/Document Group Links
229
-			$rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames
230
-			LEFT JOIN ' . $tbl_membergroup_access . ' AS groupacc ON groupacc.membergroup = groupnames.id
231
-			LEFT JOIN ' . $tbl_documentgroup_names . ' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name');
232
-			if($modx->db->getRecordCount($rs) < 1) {
229
+			$rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names.' AS groupnames
230
+			LEFT JOIN ' . $tbl_membergroup_access.' AS groupacc ON groupacc.membergroup = groupnames.id
231
+			LEFT JOIN ' . $tbl_documentgroup_names.' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name');
232
+			if ($modx->db->getRecordCount($rs) < 1) {
233 233
 				?>
234 234
 				<div class="text-danger"><?= $_lang['no_groups_found'] ?></div>
235 235
 				<?php
@@ -251,23 +251,23 @@  discard block
 block discarded – undo
251 251
 				<ul>
252 252
 					<?php
253 253
 					$pid = '';
254
-					while($row = $modx->db->getRow($rs)) {
255
-						if($row['id'] != $pid) {
256
-							if($pid != '') {
254
+					while ($row = $modx->db->getRow($rs)) {
255
+						if ($row['id'] != $pid) {
256
+							if ($pid != '') {
257 257
 								echo '</ul></li>';
258 258
 							} // close previous one
259 259
 							?>
260 260
 							<li><b><?= $row['name'] ?></b></li>
261 261
 							<?php
262
-							if(!$row['dg_id']) {
263
-								echo '<i>' . $_lang['no_groups_found'] . '</i></li>';
262
+							if (!$row['dg_id']) {
263
+								echo '<i>'.$_lang['no_groups_found'].'</i></li>';
264 264
 								$pid = '';
265 265
 								continue;
266 266
 							} else {
267 267
 								echo '<ul>';
268 268
 							}
269 269
 						}
270
-						if(!$row['dg_id']) {
270
+						if (!$row['dg_id']) {
271 271
 							continue;
272 272
 						}
273 273
 						?>
Please login to merge, or discard this patch.
manager/actions/user_management.static.php 2 patches
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if(IN_MANAGER_MODE != "true") {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('edit_user')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 // initialize page view state - the $_PAGE object
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 
12 12
 // get and save search string
13 13
 if($_REQUEST['op'] == 'reset') {
14
-	$query = '';
15
-	$_PAGE['vs']['search'] = '';
14
+    $query = '';
15
+    $_PAGE['vs']['search'] = '';
16 16
 } else {
17
-	$query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18
-	$sqlQuery = $modx->db->escape($query);
19
-	$_PAGE['vs']['search'] = $query;
17
+    $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search'];
18
+    $sqlQuery = $modx->db->escape($query);
19
+    $_PAGE['vs']['search'] = $query;
20 20
 }
21 21
 
22 22
 // get & save listmode
@@ -120,55 +120,55 @@  discard block
 block discarded – undo
120 120
 			<div class="row">
121 121
 				<div class="table-responsive">
122 122
 					<?php
123
-					$where = "";
124
-					if(!$modx->hasPermission('save_role')) {
125
-						$where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
126
-					}
127
-					if(!empty($sqlQuery)) {
128
-						$where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
129
-					}
130
-					$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu 
123
+                    $where = "";
124
+                    if(!$modx->hasPermission('save_role')) {
125
+                        $where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
126
+                    }
127
+                    if(!empty($sqlQuery)) {
128
+                        $where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
129
+                    }
130
+                    $ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu 
131 131
 			INNER JOIN " . $modx->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id 
132 132
 			LEFT JOIN " . $modx->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
133
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
134
-					$grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
135
-					$grd->noRecordMsg = $_lang["no_records_found"];
136
-					$grd->cssClass = "table data";
137
-					$grd->columnHeaderClass = "tableHeader";
138
-					$grd->itemClass = "tableItem";
139
-					$grd->altItemClass = "tableAltItem";
140
-					$grd->fields = "id,username,fullname,role,email,gender,blocked,thislogin";
141
-					$grd->columns = implode(',', array(
142
-						$_lang["icon"],
143
-						$_lang["name"],
144
-						$_lang["user_full_name"],
145
-						$_lang['role'],
146
-						$_lang["email"],
147
-						$_lang["user_gender"],
148
-						$_lang["user_block"],
149
-						$_lang["login_button"]
150
-					));
151
-					$grd->colWidths = "1%,,,,,,1%,1%";
152
-					$grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap";
153
-					$grd->colTypes = implode('||', array(
154
-						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
155
-						'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
156
-						'template:[+fullname+]',
157
-						'template:[+role+]',
158
-						'template:[+email+]',
159
-						'template:[+gender+]',
160
-						'template:[+blocked+]',
161
-						'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M'
162
-					));
163
-					if($listmode == '1') {
164
-						$grd->pageSize = 0;
165
-					}
166
-					if($_REQUEST['op'] == 'reset') {
167
-						$grd->pageNumber = 1;
168
-					}
169
-					// render grid
170
-					echo $grd->render();
171
-					?>
133
+                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
134
+                    $grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
135
+                    $grd->noRecordMsg = $_lang["no_records_found"];
136
+                    $grd->cssClass = "table data";
137
+                    $grd->columnHeaderClass = "tableHeader";
138
+                    $grd->itemClass = "tableItem";
139
+                    $grd->altItemClass = "tableAltItem";
140
+                    $grd->fields = "id,username,fullname,role,email,gender,blocked,thislogin";
141
+                    $grd->columns = implode(',', array(
142
+                        $_lang["icon"],
143
+                        $_lang["name"],
144
+                        $_lang["user_full_name"],
145
+                        $_lang['role'],
146
+                        $_lang["email"],
147
+                        $_lang["user_gender"],
148
+                        $_lang["user_block"],
149
+                        $_lang["login_button"]
150
+                    ));
151
+                    $grd->colWidths = "1%,,,,,,1%,1%";
152
+                    $grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap";
153
+                    $grd->colTypes = implode('||', array(
154
+                        'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
155
+                        'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
156
+                        'template:[+fullname+]',
157
+                        'template:[+role+]',
158
+                        'template:[+email+]',
159
+                        'template:[+gender+]',
160
+                        'template:[+blocked+]',
161
+                        'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M'
162
+                    ));
163
+                    if($listmode == '1') {
164
+                        $grd->pageSize = 0;
165
+                    }
166
+                    if($_REQUEST['op'] == 'reset') {
167
+                        $grd->pageNumber = 1;
168
+                    }
169
+                    // render grid
170
+                    echo $grd->render();
171
+                    ?>
172 172
 				</div>
173 173
 			</div>
174 174
 		</div>
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE != "true") {
2
+if (IN_MANAGER_MODE != "true") {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('edit_user')) {
5
+if (!$modx->hasPermission('edit_user')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 $modx->manager->initPageViewState();
11 11
 
12 12
 // get and save search string
13
-if($_REQUEST['op'] == 'reset') {
13
+if ($_REQUEST['op'] == 'reset') {
14 14
 	$query = '';
15 15
 	$_PAGE['vs']['search'] = '';
16 16
 } else {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 
27 27
 // context menu
28
-include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php";
28
+include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php";
29 29
 $cm = new ContextMenu("cntxm", 150);
30 30
 $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0));
31 31
 $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0));
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
 				<div class="table-responsive">
122 122
 					<?php
123 123
 					$where = "";
124
-					if(!$modx->hasPermission('save_role')) {
125
-						$where .= (empty($where) ? "" : " AND ") . "mua.role != 1";
124
+					if (!$modx->hasPermission('save_role')) {
125
+						$where .= (empty($where) ? "" : " AND ")."mua.role != 1";
126 126
 					}
127
-					if(!empty($sqlQuery)) {
128
-						$where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
127
+					if (!empty($sqlQuery)) {
128
+						$where .= (empty($where) ? "" : " AND ")."((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
129 129
 					}
130
-					$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu 
131
-			INNER JOIN " . $modx->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id 
132
-			LEFT JOIN " . $modx->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
133
-					include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
130
+					$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users')." AS mu 
131
+			INNER JOIN " . $modx->getFullTableName('user_attributes')." AS mua ON mua.internalKey=mu.id 
132
+			LEFT JOIN " . $modx->getFullTableName('user_roles')." AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
133
+					include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
134 134
 					$grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items
135 135
 					$grd->noRecordMsg = $_lang["no_records_found"];
136 136
 					$grd->cssClass = "table data";
@@ -151,19 +151,19 @@  discard block
 block discarded – undo
151 151
 					$grd->colWidths = "1%,,,,,,1%,1%";
152 152
 					$grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap";
153 153
 					$grd->colTypes = implode('||', array(
154
-						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
155
-						'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
154
+						'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="'.$_lang['click_to_context'].'"><i class="'.$_style['icons_user'].'"></i></a>',
155
+						'template:<a href="index.php?a=12&id=[+id+]" title="'.$_lang['click_to_edit_title'].'">[+value+]</a>',
156 156
 						'template:[+fullname+]',
157 157
 						'template:[+role+]',
158 158
 						'template:[+email+]',
159 159
 						'template:[+gender+]',
160 160
 						'template:[+blocked+]',
161
-						'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M'
161
+						'date: '.$modx->toDateFormat('[+thislogin+]', 'formatOnly').' %H:%M'
162 162
 					));
163
-					if($listmode == '1') {
163
+					if ($listmode == '1') {
164 164
 						$grd->pageSize = 0;
165 165
 					}
166
-					if($_REQUEST['op'] == 'reset') {
166
+					if ($_REQUEST['op'] == 'reset') {
167 167
 						$grd->pageNumber = 1;
168 168
 					}
169 169
 					// render grid
Please login to merge, or discard this patch.
manager/actions/logging.static.php 2 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                             $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username');
66 66
                             foreach ($logs_user as $row) {
67 67
                                 $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : '';
68
-                                echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n";
68
+                                echo "\t\t".'<option value="'.$row['internalKey'].'"'.$selectedtext.'>'.$row['username']."</option>\n";
69 69
                             }
70 70
                             ?>
71 71
                         </select>
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                                     continue;
87 87
                                 }
88 88
                                 $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : '';
89
-                                echo "\t\t" . '<option value="' . $row['action'] . '"' . $selectedtext . '>' . $row['action'] . ' - ' . $action . "</option>\n";
89
+                                echo "\t\t".'<option value="'.$row['action'].'"'.$selectedtext.'>'.$row['action'].' - '.$action."</option>\n";
90 90
                             }
91 91
                             ?>
92 92
                         </select>
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                             $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid');
103 103
                             foreach ($logs_items as $row) {
104 104
                                 $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : '';
105
-                                echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n";
105
+                                echo "\t\t".'<option value="'.$row['itemid'].'"'.$selectedtext.'>'.$row['itemid']."</option>\n";
106 106
                             }
107 107
                             ?>
108 108
                         </select>
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                             $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname');
119 119
                             foreach ($logs_names as $row) {
120 120
                                 $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : '';
121
-                                echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n";
121
+                                echo "\t\t".'<option value="'.$row['itemname'].'"'.$selectedtext.'>'.$row['itemname']."</option>\n";
122 122
                             }
123 123
                             ?>
124 124
                         </select>
@@ -176,26 +176,26 @@  discard block
 block discarded – undo
176 176
     // get the selections the user made.
177 177
     $sqladd = array();
178 178
     if ($_REQUEST['searchuser'] != 0) {
179
-        $sqladd[] = "internalKey='" . intval($_REQUEST['searchuser']) . "'";
179
+        $sqladd[] = "internalKey='".intval($_REQUEST['searchuser'])."'";
180 180
     }
181 181
     if ($_REQUEST['action'] != 0) {
182
-        $sqladd[] = "action=" . intval($_REQUEST['action']);
182
+        $sqladd[] = "action=".intval($_REQUEST['action']);
183 183
     }
184 184
     if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
185
-        $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'";
185
+        $sqladd[] = "itemid='".$_REQUEST['itemid']."'";
186 186
     }
187 187
     if ($_REQUEST['itemname'] != '0') {
188
-        $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'";
188
+        $sqladd[] = "itemname='".$modx->db->escape($_REQUEST['itemname'])."'";
189 189
     }
190 190
     if ($_REQUEST['message'] != "") {
191
-        $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'";
191
+        $sqladd[] = "message LIKE '%".$modx->db->escape($_REQUEST['message'])."%'";
192 192
     }
193 193
     // date stuff
194 194
     if ($_REQUEST['datefrom'] != "") {
195
-        $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']);
195
+        $sqladd[] = "timestamp>".$modx->toTimeStamp($_REQUEST['datefrom']);
196 196
     }
197 197
     if ($_REQUEST['dateto'] != "") {
198
-        $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']);
198
+        $sqladd[] = "timestamp<".$modx->toTimeStamp($_REQUEST['dateto']);
199 199
     }
200 200
 
201 201
     // If current position is not set, set it to zero
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     // Number of result to display on the page, will be in the LIMIT of the sql query also
209 209
     $int_num_result = is_numeric($_REQUEST['nrresults']) ? $_REQUEST['nrresults'] : $number_of_logs;
210 210
 
211
-    $extargv = "&a=13&searchuser=" . $_REQUEST['searchuser'] . "&action=" . $_REQUEST['action'] . "&itemid=" . $_REQUEST['itemid'] . "&itemname=" . $_REQUEST['itemname'] . "&message=" . $_REQUEST['message'] . "&dateto=" . $_REQUEST['dateto'] . "&datefrom=" . $_REQUEST['datefrom'] . "&nrresults=" . $int_num_result . "&log_submit=" . $_REQUEST['log_submit']; // extra argv here (could be anything depending on your page)
211
+    $extargv = "&a=13&searchuser=".$_REQUEST['searchuser']."&action=".$_REQUEST['action']."&itemid=".$_REQUEST['itemid']."&itemname=".$_REQUEST['itemname']."&message=".$_REQUEST['message']."&dateto=".$_REQUEST['dateto']."&datefrom=".$_REQUEST['datefrom']."&nrresults=".$int_num_result."&log_submit=".$_REQUEST['log_submit']; // extra argv here (could be anything depending on your page)
212 212
 
213 213
     // build the sql
214 214
     $limit = $num_rows = $modx->db->getValue($modx->db->select('COUNT(*)', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : '')));
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
     $rs = $modx->db->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}");
217 217
 
218 218
 if ($limit < 1) {
219
-    echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>';
219
+    echo '<p>'.$_lang["mgrlog_emptysrch"].'</p>';
220 220
 } else {
221
-    echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>';
221
+    echo '<p>'.$_lang["mgrlog_sortinst"].'</p>';
222 222
 
223 223
     include_once "paginate.inc.php";
224 224
     // New instance of the Paging class, you can modify the color and the width of the html table
@@ -230,11 +230,11 @@  discard block
 block discarded – undo
230 230
     $current_row = $int_cur_position / $int_num_result;
231 231
 
232 232
     // Display the result as you like...
233
-    print "<p>" . $_lang["paging_showing"] . " " . $array_paging['lower'];
234
-    print " " . $_lang["paging_to"] . " " . $array_paging['upper'];
235
-    print " (" . $array_paging['total'] . " " . $_lang["paging_total"] . ")<br />";
236
-    $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " ");
237
-    $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " ");
233
+    print "<p>".$_lang["paging_showing"]." ".$array_paging['lower'];
234
+    print " ".$_lang["paging_to"]." ".$array_paging['upper'];
235
+    print " (".$array_paging['total']." ".$_lang["paging_total"].")<br />";
236
+    $paging = $array_paging['first_link'].$_lang["paging_first"].(isset($array_paging['first_link']) ? "</a> " : " ");
237
+    $paging .= $array_paging['previous_link'].$_lang["paging_prev"].(isset($array_paging['previous_link']) ? "</a> " : " ");
238 238
     $pagesfound = sizeof($array_row_paging);
239 239
     if ($pagesfound > 6) {
240 240
         $paging .= $array_row_paging[$current_row - 2]; // ."&nbsp;";
@@ -244,11 +244,11 @@  discard block
 block discarded – undo
244 244
         $paging .= $array_row_paging[$current_row + 2]; // ."&nbsp;";
245 245
     } else {
246 246
         for ($i = 0; $i < $pagesfound; $i++) {
247
-            $paging .= $array_row_paging[$i] . "&nbsp;";
247
+            $paging .= $array_row_paging[$i]."&nbsp;";
248 248
         }
249 249
     }
250
-    $paging .= $array_paging['next_link'] . $_lang["paging_next"] . (isset($array_paging['next_link']) ? "</a> " : " ") . " ";
251
-    $paging .= $array_paging['last_link'] . $_lang["paging_last"] . (isset($array_paging['last_link']) ? "</a> " : " ") . " ";
250
+    $paging .= $array_paging['next_link'].$_lang["paging_next"].(isset($array_paging['next_link']) ? "</a> " : " ")." ";
251
+    $paging .= $array_paging['last_link'].$_lang["paging_last"].(isset($array_paging['last_link']) ? "</a> " : " ")." ";
252 252
     // The above exemple print somethings like:
253 253
     // Results 1 to 20 of 597  <<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 >>>
254 254
     // Of course you can now play with array_row_paging in order to print
@@ -282,16 +282,16 @@  discard block
 block discarded – undo
282 282
                     if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
283 283
                         $item = '<div style="text-align:center;">-</div>';
284 284
                     } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
285
-                        $item = '<a href="index.php?a=3&amp;id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>';
285
+                        $item = '<a href="index.php?a=3&amp;id='.$logentry['itemid'].'">'.$logentry['itemname'].'</a>';
286 286
                     } else {
287 287
                         $item = $logentry['itemname'];
288 288
                     }
289 289
                     //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true'
290
-                    $user_drill = 'index.php?a=13&searchuser=' . $logentry['internalKey'] . '&itemname=0&log_submit=true';
290
+                    $user_drill = 'index.php?a=13&searchuser='.$logentry['internalKey'].'&itemname=0&log_submit=true';
291 291
                     ?>
292 292
                     <tr>
293
-                        <td><?= '<a href="' . $user_drill . '">' . $logentry['username'] . '</a>' ?></td>
294
-                        <td class="text-nowrap"><?= '[' . $logentry['action'] . '] ' . $logentry['message'] ?></td>
293
+                        <td><?= '<a href="'.$user_drill.'">'.$logentry['username'].'</a>' ?></td>
294
+                        <td class="text-nowrap"><?= '['.$logentry['action'].'] '.$logentry['message'] ?></td>
295 295
                         <td class="text-xs-right"><?= $logentry['itemid'] ?></td>
296 296
                         <td><?= $item ?></td>
297 297
                         <td class="text-nowrap"><?= $modx->toDateFormat($logentry['timestamp'] + $server_offset_time) ?></td>
Please login to merge, or discard this patch.
Braces   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (IN_MANAGER_MODE != "true") {
2
+if (IN_MANAGER_MODE != "true") {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if (!$modx->hasPermission('logs')) {
5
+if (!$modx->hasPermission('logs')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-function array_unique_multi($array, $checkKey)
10
-{
9
+function array_unique_multi($array, $checkKey)
10
+{
11 11
     // Use the builtin if we're not a multi-dimensional array
12
-    if (!is_array(current($array)) || empty($checkKey)) {
12
+    if (!is_array(current($array)) || empty($checkKey)) {
13 13
         return array_unique($array);
14 14
     }
15 15
 
16 16
     $ret = array();
17 17
     $checkValues = array(); // contains the unique key Values
18
-    foreach ($array as $key => $current) {
19
-        if (in_array($current[$checkKey], $checkValues)) {
18
+    foreach ($array as $key => $current) {
19
+        if (in_array($current[$checkKey], $checkValues)) {
20 20
             continue;
21 21
         } // duplicate
22 22
 
@@ -26,17 +26,17 @@  discard block
 block discarded – undo
26 26
     return $ret;
27 27
 }
28 28
 
29
-function record_sort($array, $key)
30
-{
29
+function record_sort($array, $key)
30
+{
31 31
     $hash = array();
32
-    foreach ($array as $k => $v) {
32
+    foreach ($array as $k => $v) {
33 33
         $hash[$k] = $v[$key];
34 34
     }
35 35
 
36 36
     natsort($hash);
37 37
 
38 38
     $records = array();
39
-    foreach ($hash as $k => $row) {
39
+    foreach ($hash as $k => $row) {
40 40
         $records[$k] = $array[$k];
41 41
     }
42 42
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                             <?php
64 64
                             // get all users currently in the log
65 65
                             $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username');
66
-                            foreach ($logs_user as $row) {
66
+                            foreach ($logs_user as $row) {
67 67
                                 $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : '';
68 68
                                 echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n";
69 69
                             }
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
                             // get all available actions in the log
81 81
                             include_once "actionlist.inc.php";
82 82
                             $logs_actions = record_sort(array_unique_multi($logs, 'action'), 'action');
83
-                            foreach ($logs_actions as $row) {
83
+                            foreach ($logs_actions as $row) {
84 84
                                 $action = getAction($row['action']);
85
-                                if ($action == 'Idle') {
85
+                                if ($action == 'Idle') {
86 86
                                     continue;
87 87
                                 }
88 88
                                 $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : '';
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                             <?php
101 101
                             // get all itemid currently in logging
102 102
                             $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid');
103
-                            foreach ($logs_items as $row) {
103
+                            foreach ($logs_items as $row) {
104 104
                                 $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : '';
105 105
                                 echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n";
106 106
                             }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                             <?php
117 117
                             // get all itemname currently in logging
118 118
                             $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname');
119
-                            foreach ($logs_names as $row) {
119
+                            foreach ($logs_names as $row) {
120 120
                                 $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : '';
121 121
                                 echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n";
122 122
                             }
@@ -172,36 +172,36 @@  discard block
 block discarded – undo
172 172
     <div class="container container-body">
173 173
 
174 174
 <?php
175
-if (isset($_REQUEST['log_submit'])) {
175
+if (isset($_REQUEST['log_submit'])) {
176 176
     // get the selections the user made.
177 177
     $sqladd = array();
178
-    if ($_REQUEST['searchuser'] != 0) {
178
+    if ($_REQUEST['searchuser'] != 0) {
179 179
         $sqladd[] = "internalKey='" . intval($_REQUEST['searchuser']) . "'";
180 180
     }
181
-    if ($_REQUEST['action'] != 0) {
181
+    if ($_REQUEST['action'] != 0) {
182 182
         $sqladd[] = "action=" . intval($_REQUEST['action']);
183 183
     }
184
-    if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
184
+    if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
185 185
         $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'";
186 186
     }
187
-    if ($_REQUEST['itemname'] != '0') {
187
+    if ($_REQUEST['itemname'] != '0') {
188 188
         $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'";
189 189
     }
190
-    if ($_REQUEST['message'] != "") {
190
+    if ($_REQUEST['message'] != "") {
191 191
         $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'";
192 192
     }
193 193
     // date stuff
194
-    if ($_REQUEST['datefrom'] != "") {
194
+    if ($_REQUEST['datefrom'] != "") {
195 195
         $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']);
196 196
     }
197
-    if ($_REQUEST['dateto'] != "") {
197
+    if ($_REQUEST['dateto'] != "") {
198 198
         $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']);
199 199
     }
200 200
 
201 201
     // If current position is not set, set it to zero
202
-    if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
202
+    if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
203 203
         $int_cur_position = 0;
204
-    } else {
204
+    } else {
205 205
         $int_cur_position = $_REQUEST['int_cur_position'];
206 206
     }
207 207
 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
 
216 216
     $rs = $modx->db->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}");
217 217
 
218
-if ($limit < 1) {
218
+if ($limit < 1) {
219 219
     echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>';
220
-} else {
220
+} else {
221 221
     echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>';
222 222
 
223 223
     include_once "paginate.inc.php";
@@ -236,14 +236,14 @@  discard block
 block discarded – undo
236 236
     $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " ");
237 237
     $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " ");
238 238
     $pagesfound = sizeof($array_row_paging);
239
-    if ($pagesfound > 6) {
239
+    if ($pagesfound > 6) {
240 240
         $paging .= $array_row_paging[$current_row - 2]; // ."&nbsp;";
241 241
         $paging .= $array_row_paging[$current_row - 1]; // ."&nbsp;";
242 242
         $paging .= $array_row_paging[$current_row]; // ."&nbsp;";
243 243
         $paging .= $array_row_paging[$current_row + 1]; // ."&nbsp;";
244 244
         $paging .= $array_row_paging[$current_row + 2]; // ."&nbsp;";
245
-    } else {
246
-        for ($i = 0; $i < $pagesfound; $i++) {
245
+    } else {
246
+        for ($i = 0; $i < $pagesfound; $i++) {
247 247
             $paging .= $array_row_paging[$i] . "&nbsp;";
248 248
         }
249 249
     }
@@ -278,12 +278,12 @@  discard block
 block discarded – undo
278 278
                 // grab the entire log file...
279 279
                 $logentries = array();
280 280
                 $i = 0;
281
-                while ($logentry = $modx->db->getRow($rs)) {
282
-                    if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
281
+                while ($logentry = $modx->db->getRow($rs)) {
282
+                    if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
283 283
                         $item = '<div style="text-align:center;">-</div>';
284
-                    } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
284
+                    } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
285 285
                         $item = '<a href="index.php?a=3&amp;id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>';
286
-                    } else {
286
+                    } else {
287 287
                         $item = $logentry['itemname'];
288 288
                     }
289 289
                     //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true'
@@ -318,6 +318,6 @@  discard block
 block discarded – undo
318 318
     // @see index.php @ 915
319 319
     global $action;
320 320
     $action = 1;
321
-} else {
321
+} else {
322 322
     echo $_lang["mgrlog_noquery"];
323 323
 }
Please login to merge, or discard this patch.
manager/actions/resource_selector.static.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 }
65 65
 
66
-include_once MODX_MANAGER_PATH . "includes/header.inc.php";
66
+include_once MODX_MANAGER_PATH."includes/header.inc.php";
67 67
 ?>
68 68
 <script language="JavaScript" type="text/javascript">
69 69
     function saveSelection()
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 </script>
139 139
 
140 140
 <h1>
141
-    <?= $title . " - " . $_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i>
141
+    <?= $title." - ".$_lang['element_selector_title'] ?><i class="fa fa-question-circle help"></i>
142 142
 </h1>
143 143
 
144 144
 <div id="actions">
@@ -177,15 +177,15 @@  discard block
 block discarded – undo
177 177
             <div class="row">
178 178
                 <div class="table-responsive">
179 179
                     <?php
180
-                    include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
180
+                    include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php";
181 181
                     $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
182 182
                     $grd->noRecordMsg = $_lang["no_records_found"];
183 183
                     $grd->cssClass = "table data nowrap";
184 184
                     $grd->columnHeaderClass = "tableHeader";
185 185
                     $grd->itemClass = "tableItem";
186 186
                     $grd->altItemClass = "tableAltItem";
187
-                    $grd->columns = $_lang["name"] . " ," . $_lang["description"];
188
-                    $grd->colTypes = "template:<input type='" . ($sm == 'm' ? 'checkbox' : 'radio') . "' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]";
187
+                    $grd->columns = $_lang["name"]." ,".$_lang["description"];
188
+                    $grd->colTypes = "template:<input type='".($sm == 'm' ? 'checkbox' : 'radio')."' name='id[]' value='[+id+]' onclick='setCheckbox(this);'> [+value+]";
189 189
                     $grd->colWidths = "45%";
190 190
                     $grd->fields = "name,description";
191 191
                     if ($_REQUEST['listmode'] == '1') {
Please login to merge, or discard this patch.
manager/actions/mutate_categories.dynamic.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,24 +2,24 @@  discard block
 block discarded – undo
2 2
 if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3 3
 
4 4
 if(!$modx->hasPermission('category_manager')) {
5
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
6 6
 }
7 7
 
8 8
 $_module_params = array(
9
-	'module_version'   => '1.0.0',
10
-	'module_params'    => '',
11
-	'module_id'        => $_GET['id'],
12
-	'package_name'     => 'Module_Categories_Manager',
13
-	'native_language'  => 'de',
14
-	'name'             => 'Categories Manager',
15
-	'dirname'          => $site_manager_url,
16
-	'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
17
-	'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
18
-	'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
19
-	'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
20
-	'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
21
-	'request_key'      => 'module_categories_manager',
22
-	'messages'         => array()
9
+    'module_version'   => '1.0.0',
10
+    'module_params'    => '',
11
+    'module_id'        => $_GET['id'],
12
+    'package_name'     => 'Module_Categories_Manager',
13
+    'native_language'  => 'de',
14
+    'name'             => 'Categories Manager',
15
+    'dirname'          => $site_manager_url,
16
+    'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
17
+    'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
18
+    'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
19
+    'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
20
+    'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
21
+    'request_key'      => 'module_categories_manager',
22
+    'messages'         => array()
23 23
 );
24 24
 
25 25
 require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php';
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // assign module_params to internal params
29 29
 foreach( $_module_params as $param => $value )
30 30
 {
31
-	$cm->set( $param, $value );
31
+    $cm->set( $param, $value );
32 32
 }
33 33
 
34 34
 // catch the request actions
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 
37 37
 if( !$categories = $cm->getCategories() )
38 38
 {
39
-	setcookie('webfxtab_manage-categories-pane', 0 );
40
-	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
39
+    setcookie('webfxtab_manage-categories-pane', 0 );
40
+    $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
41 41
 }
42 42
 
43 43
 $cm->renderView('main', $categories );
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
2
+if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3 3
 
4
-if(!$modx->hasPermission('category_manager')) {
4
+if (!$modx->hasPermission('category_manager')) {
5 5
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6 6
 }
7 7
 
@@ -13,32 +13,32 @@  discard block
 block discarded – undo
13 13
 	'native_language'  => 'de',
14 14
 	'name'             => 'Categories Manager',
15 15
 	'dirname'          => $site_manager_url,
16
-	'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
17
-	'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
18
-	'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
19
-	'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
20
-	'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
16
+	'url'              => 'index.php?a=120&amp;id='.$_GET['id'],
17
+	'path'             => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR,
18
+	'inc_dir'          => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR,
19
+	'languages_dir'    => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR,
20
+	'views_dir'        => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR,
21 21
 	'request_key'      => 'module_categories_manager',
22 22
 	'messages'         => array()
23 23
 );
24 24
 
25
-require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php';
25
+require_once $_module_params['inc_dir'].'Module_Categories_Manager.php';
26 26
 $cm = new Module_Categories_Manager();
27 27
 
28 28
 // assign module_params to internal params
29
-foreach( $_module_params as $param => $value )
29
+foreach ($_module_params as $param => $value)
30 30
 {
31
-	$cm->set( $param, $value );
31
+	$cm->set($param, $value);
32 32
 }
33 33
 
34 34
 // catch the request actions
35
-include_once $cm->get('inc_dir') . 'request_trigger.inc.php';
35
+include_once $cm->get('inc_dir').'request_trigger.inc.php';
36 36
 
37
-if( !$categories = $cm->getCategories() )
37
+if (!$categories = $cm->getCategories())
38 38
 {
39
-	setcookie('webfxtab_manage-categories-pane', 0 );
40
-	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
39
+	setcookie('webfxtab_manage-categories-pane', 0);
40
+	$cm->addMessage($cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global');
41 41
 }
42 42
 
43
-$cm->renderView('main', $categories );
43
+$cm->renderView('main', $categories);
44 44
 return;
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
2
+if(IN_MANAGER_MODE!="true") {
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4
+}
3 5
 
4 6
 if(!$modx->hasPermission('category_manager')) {
5 7
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
@@ -26,16 +28,14 @@  discard block
 block discarded – undo
26 28
 $cm = new Module_Categories_Manager();
27 29
 
28 30
 // assign module_params to internal params
29
-foreach( $_module_params as $param => $value )
30
-{
31
+foreach( $_module_params as $param => $value ) {
31 32
 	$cm->set( $param, $value );
32 33
 }
33 34
 
34 35
 // catch the request actions
35 36
 include_once $cm->get('inc_dir') . 'request_trigger.inc.php';
36 37
 
37
-if( !$categories = $cm->getCategories() )
38
-{
38
+if( !$categories = $cm->getCategories() ) {
39 39
 	setcookie('webfxtab_manage-categories-pane', 0 );
40 40
 	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
41 41
 }
Please login to merge, or discard this patch.