Completed
Push — develop ( b2c942...8bfc17 )
by Serg
05:46
created
manager/processors/optimize_table.processor.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -3,33 +3,33 @@
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 if (isset($_REQUEST['t'])) {
10 10
 
11
-	if (empty($_REQUEST['t'])) {
12
-		$modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
13
-	}
11
+    if (empty($_REQUEST['t'])) {
12
+        $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
13
+    }
14 14
 
15
-	// Set the item name for logger
16
-	$_SESSION['itemname'] = $_REQUEST['t'];
15
+    // Set the item name for logger
16
+    $_SESSION['itemname'] = $_REQUEST['t'];
17 17
 
18
-	$modx->db->optimize($_REQUEST['t']);
18
+    $modx->db->optimize($_REQUEST['t']);
19 19
 
20 20
 } elseif (isset($_REQUEST['u'])) {
21 21
 
22
-	if (empty($_REQUEST['u'])) {
23
-		$modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]);
24
-	}
22
+    if (empty($_REQUEST['u'])) {
23
+        $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]);
24
+    }
25 25
 
26
-	// Set the item name for logger
27
-	$_SESSION['itemname'] = $_REQUEST['u'];
26
+    // Set the item name for logger
27
+    $_SESSION['itemname'] = $_REQUEST['u'];
28 28
 
29
-	$modx->db->truncate($_REQUEST['u']);
29
+    $modx->db->truncate($_REQUEST['u']);
30 30
 
31 31
 } else {
32
-	$modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
32
+    $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
33 33
 }
34 34
 
35 35
 $mode = (int)$_REQUEST['mode'];
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) {
5
+if (!($modx->hasPermission('settings') && ($modx->hasPermission('logs') || $modx->hasPermission('bk_manager')))) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -32,6 +32,6 @@  discard block
 block discarded – undo
32 32
 	$modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
33 33
 }
34 34
 
35
-$mode = (int)$_REQUEST['mode'];
36
-$header="Location: index.php?a={$mode}&s=4";
35
+$mode = (int) $_REQUEST['mode'];
36
+$header = "Location: index.php?a={$mode}&s=4";
37 37
 header($header);
Please login to merge, or discard this patch.
manager/processors/save_htmlsnippet.processor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('save_chunk')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = (int)$_POST['id'];
9
+$id = (int) $_POST['id'];
10 10
 $snippet = $modx->db->escape($_POST['post']);
11 11
 $name = $modx->db->escape(trim($_POST['name']));
12 12
 $description = $modx->db->escape($_POST['description']);
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 
17 17
 //Kyle Jaebker - added category support
18 18
 if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) {
19
-    $categoryid = (int)$_POST['categoryid'];
19
+    $categoryid = (int) $_POST['categoryid'];
20 20
 } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) {
21 21
     $categoryid = 0;
22 22
 } else {
23
-    include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
23
+    include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
24 24
     $categoryid = checkCategory($_POST['newcategory']);
25 25
     if (!$categoryid) {
26 26
         $categoryid = newCategory($_POST['newcategory']);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // finished emptying cache - redirect
81 81
         if ($_POST['stay'] != '') {
82 82
             $a = ($_POST['stay'] == '2') ? "78&id=$newid" : "77";
83
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'];
83
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay'];
84 84
             header($header);
85 85
         } else {
86 86
             $header = "Location: index.php?a=76&r=2";
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         // finished emptying cache - redirect
130 130
         if ($_POST['stay'] != '') {
131 131
             $a = ($_POST['stay'] == '2') ? "78&id=$id" : "77";
132
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'];
132
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay'];
133 133
             header($header);
134 134
         } else {
135 135
             $modx->unlockElement(3, $id);
Please login to merge, or discard this patch.
manager/processors/delete_tmplvars.processor.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('delete_template')) {
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
 $forced = isset($_GET['force']) ? $_GET['force'] : 0;
15 15
 
16 16
 // check for relations
17 17
 if(!$forced) {
18
-	$drs = $modx->db->select('sc.id, sc.pagetitle,sc.description', $modx->getFullTableName('site_content') . " AS sc
18
+    $drs = $modx->db->select('sc.id, sc.pagetitle,sc.description', $modx->getFullTableName('site_content') . " AS sc
19 19
 			INNER JOIN " . $modx->getFullTableName('site_tmplvar_contentvalues') . " AS stcv ON stcv.contentid=sc.id", "stcv.tmplvarid='{$id}'");
20
-	$count = $modx->db->getRecordCount($drs);
21
-	if($count > 0) {
22
-		include_once "header.inc.php";
23
-		?>
20
+    $count = $modx->db->getRecordCount($drs);
21
+    if($count > 0) {
22
+        include_once "header.inc.php";
23
+        ?>
24 24
 		<script>
25 25
 			var actions = {
26 26
 				delete: function() {
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
 				<p><?= $_lang['tmplvar_inuse'] ?></p>
43 43
 				<ul>
44 44
 					<?php
45
-					while($row = $modx->db->getRow($drs)) {
46
-						echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['description'] != '' ? ' - ' . $row['description'] : '') . '</li>';
47
-					}
48
-					?>
45
+                    while($row = $modx->db->getRow($drs)) {
46
+                        echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['description'] != '' ? ' - ' . $row['description'] : '') . '</li>';
47
+                    }
48
+                    ?>
49 49
 				</ul>
50 50
 			</div>
51 51
 		</div>
52 52
 		<?php
53
-		include_once "footer.inc.php";
54
-		exit;
55
-	}
53
+        include_once "footer.inc.php";
54
+        exit;
55
+    }
56 56
 }
57 57
 
58 58
 // Set the item name for logger
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 // invoke OnBeforeTVFormDelete event
63 63
 $modx->invokeEvent("OnBeforeTVFormDelete", array(
64
-	"id" => $id
64
+    "id" => $id
65 65
 ));
66 66
 
67 67
 // delete variable
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 // invoke OnTVFormDelete event
80 80
 $modx->invokeEvent("OnTVFormDelete", array(
81
-	"id" => $id
81
+    "id" => $id
82 82
 ));
83 83
 
84 84
 // empty cache
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@  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_template')) {
5
+if (!$modx->hasPermission('delete_template')) {
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
 $forced = isset($_GET['force']) ? $_GET['force'] : 0;
15 15
 
16 16
 // check for relations
17
-if(!$forced) {
18
-	$drs = $modx->db->select('sc.id, sc.pagetitle,sc.description', $modx->getFullTableName('site_content') . " AS sc
19
-			INNER JOIN " . $modx->getFullTableName('site_tmplvar_contentvalues') . " AS stcv ON stcv.contentid=sc.id", "stcv.tmplvarid='{$id}'");
17
+if (!$forced) {
18
+	$drs = $modx->db->select('sc.id, sc.pagetitle,sc.description', $modx->getFullTableName('site_content')." AS sc
19
+			INNER JOIN " . $modx->getFullTableName('site_tmplvar_contentvalues')." AS stcv ON stcv.contentid=sc.id", "stcv.tmplvarid='{$id}'");
20 20
 	$count = $modx->db->getRecordCount($drs);
21
-	if($count > 0) {
21
+	if ($count > 0) {
22 22
 		include_once "header.inc.php";
23 23
 		?>
24 24
 		<script>
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 				<p><?= $_lang['tmplvar_inuse'] ?></p>
43 43
 				<ul>
44 44
 					<?php
45
-					while($row = $modx->db->getRow($drs)) {
46
-						echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['description'] != '' ? ' - ' . $row['description'] : '') . '</li>';
45
+					while ($row = $modx->db->getRow($drs)) {
46
+						echo '<li><span style="width: 200px"><a href="index.php?id='.$row['id'].'&a=27">'.$row['pagetitle'].'</a></span>'.($row['description'] != '' ? ' - '.$row['description'] : '').'</li>';
47 47
 					}
48 48
 					?>
49 49
 				</ul>
Please login to merge, or discard this patch.
manager/processors/publish_content.processor.php 2 patches
Indentation   +12 added lines, -12 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('save_document')||!$modx->hasPermission('publish_document')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_REQUEST['id'])? (int)$_REQUEST['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
 /************webber ********/
@@ -33,20 +33,20 @@  discard block
 block discarded – undo
33 33
 $udperms->role = $_SESSION['mgrRole'];
34 34
 
35 35
 if(!$udperms->checkPermissions()) {
36
-	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
36
+    $modx->webAlertAndQuit($_lang["access_permission_denied"]);
37 37
 }
38 38
 
39 39
 // update the document
40 40
 $modx->db->update(
41
-	array(
42
-		'published'   => 1,
43
-		'pub_date'    => 0,
44
-		'unpub_date'  => 0,
45
-		'editedby'    => $modx->getLoginUserID(),
46
-		'editedon'    => time(),
47
-		'publishedby' => $modx->getLoginUserID(),
48
-		'publishedon' => time(),
49
-	), $modx->getFullTableName('site_content'), "id='{$id}'");
41
+    array(
42
+        'published'   => 1,
43
+        'pub_date'    => 0,
44
+        'unpub_date'  => 0,
45
+        'editedby'    => $modx->getLoginUserID(),
46
+        'editedon'    => time(),
47
+        'publishedby' => $modx->getLoginUserID(),
48
+        'publishedon' => time(),
49
+    ), $modx->getFullTableName('site_content'), "id='{$id}'");
50 50
 
51 51
 // invoke OnDocPublished  event
52 52
 $modx->invokeEvent("OnDocPublished",array("docid"=>$id));
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,25 +1,25 @@  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_document')||!$modx->hasPermission('publish_document')) {
5
+if (!$modx->hasPermission('save_document') || !$modx->hasPermission('publish_document')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_REQUEST['id'])? (int)$_REQUEST['id'] : 0;
10
-if($id==0) {
9
+$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
10
+if ($id == 0) {
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 /************webber ********/
15
-$content=$modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'"));
16
-$pid=($content['parent']==0?$id:$content['parent']);
15
+$content = $modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'"));
16
+$pid = ($content['parent'] == 0 ? $id : $content['parent']);
17 17
 
18 18
 /************** webber *************/
19
-$sd=isset($_REQUEST['dir'])?'&dir='.$_REQUEST['dir']:'&dir=DESC';
20
-$sb=isset($_REQUEST['sort'])?'&sort='.$_REQUEST['sort']:'&sort=createdon';
21
-$pg=isset($_REQUEST['page'])?'&page='.(int)$_REQUEST['page']:'';
22
-$add_path=$sd.$sb.$pg;
19
+$sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC';
20
+$sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon';
21
+$pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : '';
22
+$add_path = $sd.$sb.$pg;
23 23
 
24 24
 /***********************************/
25 25
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $udperms->document = $id;
32 32
 $udperms->role = $_SESSION['mgrRole'];
33 33
 
34
-if(!$udperms->checkPermissions()) {
34
+if (!$udperms->checkPermissions()) {
35 35
 	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
36 36
 }
37 37
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	), $modx->getFullTableName('site_content'), "id='{$id}'");
49 49
 
50 50
 // invoke OnDocPublished  event
51
-$modx->invokeEvent("OnDocPublished",array("docid"=>$id));
51
+$modx->invokeEvent("OnDocPublished", array("docid"=>$id));
52 52
 
53 53
 // Set the item name for logger
54 54
 $_SESSION['itemname'] = $content['pagetitle'];
@@ -56,6 +56,6 @@  discard block
 block discarded – undo
56 56
 // empty cache
57 57
 $modx->clearCache('full');
58 58
 
59
-$header="Location: index.php?a=3&id=$pid&r=1".$add_path;
59
+$header = "Location: index.php?a=3&id=$pid&r=1".$add_path;
60 60
 
61 61
 header($header);
Please login to merge, or discard this patch.
manager/processors/delete_message.processor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('messages')) {
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
 
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
     $modx->webAlertAndQuit("Wrong number of messages returned!");
19 19
 }
20 20
 
21
-if ($message['recipient']!=$modx->getLoginUserID()) {
21
+if ($message['recipient'] != $modx->getLoginUserID()) {
22 22
     $modx->webAlertAndQuit("You are not allowed to delete this message!");
23 23
 }
24 24
 
25 25
 // delete message
26 26
 $modx->db->delete($modx->getFullTableName('user_messages'), "id='{$id}'");
27 27
 
28
-$header="Location: index.php?a=10";
28
+$header = "Location: index.php?a=10";
29 29
 header($header);
Please login to merge, or discard this patch.
manager/processors/delete_web_user.processor.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if(!$modx->hasPermission('delete_web_user')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10 10
 if($id==0) {
11
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
11
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14 14
 // Set the item name for logger
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 
18 18
 // invoke OnBeforeWUsrFormDelete event
19 19
 $modx->invokeEvent("OnBeforeWUsrFormDelete",
20
-	array(
21
-		"id"	=> $id
22
-	));
20
+    array(
21
+        "id"	=> $id
22
+    ));
23 23
 
24 24
 // delete the user.
25 25
 $modx->db->delete($modx->getFullTableName('web_users'), "id='{$id}'");
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
 
33 33
 // invoke OnWebDeleteUser event
34 34
 $modx->invokeEvent("OnWebDeleteUser",
35
-	array(
36
-		"userid"		=> $id,
37
-		"username"		=> $username
38
-	));
35
+    array(
36
+        "userid"		=> $id,
37
+        "username"		=> $username
38
+    ));
39 39
 
40 40
 // invoke OnWUsrFormDelete event
41 41
 $modx->invokeEvent("OnWUsrFormDelete",
42
-	array(
43
-		"id"	=> $id
44
-	));
42
+    array(
43
+        "id"	=> $id
44
+    ));
45 45
 
46 46
 $header="Location: index.php?a=99";
47 47
 header($header);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  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_web_user')) {
5
+if (!$modx->hasPermission('delete_web_user')) {
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
 
@@ -43,5 +43,5 @@  discard block
 block discarded – undo
43 43
 		"id"	=> $id
44 44
 	));
45 45
 
46
-$header="Location: index.php?a=99";
46
+$header = "Location: index.php?a=99";
47 47
 header($header);
Please login to merge, or discard this patch.
manager/processors/save_tmplvars.processor.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('save_template')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = (int)$_POST['id'];
9
+$id = (int) $_POST['id'];
10 10
 $name = $modx->db->escape(trim($_POST['name']));
11 11
 $description = $modx->db->escape($_POST['description']);
12 12
 $caption = $modx->db->escape($_POST['caption']);
@@ -17,17 +17,17 @@  discard block
 block discarded – undo
17 17
 $display = $modx->db->escape($_POST['display']);
18 18
 $params = $modx->db->escape($_POST['params']);
19 19
 $locked = $_POST['locked'] == 'on' ? 1 : 0;
20
-$origin = isset($_REQUEST['or']) ? (int)$_REQUEST['or'] : 76;
21
-$originId = isset($_REQUEST['oid']) ? (int)$_REQUEST['oid'] : null;
20
+$origin = isset($_REQUEST['or']) ? (int) $_REQUEST['or'] : 76;
21
+$originId = isset($_REQUEST['oid']) ? (int) $_REQUEST['oid'] : null;
22 22
 $currentdate = time() + $modx->config['server_offset_time'];
23 23
 
24 24
 //Kyle Jaebker - added category support
25 25
 if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) {
26
-    $categoryid = (int)$_POST['categoryid'];
26
+    $categoryid = (int) $_POST['categoryid'];
27 27
 } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) {
28 28
     $categoryid = 0;
29 29
 } else {
30
-    include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
30
+    include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
31 31
     $categoryid = checkCategory($_POST['newcategory']);
32 32
     if (!$categoryid) {
33 33
         $categoryid = newCategory($_POST['newcategory']);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         // finished emptying cache - redirect
100 100
         if ($_POST['stay'] != '') {
101 101
             $a = ($_POST['stay'] == '2') ? "301&id=$newid" : "300";
102
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'];
102
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay'];
103 103
             header($header);
104 104
         } else {
105 105
             $header = "Location: index.php?a=76&r=2";
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
         // finished emptying cache - redirect
161 161
         if ($_POST['stay'] != '') {
162 162
             $a = ($_POST['stay'] == '2') ? "301&id=$id" : "300";
163
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'] . "&or=" . $origin . "&oid=" . $originId;
163
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']."&or=".$origin."&oid=".$originId;
164 164
             header($header);
165 165
         } else {
166 166
             $modx->unlockElement(2, $id);
167
-            $header = "Location: index.php?a=" . $origin . "&r=2" . (empty($originId) ? '' : '&id=' . $originId);
167
+            $header = "Location: index.php?a=".$origin."&r=2".(empty($originId) ? '' : '&id='.$originId);
168 168
             header($header);
169 169
         }
170 170
 
Please login to merge, or discard this patch.
manager/processors/delete_eventlog.processor.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@
 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_eventlog')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 if (isset($_GET['cls']) && $_GET['cls']==1) {
10
-	$where = '';
10
+    $where = '';
11 11
 } else {
12
-	$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
13
-	if($id==0) {
14
-		$modx->webAlertAndQuit($_lang["error_no_id"]);
15
-	}
16
-	$where = "id='{$id}'";
12
+    $id = isset($_GET['id'])? (int)$_GET['id'] : 0;
13
+    if($id==0) {
14
+        $modx->webAlertAndQuit($_lang["error_no_id"]);
15
+    }
16
+    $where = "id='{$id}'";
17 17
 }
18 18
 
19 19
 // delete event log
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  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_eventlog')) {
5
+if (!$modx->hasPermission('delete_eventlog')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-if (isset($_GET['cls']) && $_GET['cls']==1) {
9
+if (isset($_GET['cls']) && $_GET['cls'] == 1) {
10 10
 	$where = '';
11 11
 } else {
12
-	$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
13
-	if($id==0) {
12
+	$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
13
+	if ($id == 0) {
14 14
 		$modx->webAlertAndQuit($_lang["error_no_id"]);
15 15
 	}
16 16
 	$where = "id='{$id}'";
@@ -19,5 +19,5 @@  discard block
 block discarded – undo
19 19
 // delete event log
20 20
 $modx->db->delete($modx->getFullTableName('event_log'), $where);
21 21
 
22
-$header="Location: index.php?a=114";
22
+$header = "Location: index.php?a=114";
23 23
 header($header);
Please login to merge, or discard this patch.
manager/processors/delete_category.processor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('save_plugin') && !$modx->hasPermission('save_snippet') && !$modx->hasPermission('save_template') && !$modx->hasPermission('save_module')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['catId'])? (int)$_GET['catId'] : 0;
10
-if ($id==0) {
9
+$id = isset($_GET['catId']) ? (int) $_GET['catId'] : 0;
10
+if ($id == 0) {
11 11
     $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
@@ -19,5 +19,5 @@  discard block
 block discarded – undo
19 19
 deleteCategory($id);
20 20
 
21 21
 // finished emptying cache - redirect
22
-$header="Location: index.php?a=76";
22
+$header = "Location: index.php?a=76";
23 23
 header($header);
Please login to merge, or discard this patch.