Completed
Push — develop ( 923a1c...1e9876 )
by Maxim
47s queued 29s
created
manager/processors/publish_content.processor.php 3 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
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
 if(!$modx->hasPermission('save_document')||!$modx->hasPermission('publish_document')) {
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7 7
 $id = isset($_REQUEST['id'])? intval($_REQUEST['id']) : 0;
8 8
 if($id==0) {
9
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
9
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12 12
 /************webber ********/
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
 $udperms->role = $_SESSION['mgrRole'];
32 32
 
33 33
 if(!$udperms->checkPermissions()) {
34
-	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
34
+    $modx->webAlertAndQuit($_lang["access_permission_denied"]);
35 35
 }
36 36
 
37 37
 // update the document
38 38
 $modx->db->update(
39
-	array(
40
-		'published'   => 1,
41
-		'pub_date'    => 0,
42
-		'unpub_date'  => 0,
43
-		'editedby'    => $modx->getLoginUserID(),
44
-		'editedon'    => time(),
45
-		'publishedby' => $modx->getLoginUserID(),
46
-		'publishedon' => time(),
47
-	), $modx->getFullTableName('site_content'), "id='{$id}'");
39
+    array(
40
+        'published'   => 1,
41
+        'pub_date'    => 0,
42
+        'unpub_date'  => 0,
43
+        'editedby'    => $modx->getLoginUserID(),
44
+        'editedon'    => time(),
45
+        'publishedby' => $modx->getLoginUserID(),
46
+        'publishedon' => time(),
47
+    ), $modx->getFullTableName('site_content'), "id='{$id}'");
48 48
 
49 49
 // invoke OnDocPublished  event
50 50
 $modx->invokeEvent("OnDocPublished",array("docid"=>$id));
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,36 +1,36 @@  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.");
3
-if(!$modx->hasPermission('save_document')||!$modx->hasPermission('publish_document')) {
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
+if (!$modx->hasPermission('save_document') || !$modx->hasPermission('publish_document')) {
4 4
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7
-$id = isset($_REQUEST['id'])? intval($_REQUEST['id']) : 0;
8
-if($id==0) {
7
+$id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
8
+if ($id == 0) {
9 9
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12 12
 /************webber ********/
13
-$content=$modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'"));
14
-$pid=($content['parent']==0?$id:$content['parent']);
13
+$content = $modx->db->getRow($modx->db->select('parent, pagetitle', $modx->getFullTableName('site_content'), "id='{$id}'"));
14
+$pid = ($content['parent'] == 0 ? $id : $content['parent']);
15 15
 
16 16
 /************** webber *************/
17
-$sd=isset($_REQUEST['dir'])?'&dir='.$_REQUEST['dir']:'&dir=DESC';
18
-$sb=isset($_REQUEST['sort'])?'&sort='.$_REQUEST['sort']:'&sort=createdon';
19
-$pg=isset($_REQUEST['page'])?'&page='.(int)$_REQUEST['page']:'';
20
-$add_path=$sd.$sb.$pg;
17
+$sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC';
18
+$sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon';
19
+$pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : '';
20
+$add_path = $sd.$sb.$pg;
21 21
 
22 22
 /***********************************/
23 23
 
24 24
 
25 25
 
26 26
 // check permissions on the document
27
-include_once MODX_MANAGER_PATH . "processors/user_documents_permissions.class.php";
27
+include_once MODX_MANAGER_PATH."processors/user_documents_permissions.class.php";
28 28
 $udperms = new udperms();
29 29
 $udperms->user = $modx->getLoginUserID();
30 30
 $udperms->document = $id;
31 31
 $udperms->role = $_SESSION['mgrRole'];
32 32
 
33
-if(!$udperms->checkPermissions()) {
33
+if (!$udperms->checkPermissions()) {
34 34
 	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
35 35
 }
36 36
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	), $modx->getFullTableName('site_content'), "id='{$id}'");
48 48
 
49 49
 // invoke OnDocPublished  event
50
-$modx->invokeEvent("OnDocPublished",array("docid"=>$id));
50
+$modx->invokeEvent("OnDocPublished", array("docid"=>$id));
51 51
 
52 52
 // Set the item name for logger
53 53
 $_SESSION['itemname'] = $content['pagetitle'];
@@ -55,6 +55,6 @@  discard block
 block discarded – undo
55 55
 // empty cache
56 56
 $modx->clearCache('full');
57 57
 
58
-$header="Location: index.php?a=3&id=$pid&r=1".$add_path;
58
+$header = "Location: index.php?a=3&id=$pid&r=1".$add_path;
59 59
 
60 60
 header($header);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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
 if(!$modx->hasPermission('save_document')||!$modx->hasPermission('publish_document')) {
4 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 7
 }
Please login to merge, or discard this patch.
manager/processors/remove_locks.processor.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -2,23 +2,23 @@
 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(!isset($_GET['id'])) {
5
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5
+    if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
6 6
 	
7
-	// Remove all locks
8
-	$modx->db->truncate($modx->getFullTableName('active_user_locks'));
7
+    // Remove all locks
8
+    $modx->db->truncate($modx->getFullTableName('active_user_locks'));
9 9
 
10
-	$header = "Location: index.php?a=2";
11
-	header($header);
10
+    $header = "Location: index.php?a=2";
11
+    header($header);
12 12
 } else {
13
-	// Remove single locks via AJAX / window.onbeforeunload
14
-	$type = intval($_GET['type']);
15
-	$id = intval($_GET['id']);
16
-	$includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
17
-	if($type && $id) {
18
-		$modx->unlockElement($type, $id, $includeAllUsers);
19
-		echo '1';
20
-		exit;
21
-	} else {
22
-		echo 'No type or id sent with request.';
23
-	}
13
+    // Remove single locks via AJAX / window.onbeforeunload
14
+    $type = intval($_GET['type']);
15
+    $id = intval($_GET['id']);
16
+    $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
17
+    if($type && $id) {
18
+        $modx->unlockElement($type, $id, $includeAllUsers);
19
+        echo '1';
20
+        exit;
21
+    } else {
22
+        echo 'No type or id sent with request.';
23
+    }
24 24
 }
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(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(!isset($_GET['id'])) {
5
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+if (!isset($_GET['id'])) {
5
+	if (!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
6 6
 	
7 7
 	// Remove all locks
8 8
 	$modx->db->truncate($modx->getFullTableName('active_user_locks'));
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	$type = intval($_GET['type']);
15 15
 	$id = intval($_GET['id']);
16 16
 	$includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button
17
-	if($type && $id) {
17
+	if ($type && $id) {
18 18
 		$modx->unlockElement($type, $id, $includeAllUsers);
19 19
 		echo '1';
20 20
 		exit;
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,12 @@
 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(!isset($_GET['id'])) {
5
-	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
+	}
6 10
 	
7 11
 	// Remove all locks
8 12
 	$modx->db->truncate($modx->getFullTableName('active_user_locks'));
Please login to merge, or discard this patch.
manager/processors/duplicate_plugin.processor.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php 
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
 if(!$modx->hasPermission('new_plugin')) {
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7 7
 $id = isset($_GET['id'])? intval($_GET['id']) : 0;
8 8
 if($id==0) {
9
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
9
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12 12
 // count duplicates
@@ -17,25 +17,25 @@  discard block
 block discarded – undo
17 17
 
18 18
 // duplicate Plugin
19 19
 $newid = $modx->db->insert(
20
-	array(
21
-		'name'=>'',
22
-		'description'=>'',
23
-		'disabled'=>'',
24
-		'moduleguid'=>'',
25
-		'plugincode'=>'',
26
-		'properties'=>'',
27
-		'category'=>'',
28
-		), $modx->getFullTableName('site_plugins'), // Insert into
29
-	"CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, '1' AS disabled, moduleguid, plugincode, properties, category", $modx->getFullTableName('site_plugins'), "id='{$id}'"); // Copy from
20
+    array(
21
+        'name'=>'',
22
+        'description'=>'',
23
+        'disabled'=>'',
24
+        'moduleguid'=>'',
25
+        'plugincode'=>'',
26
+        'properties'=>'',
27
+        'category'=>'',
28
+        ), $modx->getFullTableName('site_plugins'), // Insert into
29
+    "CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, '1' AS disabled, moduleguid, plugincode, properties, category", $modx->getFullTableName('site_plugins'), "id='{$id}'"); // Copy from
30 30
 
31 31
 // duplicate Plugin Event Listeners
32 32
 $modx->db->insert(
33
-	array(
34
-		'pluginid'=>'',
35
-		'evtid'=>'',
36
-		'priority'=>'',
37
-		), $modx->getFullTableName('site_plugin_events'), // Insert into
38
-	"'{$newid}', evtid, priority", $modx->getFullTableName('site_plugin_events'), "pluginid='{$id}'"); // Copy from
33
+    array(
34
+        'pluginid'=>'',
35
+        'evtid'=>'',
36
+        'priority'=>'',
37
+        ), $modx->getFullTableName('site_plugin_events'), // Insert into
38
+    "'{$newid}', evtid, priority", $modx->getFullTableName('site_plugin_events'), "pluginid='{$id}'"); // Copy from
39 39
 
40 40
 // Set the item name for logger
41 41
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_plugins'), "id='{$newid}'"));
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  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.");
3
-if(!$modx->hasPermission('new_plugin')) {
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
+if (!$modx->hasPermission('new_plugin')) {
4 4
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7
-$id = isset($_GET['id'])? intval($_GET['id']) : 0;
8
-if($id==0) {
7
+$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
8
+if ($id == 0) {
9 9
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12 12
 // count duplicates
13 13
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_plugins'), "id='{$id}'"));
14 14
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_plugins'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
15
-if($count>=1) $count = ' '.($count+1);
15
+if ($count >= 1) $count = ' '.($count + 1);
16 16
 else $count = '';
17 17
 
18 18
 // duplicate Plugin
@@ -42,5 +42,5 @@  discard block
 block discarded – undo
42 42
 $_SESSION['itemname'] = $name;
43 43
 
44 44
 // finish duplicating - redirect to new plugin
45
-$header="Location: index.php?r=2&a=102&id=$newid";
45
+$header = "Location: index.php?r=2&a=102&id=$newid";
46 46
 header($header);
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 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
 if(!$modx->hasPermission('new_plugin')) {
4 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 7
 }
@@ -12,8 +14,11 @@  discard block
 block discarded – undo
12 14
 // count duplicates
13 15
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_plugins'), "id='{$id}'"));
14 16
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_plugins'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
15
-if($count>=1) $count = ' '.($count+1);
16
-else $count = '';
17
+if($count>=1) {
18
+    $count = ' '.($count+1);
19
+} else {
20
+    $count = '';
21
+}
17 22
 
18 23
 // duplicate Plugin
19 24
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.
manager/processors/optimize_table.processor.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,33 +1,33 @@
 block discarded – undo
1 1
 <?php 
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
 if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) {	
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7 7
 if (isset($_REQUEST['t'])) {
8 8
 
9
-	if (empty($_REQUEST['t'])) {
10
-		$modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
11
-	}
9
+    if (empty($_REQUEST['t'])) {
10
+        $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
11
+    }
12 12
 
13
-	// Set the item name for logger
14
-	$_SESSION['itemname'] = $_REQUEST['t'];
13
+    // Set the item name for logger
14
+    $_SESSION['itemname'] = $_REQUEST['t'];
15 15
 
16
-	$modx->db->optimize($_REQUEST['t']);
16
+    $modx->db->optimize($_REQUEST['t']);
17 17
 
18 18
 } elseif (isset($_REQUEST['u'])) {
19 19
 
20
-	if (empty($_REQUEST['u'])) {
21
-		$modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]);
22
-	}
20
+    if (empty($_REQUEST['u'])) {
21
+        $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]);
22
+    }
23 23
 
24
-	// Set the item name for logger
25
-	$_SESSION['itemname'] = $_REQUEST['u'];
24
+    // Set the item name for logger
25
+    $_SESSION['itemname'] = $_REQUEST['u'];
26 26
 
27
-	$modx->db->truncate($_REQUEST['u']);
27
+    $modx->db->truncate($_REQUEST['u']);
28 28
 
29 29
 } else {
30
-	$modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
30
+    $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
31 31
 }
32 32
 
33 33
 $mode = intval($_REQUEST['mode']);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  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.");
3
-if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) {	
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
+if (!($modx->hasPermission('settings') && ($modx->hasPermission('logs') || $modx->hasPermission('bk_manager')))) {	
4 4
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
@@ -31,5 +31,5 @@  discard block
 block discarded – undo
31 31
 }
32 32
 
33 33
 $mode = intval($_REQUEST['mode']);
34
-$header="Location: index.php?a={$mode}&s=4";
34
+$header = "Location: index.php?a={$mode}&s=4";
35 35
 header($header);
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@
 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.");
3
-if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) {	
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
+}
5
+if(!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) {
4 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 7
 }
6 8
 
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(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(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('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/delete_role.processor.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
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
 if(!$modx->hasPermission('delete_role')) {
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7 7
 $id = isset($_GET['id'])? intval($_GET['id']) : 0;
8 8
 if($id==0) {
9
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
9
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12 12
 if($id==1){
13
-	$modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
13
+    $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
14 14
 }
15 15
 
16 16
 $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'");
17 17
 $count=$modx->db->getValue($rs);
18 18
 if($count>0){
19
-	$modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
19
+    $modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
20 20
 }
21 21
 
22 22
 // 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,21 +1,21 @@  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.");
3
-if(!$modx->hasPermission('delete_role')) {
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
+if (!$modx->hasPermission('delete_role')) {
4 4
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7
-$id = isset($_GET['id'])? intval($_GET['id']) : 0;
8
-if($id==0) {
7
+$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
8
+if ($id == 0) {
9 9
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12
-if($id==1){
12
+if ($id == 1) {
13 13
 	$modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
14 14
 }
15 15
 
16 16
 $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'");
17
-$count=$modx->db->getValue($rs);
18
-if($count>0){
17
+$count = $modx->db->getValue($rs);
18
+if ($count > 0) {
19 19
 	$modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
20 20
 }
21 21
 
@@ -26,5 +26,5 @@  discard block
 block discarded – undo
26 26
 // delete the attributes
27 27
 $modx->db->delete($modx->getFullTableName('user_roles'), "id='{$id}'");
28 28
 
29
-$header="Location: index.php?a=86";
29
+$header = "Location: index.php?a=86";
30 30
 header($header);
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 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
 if(!$modx->hasPermission('delete_role')) {
4 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 7
 }
@@ -9,13 +11,13 @@  discard block
 block discarded – undo
9 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
10 12
 }
11 13
 
12
-if($id==1){
14
+if($id==1) {
13 15
 	$modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
14 16
 }
15 17
 
16 18
 $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'");
17 19
 $count=$modx->db->getValue($rs);
18
-if($count>0){
20
+if($count>0) {
19 21
 	$modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
20 22
 }
21 23
 
Please login to merge, or discard this patch.
manager/processors/delete_user.processor.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
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
 if(!$modx->hasPermission('delete_user')) {
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7 7
 $id = isset($_GET['id'])? intval($_GET['id']) : 0;
8 8
 if($id==0) {
9
-	$modx->webAlertAndQuit($_lang["error_no_id"]);
9
+    $modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12 12
 // delete the user, but first check if we are deleting our own record
13 13
 if($id==$modx->getLoginUserID()) {
14
-	$modx->webAlertAndQuit("You can't delete yourself!");
14
+    $modx->webAlertAndQuit("You can't delete yourself!");
15 15
 }
16 16
 
17 17
 // Set the item name for logger
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 
21 21
 // invoke OnBeforeUserFormDelete event
22 22
 $modx->invokeEvent("OnBeforeUserFormDelete",
23
-	array(
24
-		"id"	=> $id
25
-	));
23
+    array(
24
+        "id"	=> $id
25
+    ));
26 26
 
27 27
 // delete the user.
28 28
 $modx->db->delete($modx->getFullTableName('manager_users'), "id='{$id}'");
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 
38 38
 // invoke OnManagerDeleteUser event
39 39
 $modx->invokeEvent("OnManagerDeleteUser",
40
-	array(
41
-		"userid"		=> $id,
42
-		"username"		=> $username
43
-	));
40
+    array(
41
+        "userid"		=> $id,
42
+        "username"		=> $username
43
+    ));
44 44
 
45 45
 // invoke OnUserFormDelete event
46 46
 $modx->invokeEvent("OnUserFormDelete",
47
-	array(
48
-		"id"	=> $id
49
-	));
47
+    array(
48
+        "id"	=> $id
49
+    ));
50 50
 
51 51
 $header="Location: index.php?a=75";
52 52
 header($header);
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(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
-if(!$modx->hasPermission('delete_user')) {
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
+if (!$modx->hasPermission('delete_user')) {
4 4
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7
-$id = isset($_GET['id'])? intval($_GET['id']) : 0;
8
-if($id==0) {
7
+$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
8
+if ($id == 0) {
9 9
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
10 10
 }
11 11
 
12 12
 // delete the user, but first check if we are deleting our own record
13
-if($id==$modx->getLoginUserID()) {
13
+if ($id == $modx->getLoginUserID()) {
14 14
 	$modx->webAlertAndQuit("You can't delete yourself!");
15 15
 }
16 16
 
@@ -48,5 +48,5 @@  discard block
 block discarded – undo
48 48
 		"id"	=> $id
49 49
 	));
50 50
 
51
-$header="Location: index.php?a=75";
51
+$header = "Location: index.php?a=75";
52 52
 header($header);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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
 if(!$modx->hasPermission('delete_user')) {
4 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 7
 }
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 (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
 if (!$modx->hasPermission('messages')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? intval($_GET['id']) : 0;
10
-if ($id==0) {
9
+$id = isset($_GET['id']) ? intval($_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_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(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']) ? intval($_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   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@  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('delete_template')) {
5
+if (!$modx->hasPermission('delete_template')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
10
-if($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.