Completed
Push — develop ( ef95a6...f399f2 )
by Maxim
06:16
created
manager/processors/remove_locks.processor.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+	if(!$modx->hasPermission('remove_locks')) {
8
+	    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
+	}
8 10
 
9 11
 	// Remove all locks
10 12
 	$modx->db->truncate($modx->getFullTableName('active_user_locks'));
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -4,23 +4,23 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+    if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 
9
-	// Remove all locks
10
-	$modx->db->truncate($modx->getFullTableName('active_user_locks'));
9
+    // Remove all locks
10
+    $modx->db->truncate($modx->getFullTableName('active_user_locks'));
11 11
 
12
-	$header = "Location: index.php?a=2";
13
-	header($header);
12
+    $header = "Location: index.php?a=2";
13
+    header($header);
14 14
 } else {
15
-	// Remove single locks via AJAX / window.onbeforeunload
16
-	$type = (int)$_GET['type'];
17
-	$id = (int)$_GET['id'];
18
-	$includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
19
-	if($type && $id) {
20
-		$modx->unlockElement($type, $id, $includeAllUsers);
21
-		echo '1';
22
-		exit;
23
-	} else {
24
-		echo 'No type or id sent with request.';
25
-	}
15
+    // Remove single locks via AJAX / window.onbeforeunload
16
+    $type = (int)$_GET['type'];
17
+    $id = (int)$_GET['id'];
18
+    $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
19
+    if($type && $id) {
20
+        $modx->unlockElement($type, $id, $includeAllUsers);
21
+        echo '1';
22
+        exit;
23
+    } else {
24
+        echo 'No type or id sent with request.';
25
+    }
26 26
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
6
-if(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+if (!isset($_GET['id'])) {
7
+	if (!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 
9 9
 	// Remove all locks
10 10
 	$modx->db->truncate($modx->getFullTableName('active_user_locks'));
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	header($header);
14 14
 } else {
15 15
 	// Remove single locks via AJAX / window.onbeforeunload
16
-	$type = (int)$_GET['type'];
17
-	$id = (int)$_GET['id'];
16
+	$type = (int) $_GET['type'];
17
+	$id = (int) $_GET['id'];
18 18
 	$includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
19
-	if($type && $id) {
19
+	if ($type && $id) {
20 20
 		$modx->unlockElement($type, $id, $includeAllUsers);
21 21
 		echo '1';
22 22
 		exit;
Please login to merge, or discard this patch.
manager/processors/web_access_groups.processor.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 }
118 118
 
119 119
 // secure web documents - flag as private
120
-if($updategroupaccess==true){
120
+if($updategroupaccess==true) {
121 121
 	include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122 122
 	secureWebDocument();
123 123
 
Please login to merge, or discard this patch.
Indentation   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('web_access_permissions')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 // web access group processor.
@@ -20,111 +20,111 @@  discard block
 block discarded – undo
20 20
 $operation = $_REQUEST['operation'];
21 21
 
22 22
 switch ($operation) {
23
-	case "add_user_group" :
24
-		$newgroup = $_REQUEST['newusergroup'];
25
-		if(empty($newgroup)) {
26
-			$modx->webAlertAndQuit("No group name specified.");
27
-		} else {
28
-			$id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_webgroup_names);
23
+    case "add_user_group" :
24
+        $newgroup = $_REQUEST['newusergroup'];
25
+        if(empty($newgroup)) {
26
+            $modx->webAlertAndQuit("No group name specified.");
27
+        } else {
28
+            $id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_webgroup_names);
29 29
 
30
-			// invoke OnWebCreateGroup event
31
-			$modx->invokeEvent('OnWebCreateGroup', array(
32
-				'groupid'   => $id,
33
-				'groupname' => $newgroup,
34
-			));
35
-		}
36
-	break;
37
-	case "add_document_group" :
38
-		$newgroup = $_REQUEST['newdocgroup'];
39
-		if(empty($newgroup)) {
40
-			$modx->webAlertAndQuit("No group name specified.");
41
-		} else {
42
-			$id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_documentgroup_names);
30
+            // invoke OnWebCreateGroup event
31
+            $modx->invokeEvent('OnWebCreateGroup', array(
32
+                'groupid'   => $id,
33
+                'groupname' => $newgroup,
34
+            ));
35
+        }
36
+    break;
37
+    case "add_document_group" :
38
+        $newgroup = $_REQUEST['newdocgroup'];
39
+        if(empty($newgroup)) {
40
+            $modx->webAlertAndQuit("No group name specified.");
41
+        } else {
42
+            $id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_documentgroup_names);
43 43
 
44
-			// invoke OnCreateDocGroup event
45
-			$modx->invokeEvent('OnCreateDocGroup', array(
46
-				'groupid'   => $id,
47
-				'groupname' => $newgroup,
48
-			));
49
-		}
50
-	break;
51
-	case "delete_user_group" :
52
-		$updategroupaccess = true;
53
-		$usergroup = (int)$_REQUEST['usergroup'];
54
-		if(empty($usergroup)) {
55
-			$modx->webAlertAndQuit("No user group id specified for deletion.");
56
-		} else {
57
-			$modx->db->delete($tbl_webgroup_names, "id='{$usergroup}'");
44
+            // invoke OnCreateDocGroup event
45
+            $modx->invokeEvent('OnCreateDocGroup', array(
46
+                'groupid'   => $id,
47
+                'groupname' => $newgroup,
48
+            ));
49
+        }
50
+    break;
51
+    case "delete_user_group" :
52
+        $updategroupaccess = true;
53
+        $usergroup = (int)$_REQUEST['usergroup'];
54
+        if(empty($usergroup)) {
55
+            $modx->webAlertAndQuit("No user group id specified for deletion.");
56
+        } else {
57
+            $modx->db->delete($tbl_webgroup_names, "id='{$usergroup}'");
58 58
 
59
-			$modx->db->delete($tbl_webgroup_access, "webgroup='{$usergroup}'");
59
+            $modx->db->delete($tbl_webgroup_access, "webgroup='{$usergroup}'");
60 60
 
61
-			$modx->db->delete($tbl_web_groups, "webuser='{$usergroup}'");
62
-		}
63
-	break;
64
-	case "delete_document_group" :
65
-		$group = (int)$_REQUEST['documentgroup'];
66
-		if(empty($group)) {
67
-			$modx->webAlertAndQuit("No document group id specified for deletion.");
68
-		} else {
69
-			$modx->db->delete($tbl_documentgroup_names, "id='{$group}'");
61
+            $modx->db->delete($tbl_web_groups, "webuser='{$usergroup}'");
62
+        }
63
+    break;
64
+    case "delete_document_group" :
65
+        $group = (int)$_REQUEST['documentgroup'];
66
+        if(empty($group)) {
67
+            $modx->webAlertAndQuit("No document group id specified for deletion.");
68
+        } else {
69
+            $modx->db->delete($tbl_documentgroup_names, "id='{$group}'");
70 70
 
71
-			$modx->db->delete($tbl_webgroup_access, "documentgroup='{$group}'");
71
+            $modx->db->delete($tbl_webgroup_access, "documentgroup='{$group}'");
72 72
 
73
-			$modx->db->delete($tbl_document_groups, "document_group='{$group}'");
74
-		}
75
-	break;
76
-	case "rename_user_group" :
77
-		$newgroupname = $_REQUEST['newgroupname'];
78
-		if(empty($newgroupname)) {
79
-			$modx->webAlertAndQuit("No group name specified.");
80
-		}
81
-		$groupid = (int)$_REQUEST['groupid'];
82
-		if(empty($groupid)) {
83
-			$modx->webAlertAndQuit("No user group id specified for rename.");
84
-		}
85
-		$modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'");
86
-	break;
87
-	case "rename_document_group" :
88
-		$newgroupname = $_REQUEST['newgroupname'];
89
-		if(empty($newgroupname)) {
90
-			$modx->webAlertAndQuit("No group name specified.");
91
-		}
92
-		$groupid = (int)$_REQUEST['groupid'];
93
-		if(empty($groupid)) {
94
-			$modx->webAlertAndQuit("No document group id specified for rename.");
95
-		}
96
-		$modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'");
97
-	break;
98
-	case "add_document_group_to_user_group" :
99
-		$updategroupaccess = true;
100
-		$usergroup = (int)$_REQUEST['usergroup'];
101
-		$docgroup = (int)$_REQUEST['docgroup'];
102
-		$rs = $modx->db->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'");
103
-		$limit = $modx->db->getValue($rs);
104
-		if($limit<=0) {
105
-			$modx->db->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access);
106
-		} else {
107
-			//alert user that coupling already exists?
108
-		}
109
-	break;
110
-	case "remove_document_group_from_user_group" :
111
-		$updategroupaccess = true;
112
-		$coupling = (int)$_REQUEST['coupling'];
113
-		$modx->db->delete($tbl_webgroup_access, "id='{$coupling}'");
114
-	break;
115
-	default :
116
-		$modx->webAlertAndQuit("No operation set in request.");
73
+            $modx->db->delete($tbl_document_groups, "document_group='{$group}'");
74
+        }
75
+    break;
76
+    case "rename_user_group" :
77
+        $newgroupname = $_REQUEST['newgroupname'];
78
+        if(empty($newgroupname)) {
79
+            $modx->webAlertAndQuit("No group name specified.");
80
+        }
81
+        $groupid = (int)$_REQUEST['groupid'];
82
+        if(empty($groupid)) {
83
+            $modx->webAlertAndQuit("No user group id specified for rename.");
84
+        }
85
+        $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'");
86
+    break;
87
+    case "rename_document_group" :
88
+        $newgroupname = $_REQUEST['newgroupname'];
89
+        if(empty($newgroupname)) {
90
+            $modx->webAlertAndQuit("No group name specified.");
91
+        }
92
+        $groupid = (int)$_REQUEST['groupid'];
93
+        if(empty($groupid)) {
94
+            $modx->webAlertAndQuit("No document group id specified for rename.");
95
+        }
96
+        $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'");
97
+    break;
98
+    case "add_document_group_to_user_group" :
99
+        $updategroupaccess = true;
100
+        $usergroup = (int)$_REQUEST['usergroup'];
101
+        $docgroup = (int)$_REQUEST['docgroup'];
102
+        $rs = $modx->db->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'");
103
+        $limit = $modx->db->getValue($rs);
104
+        if($limit<=0) {
105
+            $modx->db->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access);
106
+        } else {
107
+            //alert user that coupling already exists?
108
+        }
109
+    break;
110
+    case "remove_document_group_from_user_group" :
111
+        $updategroupaccess = true;
112
+        $coupling = (int)$_REQUEST['coupling'];
113
+        $modx->db->delete($tbl_webgroup_access, "id='{$coupling}'");
114
+    break;
115
+    default :
116
+        $modx->webAlertAndQuit("No operation set in request.");
117 117
 }
118 118
 
119 119
 // secure web documents - flag as private
120 120
 if($updategroupaccess==true){
121
-	include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122
-	secureWebDocument();
121
+    include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122
+    secureWebDocument();
123 123
 
124
-	// Update the private group column
125
-	$modx->db->update(
126
-		'dgn.private_webgroup = (wga.webgroup IS NOT NULL)',
127
-		"{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_webgroup_access} AS wga ON wga.documentgroup = dgn.id");
124
+    // Update the private group column
125
+    $modx->db->update(
126
+        'dgn.private_webgroup = (wga.webgroup IS NOT NULL)',
127
+        "{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_webgroup_access} AS wga ON wga.documentgroup = dgn.id");
128 128
 }
129 129
 
130 130
 $header = "Location: index.php?a=91";
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('web_access_permissions')) {
5
+if (!$modx->hasPermission('web_access_permissions')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 switch ($operation) {
23 23
 	case "add_user_group" :
24 24
 		$newgroup = $_REQUEST['newusergroup'];
25
-		if(empty($newgroup)) {
25
+		if (empty($newgroup)) {
26 26
 			$modx->webAlertAndQuit("No group name specified.");
27 27
 		} else {
28 28
 			$id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_webgroup_names);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	break;
37 37
 	case "add_document_group" :
38 38
 		$newgroup = $_REQUEST['newdocgroup'];
39
-		if(empty($newgroup)) {
39
+		if (empty($newgroup)) {
40 40
 			$modx->webAlertAndQuit("No group name specified.");
41 41
 		} else {
42 42
 			$id = $modx->db->insert(array('name'=>$modx->db->escape($newgroup)), $tbl_documentgroup_names);
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	break;
51 51
 	case "delete_user_group" :
52 52
 		$updategroupaccess = true;
53
-		$usergroup = (int)$_REQUEST['usergroup'];
54
-		if(empty($usergroup)) {
53
+		$usergroup = (int) $_REQUEST['usergroup'];
54
+		if (empty($usergroup)) {
55 55
 			$modx->webAlertAndQuit("No user group id specified for deletion.");
56 56
 		} else {
57 57
 			$modx->db->delete($tbl_webgroup_names, "id='{$usergroup}'");
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 		}
63 63
 	break;
64 64
 	case "delete_document_group" :
65
-		$group = (int)$_REQUEST['documentgroup'];
66
-		if(empty($group)) {
65
+		$group = (int) $_REQUEST['documentgroup'];
66
+		if (empty($group)) {
67 67
 			$modx->webAlertAndQuit("No document group id specified for deletion.");
68 68
 		} else {
69 69
 			$modx->db->delete($tbl_documentgroup_names, "id='{$group}'");
@@ -75,33 +75,33 @@  discard block
 block discarded – undo
75 75
 	break;
76 76
 	case "rename_user_group" :
77 77
 		$newgroupname = $_REQUEST['newgroupname'];
78
-		if(empty($newgroupname)) {
78
+		if (empty($newgroupname)) {
79 79
 			$modx->webAlertAndQuit("No group name specified.");
80 80
 		}
81
-		$groupid = (int)$_REQUEST['groupid'];
82
-		if(empty($groupid)) {
81
+		$groupid = (int) $_REQUEST['groupid'];
82
+		if (empty($groupid)) {
83 83
 			$modx->webAlertAndQuit("No user group id specified for rename.");
84 84
 		}
85 85
 		$modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'");
86 86
 	break;
87 87
 	case "rename_document_group" :
88 88
 		$newgroupname = $_REQUEST['newgroupname'];
89
-		if(empty($newgroupname)) {
89
+		if (empty($newgroupname)) {
90 90
 			$modx->webAlertAndQuit("No group name specified.");
91 91
 		}
92
-		$groupid = (int)$_REQUEST['groupid'];
93
-		if(empty($groupid)) {
92
+		$groupid = (int) $_REQUEST['groupid'];
93
+		if (empty($groupid)) {
94 94
 			$modx->webAlertAndQuit("No document group id specified for rename.");
95 95
 		}
96 96
 		$modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'");
97 97
 	break;
98 98
 	case "add_document_group_to_user_group" :
99 99
 		$updategroupaccess = true;
100
-		$usergroup = (int)$_REQUEST['usergroup'];
101
-		$docgroup = (int)$_REQUEST['docgroup'];
100
+		$usergroup = (int) $_REQUEST['usergroup'];
101
+		$docgroup = (int) $_REQUEST['docgroup'];
102 102
 		$rs = $modx->db->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'");
103 103
 		$limit = $modx->db->getValue($rs);
104
-		if($limit<=0) {
104
+		if ($limit <= 0) {
105 105
 			$modx->db->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access);
106 106
 		} else {
107 107
 			//alert user that coupling already exists?
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	break;
110 110
 	case "remove_document_group_from_user_group" :
111 111
 		$updategroupaccess = true;
112
-		$coupling = (int)$_REQUEST['coupling'];
112
+		$coupling = (int) $_REQUEST['coupling'];
113 113
 		$modx->db->delete($tbl_webgroup_access, "id='{$coupling}'");
114 114
 	break;
115 115
 	default :
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 }
118 118
 
119 119
 // secure web documents - flag as private
120
-if($updategroupaccess==true){
120
+if ($updategroupaccess == true) {
121 121
 	include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122 122
 	secureWebDocument();
123 123
 
Please login to merge, or discard this patch.
manager/processors/save_role.processor.php 2 patches
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -1,135 +1,135 @@
 block discarded – undo
1 1
 <?php
2 2
 if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('save_role')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 extract($_POST);
10 10
 
11 11
 if($name == '' || !isset ($name)) {
12
-	$modx->webAlertAndQuit("Please enter a name for this role!", "index.php?a={$mode}" . ($mode = 35 ? "&id={$id}" : ""));
12
+    $modx->webAlertAndQuit("Please enter a name for this role!", "index.php?a={$mode}" . ($mode = 35 ? "&id={$id}" : ""));
13 13
 }
14 14
 
15 15
 // setup fields
16 16
 $fields = array(
17
-	'name' => $name,
18
-	'description' => $description,
19
-	'frames' => $frames,
20
-	'home' => $home,
21
-	'view_document' => $view_document,
22
-	'new_document' => $new_document,
23
-	'save_document' => $save_document,
24
-	'publish_document' => $publish_document,
25
-	'delete_document' => $delete_document,
26
-	'empty_trash' => $empty_trash,
27
-	'action_ok' => $action_ok,
28
-	'logout' => $logout,
29
-	'help' => $help,
30
-	'messages' => $messages,
31
-	'new_user' => $new_user,
32
-	'edit_user' => $edit_user,
33
-	'logs' => $logs,
34
-	'edit_parser' => (isset ($edit_parser)) ? $edit_parser : '0',
35
-	'save_parser' => (isset ($save_parser)) ? $save_parser : '0',
36
-	'edit_template' => $edit_template,
37
-	'settings' => $settings,
38
-	'credits' => $credits,
39
-	'new_template' => $new_template,
40
-	'save_template' => $save_template,
41
-	'delete_template' => $delete_template,
42
-	'edit_snippet' => $edit_snippet,
43
-	'new_snippet' => $new_snippet,
44
-	'save_snippet' => $save_snippet,
45
-	'delete_snippet' => $delete_snippet,
46
-	'edit_chunk' => $edit_chunk,
47
-	'new_chunk' => $new_chunk,
48
-	'save_chunk' => $save_chunk,
49
-	'delete_chunk' => $delete_chunk,
50
-	'empty_cache' => $empty_cache,
51
-	'edit_document' => $edit_document,
52
-	'change_password' => $change_password,
53
-	'error_dialog' => $error_dialog,
54
-	'about' => $about,
55
-	'file_manager' => $file_manager,
56
-	'assets_files' => $assets_files,
57
-	'assets_images' => $assets_images,
58
-	'save_user' => $save_user,
59
-	'delete_user' => $delete_user,
60
-	'save_password' => $save_password,
61
-	'edit_role' => $edit_role,
62
-	'save_role' => $save_role,
63
-	'delete_role' => $delete_role,
64
-	'new_role' => $new_role,
65
-	'access_permissions' => $access_permissions,
66
-	'bk_manager' => $bk_manager,
67
-	'new_plugin' => $new_plugin,
68
-	'edit_plugin' => $edit_plugin,
69
-	'save_plugin' => $save_plugin,
70
-	'delete_plugin' => $delete_plugin,
71
-	'new_module' => $new_module,
72
-	'edit_module' => $edit_module,
73
-	'save_module' => $save_module,
74
-	'delete_module' => $delete_module,
75
-	'exec_module' => $exec_module,
76
-	'view_eventlog' => $view_eventlog,
77
-	'delete_eventlog' => $delete_eventlog,
78
-	'new_web_user' => $new_web_user,
79
-	'edit_web_user' => $edit_web_user,
80
-	'save_web_user' => $save_web_user,
81
-	'delete_web_user' => $delete_web_user,
82
-	'web_access_permissions' => $web_access_permissions,
83
-	'view_unpublished' => $view_unpublished,
84
-	'import_static' => $import_static,
85
-	'export_static' => $export_static,
86
-	'remove_locks' => $remove_locks,
87
-	'display_locks' => $display_locks,
88
-	'change_resourcetype' => $change_resourcetype,
89
-	'category_manager' => $category_manager
17
+    'name' => $name,
18
+    'description' => $description,
19
+    'frames' => $frames,
20
+    'home' => $home,
21
+    'view_document' => $view_document,
22
+    'new_document' => $new_document,
23
+    'save_document' => $save_document,
24
+    'publish_document' => $publish_document,
25
+    'delete_document' => $delete_document,
26
+    'empty_trash' => $empty_trash,
27
+    'action_ok' => $action_ok,
28
+    'logout' => $logout,
29
+    'help' => $help,
30
+    'messages' => $messages,
31
+    'new_user' => $new_user,
32
+    'edit_user' => $edit_user,
33
+    'logs' => $logs,
34
+    'edit_parser' => (isset ($edit_parser)) ? $edit_parser : '0',
35
+    'save_parser' => (isset ($save_parser)) ? $save_parser : '0',
36
+    'edit_template' => $edit_template,
37
+    'settings' => $settings,
38
+    'credits' => $credits,
39
+    'new_template' => $new_template,
40
+    'save_template' => $save_template,
41
+    'delete_template' => $delete_template,
42
+    'edit_snippet' => $edit_snippet,
43
+    'new_snippet' => $new_snippet,
44
+    'save_snippet' => $save_snippet,
45
+    'delete_snippet' => $delete_snippet,
46
+    'edit_chunk' => $edit_chunk,
47
+    'new_chunk' => $new_chunk,
48
+    'save_chunk' => $save_chunk,
49
+    'delete_chunk' => $delete_chunk,
50
+    'empty_cache' => $empty_cache,
51
+    'edit_document' => $edit_document,
52
+    'change_password' => $change_password,
53
+    'error_dialog' => $error_dialog,
54
+    'about' => $about,
55
+    'file_manager' => $file_manager,
56
+    'assets_files' => $assets_files,
57
+    'assets_images' => $assets_images,
58
+    'save_user' => $save_user,
59
+    'delete_user' => $delete_user,
60
+    'save_password' => $save_password,
61
+    'edit_role' => $edit_role,
62
+    'save_role' => $save_role,
63
+    'delete_role' => $delete_role,
64
+    'new_role' => $new_role,
65
+    'access_permissions' => $access_permissions,
66
+    'bk_manager' => $bk_manager,
67
+    'new_plugin' => $new_plugin,
68
+    'edit_plugin' => $edit_plugin,
69
+    'save_plugin' => $save_plugin,
70
+    'delete_plugin' => $delete_plugin,
71
+    'new_module' => $new_module,
72
+    'edit_module' => $edit_module,
73
+    'save_module' => $save_module,
74
+    'delete_module' => $delete_module,
75
+    'exec_module' => $exec_module,
76
+    'view_eventlog' => $view_eventlog,
77
+    'delete_eventlog' => $delete_eventlog,
78
+    'new_web_user' => $new_web_user,
79
+    'edit_web_user' => $edit_web_user,
80
+    'save_web_user' => $save_web_user,
81
+    'delete_web_user' => $delete_web_user,
82
+    'web_access_permissions' => $web_access_permissions,
83
+    'view_unpublished' => $view_unpublished,
84
+    'import_static' => $import_static,
85
+    'export_static' => $export_static,
86
+    'remove_locks' => $remove_locks,
87
+    'display_locks' => $display_locks,
88
+    'change_resourcetype' => $change_resourcetype,
89
+    'category_manager' => $category_manager
90 90
 );
91 91
 
92 92
 $fields = $modx->db->escape($fields);
93 93
 
94 94
 switch($_POST['mode']) {
95
-	case '38' :
96
-		$tbl = $modx->getFullTableName("user_roles");
95
+    case '38' :
96
+        $tbl = $modx->getFullTableName("user_roles");
97 97
 
98
-		// disallow duplicate names for role
99
-		$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}'");
100
-		if($modx->db->getValue($rs) > 0) {
101
-			$modx->manager->saveFormValues(38);
102
-			$modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=38");
103
-		}
98
+        // disallow duplicate names for role
99
+        $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}'");
100
+        if($modx->db->getValue($rs) > 0) {
101
+            $modx->manager->saveFormValues(38);
102
+            $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=38");
103
+        }
104 104
 
105
-		$modx->db->insert($fields, $tbl);
105
+        $modx->db->insert($fields, $tbl);
106 106
 
107
-		// Set the item name for logger
108
-		$_SESSION['itemname'] = $_POST['name'];
107
+        // Set the item name for logger
108
+        $_SESSION['itemname'] = $_POST['name'];
109 109
 
110
-		$header = "Location: index.php?a=86&r=2";
111
-		header($header);
112
-		break;
113
-	case '35' :
114
-		$tbl = $modx->getFullTableName("user_roles");
110
+        $header = "Location: index.php?a=86&r=2";
111
+        header($header);
112
+        break;
113
+    case '35' :
114
+        $tbl = $modx->getFullTableName("user_roles");
115 115
 
116
-		// disallow duplicate names for role
117
-		$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}' AND id!='{$id}'");
118
-		if($modx->db->getValue($rs) > 0) {
119
-			$modx->manager->saveFormValues(35);
120
-			$modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=35&id={$id}");
121
-		}
116
+        // disallow duplicate names for role
117
+        $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}' AND id!='{$id}'");
118
+        if($modx->db->getValue($rs) > 0) {
119
+            $modx->manager->saveFormValues(35);
120
+            $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=35&id={$id}");
121
+        }
122 122
 
123
-		$modx->db->update($fields, $tbl, "id='{$id}'");
123
+        $modx->db->update($fields, $tbl, "id='{$id}'");
124 124
 
125
-		// Set the item name for logger
126
-		$_SESSION['itemname'] = $_POST['name'];
125
+        // Set the item name for logger
126
+        $_SESSION['itemname'] = $_POST['name'];
127 127
 
128
-		$header = "Location: index.php?a=86&r=2";
129
-		header($header);
130
-		break;
131
-	default :
132
-		$modx->webAlertAndQuit("No operation set in request.");
128
+        $header = "Location: index.php?a=86&r=2";
129
+        header($header);
130
+        break;
131
+    default :
132
+        $modx->webAlertAndQuit("No operation set in request.");
133 133
 }
134 134
 
135 135
 $modx->unlockElement(8, $id);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('save_role')) {
5
+if (!$modx->hasPermission('save_role')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 extract($_POST);
10 10
 
11
-if($name == '' || !isset ($name)) {
12
-	$modx->webAlertAndQuit("Please enter a name for this role!", "index.php?a={$mode}" . ($mode = 35 ? "&id={$id}" : ""));
11
+if ($name == '' || !isset ($name)) {
12
+	$modx->webAlertAndQuit("Please enter a name for this role!", "index.php?a={$mode}".($mode = 35 ? "&id={$id}" : ""));
13 13
 }
14 14
 
15 15
 // setup fields
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
 
92 92
 $fields = $modx->db->escape($fields);
93 93
 
94
-switch($_POST['mode']) {
94
+switch ($_POST['mode']) {
95 95
 	case '38' :
96 96
 		$tbl = $modx->getFullTableName("user_roles");
97 97
 
98 98
 		// disallow duplicate names for role
99 99
 		$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}'");
100
-		if($modx->db->getValue($rs) > 0) {
100
+		if ($modx->db->getValue($rs) > 0) {
101 101
 			$modx->manager->saveFormValues(38);
102 102
 			$modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=38");
103 103
 		}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 		// disallow duplicate names for role
117 117
 		$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_roles'), "name='{$fields['name']}' AND id!='{$id}'");
118
-		if($modx->db->getValue($rs) > 0) {
118
+		if ($modx->db->getValue($rs) > 0) {
119 119
 			$modx->manager->saveFormValues(35);
120 120
 			$modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['role'], $name), "index.php?a=35&id={$id}");
121 121
 		}
Please login to merge, or discard this patch.
manager/processors/duplicate_snippet.processor.php 3 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@
 block discarded – undo
14 14
 // count duplicates
15 15
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_snippets'), "id='{$id}'"));
16 16
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_snippets'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
18
-else $count = '';
17
+if($count>=1) {
18
+    $count = ' '.($count+1);
19
+} else {
20
+    $count = '';
21
+}
19 22
 
20 23
 // duplicate Snippet
21 24
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('new_snippet')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10 10
 if($id==0) {
11
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
11
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // count duplicates
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 
20 20
 // duplicate Snippet
21 21
 $newid = $modx->db->insert(
22
-	array(
23
-		'name'=>'',
24
-		'description'=>'',
25
-		'snippet'=>'',
26
-		'properties'=>'',
27
-		'category'=>'',
28
-		), $modx->getFullTableName('site_snippets'), // Insert into
29
-	"CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, snippet, properties, category", $modx->getFullTableName('site_snippets'), "id='{$id}'"); // Copy from
22
+    array(
23
+        'name'=>'',
24
+        'description'=>'',
25
+        'snippet'=>'',
26
+        'properties'=>'',
27
+        'category'=>'',
28
+        ), $modx->getFullTableName('site_snippets'), // Insert into
29
+    "CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, snippet, properties, category", $modx->getFullTableName('site_snippets'), "id='{$id}'"); // Copy from
30 30
 
31 31
 // Set the item name for logger
32 32
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_snippets'), "id='{$newid}'"));
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('new_snippet')) {
5
+if (!$modx->hasPermission('new_snippet')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10
-if($id==0) {
9
+$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
10
+if ($id == 0) {
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // count duplicates
15 15
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_snippets'), "id='{$id}'"));
16 16
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_snippets'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
17
+if ($count >= 1) $count = ' '.($count + 1);
18 18
 else $count = '';
19 19
 
20 20
 // duplicate Snippet
@@ -33,5 +33,5 @@  discard block
 block discarded – undo
33 33
 $_SESSION['itemname'] = $name;
34 34
 
35 35
 // finish duplicating - redirect to new snippet
36
-$header="Location: index.php?r=2&a=22&id=$newid";
36
+$header = "Location: index.php?r=2&a=22&id=$newid";
37 37
 header($header);
Please login to merge, or discard this patch.
manager/processors/purge_plugin.processor.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!$modx->hasPermission('delete_plugin')) {
7
-	$e->setError(3);
8
-	$e->dumpError();
7
+    $e->setError(3);
8
+    $e->dumpError();
9 9
 }
10 10
 
11 11
 $tbl_site_plugins = $modx->getFullTablename('site_plugins');
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     exit();
4 4
 }
5 5
 
6
-if(!$modx->hasPermission('delete_plugin')) {
6
+if (!$modx->hasPermission('delete_plugin')) {
7 7
 	$e->setError(3);
8 8
 	$e->dumpError();
9 9
 }
@@ -14,18 +14,18 @@  discard block
 block discarded – undo
14 14
 // Get unique list of latest added plugins by highest sql-id
15 15
 $rs = $modx->db->query("SELECT t1.id FROM {$tbl_site_plugins} t1 LEFT JOIN {$tbl_site_plugins} t2 ON (t1.name = t2.name AND t1.id < t2.id) WHERE t2.id IS NULL;");
16 16
 $latestIds = array();
17
-while($row = $modx->db->getRow($rs)) {
17
+while ($row = $modx->db->getRow($rs)) {
18 18
     $latestIds[] = $row['id'];
19 19
 }
20 20
 
21 21
 // Get list of plugins with disabled and enabled versions
22 22
 $rs = $modx->db->query("SELECT id FROM {$tbl_site_plugins} t1 WHERE disabled = 1 AND name IN (SELECT name FROM {$tbl_site_plugins} t2 WHERE t1.name = t2.name AND t1.id != t2.id)");
23 23
 
24
-while($row = $modx->db->getRow($rs)) {
24
+while ($row = $modx->db->getRow($rs)) {
25 25
 
26 26
     $id = $row['id'];
27 27
 
28
-    if(in_array($id,$latestIds)) continue;	// Keep latest version of disabled plugins
28
+    if (in_array($id, $latestIds)) continue; // Keep latest version of disabled plugins
29 29
 
30 30
     // invoke OnBeforePluginFormDelete event
31 31
     $modx->invokeEvent('OnBeforePluginFormDelete', array('id'=> $id));
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,10 @@
 block discarded – undo
25 25
 
26 26
     $id = $row['id'];
27 27
 
28
-    if(in_array($id,$latestIds)) continue;	// Keep latest version of disabled plugins
28
+    if(in_array($id,$latestIds)) {
29
+        continue;
30
+    }
31
+    // Keep latest version of disabled plugins
29 32
 
30 33
     // invoke OnBeforePluginFormDelete event
31 34
     $modx->invokeEvent('OnBeforePluginFormDelete', array('id'=> $id));
Please login to merge, or discard this patch.
manager/processors/delete_role.processor.php 3 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14
-if($id==1){
14
+if($id==1) {
15 15
 	$modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
16 16
 }
17 17
 
18 18
 $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'");
19 19
 $count=$modx->db->getValue($rs);
20
-if($count>0){
20
+if($count>0) {
21 21
 	$modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
22 22
 }
23 23
 
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,22 +3,22 @@
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('delete_role')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10 10
 if($id==0) {
11
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
11
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 if($id==1){
15
-	$modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
15
+    $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
16 16
 }
17 17
 
18 18
 $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'");
19 19
 $count=$modx->db->getValue($rs);
20 20
 if($count>0){
21
-	$modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
21
+    $modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
22 22
 }
23 23
 
24 24
 // Set the item name for logger
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('delete_role')) {
5
+if (!$modx->hasPermission('delete_role')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10
-if($id==0) {
9
+$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
10
+if ($id == 0) {
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14
-if($id==1){
14
+if ($id == 1) {
15 15
 	$modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
16 16
 }
17 17
 
18 18
 $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'");
19
-$count=$modx->db->getValue($rs);
20
-if($count>0){
19
+$count = $modx->db->getValue($rs);
20
+if ($count > 0) {
21 21
 	$modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
22 22
 }
23 23
 
@@ -28,5 +28,5 @@  discard block
 block discarded – undo
28 28
 // delete the attributes
29 29
 $modx->db->delete($modx->getFullTableName('user_roles'), "id='{$id}'");
30 30
 
31
-$header="Location: index.php?a=86";
31
+$header = "Location: index.php?a=86";
32 32
 header($header);
Please login to merge, or discard this patch.
manager/processors/duplicate_htmlsnippet.processor.php 3 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@
 block discarded – undo
14 14
 // count duplicates
15 15
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_htmlsnippets'), "id='{$id}'"));
16 16
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_htmlsnippets'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
18
-else $count = '';
17
+if($count>=1) {
18
+    $count = ' '.($count+1);
19
+} else {
20
+    $count = '';
21
+}
19 22
 
20 23
 // duplicate htmlsnippet
21 24
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('new_chunk')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10 10
 if($id==0) {
11
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
11
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // count duplicates
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 
20 20
 // duplicate htmlsnippet
21 21
 $newid = $modx->db->insert(
22
-	array(
23
-		'name'=>'',
24
-		'description'=>'',
25
-		'snippet'=>'',
26
-		'category'=>'',
27
-		), $modx->getFullTableName('site_htmlsnippets'), // Insert into
28
-	"CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, snippet, category", $modx->getFullTableName('site_htmlsnippets'), "id='{$id}'"); // Copy from
22
+    array(
23
+        'name'=>'',
24
+        'description'=>'',
25
+        'snippet'=>'',
26
+        'category'=>'',
27
+        ), $modx->getFullTableName('site_htmlsnippets'), // Insert into
28
+    "CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, snippet, category", $modx->getFullTableName('site_htmlsnippets'), "id='{$id}'"); // Copy from
29 29
 
30 30
 // Set the item name for logger
31 31
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_htmlsnippets'), "id='{$newid}'"));
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('new_chunk')) {
5
+if (!$modx->hasPermission('new_chunk')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10
-if($id==0) {
9
+$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
10
+if ($id == 0) {
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // count duplicates
15 15
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_htmlsnippets'), "id='{$id}'"));
16 16
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_htmlsnippets'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
17
+if ($count >= 1) $count = ' '.($count + 1);
18 18
 else $count = '';
19 19
 
20 20
 // duplicate htmlsnippet
@@ -32,5 +32,5 @@  discard block
 block discarded – undo
32 32
 $_SESSION['itemname'] = $name;
33 33
 
34 34
 // finish duplicating - redirect to new chunk
35
-$header="Location: index.php?r=2&a=78&id=$newid";
35
+$header = "Location: index.php?r=2&a=78&id=$newid";
36 36
 header($header);
Please login to merge, or discard this patch.
manager/processors/remove_content.processor.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('delete_document')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "deleted=1");
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 
12 12
 // invoke OnBeforeEmptyTrash event
13 13
 $modx->invokeEvent("OnBeforeEmptyTrash",
14
-						array(
15
-							"ids"=>$ids
16
-						));
14
+                        array(
15
+                            "ids"=>$ids
16
+                        ));
17 17
 
18 18
 // remove the document groups link.
19 19
 $sql = "DELETE document_groups
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 //'undelete' the document.
33 33
 $modx->db->delete($modx->getFullTableName('site_content'), "deleted=1");
34 34
 
35
-	// invoke OnEmptyTrash event
36
-	$modx->invokeEvent("OnEmptyTrash",
37
-						array(
38
-							"ids"=>$ids
39
-						));
35
+    // invoke OnEmptyTrash event
36
+    $modx->invokeEvent("OnEmptyTrash",
37
+                        array(
38
+                            "ids"=>$ids
39
+                        ));
40 40
 
41
-	// empty cache
42
-	$modx->clearCache('full');
41
+    // empty cache
42
+    $modx->clearCache('full');
43 43
 
44
-	// finished emptying cache - redirect
45
-	$header="Location: index.php?a=2&r=1";
46
-	header($header);
44
+    // finished emptying cache - redirect
45
+    $header="Location: index.php?a=2&r=1";
46
+    header($header);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('delete_document')) {
5
+if (!$modx->hasPermission('delete_document')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -42,5 +42,5 @@  discard block
 block discarded – undo
42 42
 	$modx->clearCache('full');
43 43
 
44 44
 	// finished emptying cache - redirect
45
-	$header="Location: index.php?a=2&r=1";
45
+	$header = "Location: index.php?a=2&r=1";
46 46
 	header($header);
Please login to merge, or discard this patch.
manager/processors/save_password.processor.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('save_password')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = $_POST['id'];
@@ -11,26 +11,26 @@  discard block
 block discarded – undo
11 11
 $pass2 = $_POST['pass2'];
12 12
 
13 13
 if($pass1!=$pass2){
14
-	$modx->webAlertAndQuit("Passwords don't match!");
14
+    $modx->webAlertAndQuit("Passwords don't match!");
15 15
 }
16 16
 
17 17
 if(strlen($pass1)<6){
18
-	$modx->webAlertAndQuit("Password is too short. Please specify a password of at least 6 characters.");
18
+    $modx->webAlertAndQuit("Password is too short. Please specify a password of at least 6 characters.");
19 19
 }
20 20
 
21 21
     $pass1 = $modx->htmlspecialchars($pass1, ENT_NOQUOTES);
22
-	$tbl_manager_users = $modx->getFullTableName('manager_users');
23
-	$uid = $modx->getLoginUserID();
24
-	$modx->loadExtension('phpass');
25
-	$f['password'] = $modx->phpass->HashPassword($pass1);
26
-	$modx->db->update($f,$tbl_manager_users,"id='{$uid}'");
22
+    $tbl_manager_users = $modx->getFullTableName('manager_users');
23
+    $uid = $modx->getLoginUserID();
24
+    $modx->loadExtension('phpass');
25
+    $f['password'] = $modx->phpass->HashPassword($pass1);
26
+    $modx->db->update($f,$tbl_manager_users,"id='{$uid}'");
27 27
 
28
-	// invoke OnManagerChangePassword event
29
-	$modx->invokeEvent('OnManagerChangePassword', array (
30
-		'userid' => $uid,
31
-		'username' => $_SESSION['mgrShortname'],
32
-		'userpassword' => $pass1
33
-	));
28
+    // invoke OnManagerChangePassword event
29
+    $modx->invokeEvent('OnManagerChangePassword', array (
30
+        'userid' => $uid,
31
+        'username' => $_SESSION['mgrShortname'],
32
+        'userpassword' => $pass1
33
+    ));
34 34
 
35 35
 $header="Location: index.php?a=2";
36 36
 header($header);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('save_password')) {
5
+if (!$modx->hasPermission('save_password')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 $pass1 = $_POST['pass1'];
11 11
 $pass2 = $_POST['pass2'];
12 12
 
13
-if($pass1!=$pass2){
13
+if ($pass1 != $pass2) {
14 14
 	$modx->webAlertAndQuit("Passwords don't match!");
15 15
 }
16 16
 
17
-if(strlen($pass1)<6){
17
+if (strlen($pass1) < 6) {
18 18
 	$modx->webAlertAndQuit("Password is too short. Please specify a password of at least 6 characters.");
19 19
 }
20 20
 
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 	$uid = $modx->getLoginUserID();
24 24
 	$modx->loadExtension('phpass');
25 25
 	$f['password'] = $modx->phpass->HashPassword($pass1);
26
-	$modx->db->update($f,$tbl_manager_users,"id='{$uid}'");
26
+	$modx->db->update($f, $tbl_manager_users, "id='{$uid}'");
27 27
 
28 28
 	// invoke OnManagerChangePassword event
29
-	$modx->invokeEvent('OnManagerChangePassword', array (
29
+	$modx->invokeEvent('OnManagerChangePassword', array(
30 30
 		'userid' => $uid,
31 31
 		'username' => $_SESSION['mgrShortname'],
32 32
 		'userpassword' => $pass1
33 33
 	));
34 34
 
35
-$header="Location: index.php?a=2";
35
+$header = "Location: index.php?a=2";
36 36
 header($header);
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
 $pass1 = $_POST['pass1'];
11 11
 $pass2 = $_POST['pass2'];
12 12
 
13
-if($pass1!=$pass2){
13
+if($pass1!=$pass2) {
14 14
 	$modx->webAlertAndQuit("Passwords don't match!");
15 15
 }
16 16
 
17
-if(strlen($pass1)<6){
17
+if(strlen($pass1)<6) {
18 18
 	$modx->webAlertAndQuit("Password is too short. Please specify a password of at least 6 characters.");
19 19
 }
20 20
 
Please login to merge, or discard this patch.