Completed
Pull Request — develop (#716)
by Agel_Nash
09:00
created
manager/actions/mutate_categories.dynamic.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -4,24 +4,24 @@  discard block
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!$modx->hasPermission('category_manager')) {
7
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 }
9 9
 
10 10
 $_module_params = array(
11
-	'module_version'   => '1.0.0',
12
-	'module_params'    => '',
13
-	'module_id'        => $_GET['id'],
14
-	'package_name'     => 'Module_Categories_Manager',
15
-	'native_language'  => 'de',
16
-	'name'             => 'Categories Manager',
17
-	'dirname'          => $site_manager_url,
18
-	'url'              => 'index.php?a=120&id=' . $_GET['id'],
19
-	'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
20
-	'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
21
-	'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
22
-	'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
23
-	'request_key'      => 'module_categories_manager',
24
-	'messages'         => array()
11
+    'module_version'   => '1.0.0',
12
+    'module_params'    => '',
13
+    'module_id'        => $_GET['id'],
14
+    'package_name'     => 'Module_Categories_Manager',
15
+    'native_language'  => 'de',
16
+    'name'             => 'Categories Manager',
17
+    'dirname'          => $site_manager_url,
18
+    'url'              => 'index.php?a=120&id=' . $_GET['id'],
19
+    'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
20
+    'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
21
+    'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
22
+    'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
23
+    'request_key'      => 'module_categories_manager',
24
+    'messages'         => array()
25 25
 );
26 26
 
27 27
 $cm = new EvolutionCMS\Legacy\ModuleCategoriesManager();
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 // assign module_params to internal params
30 30
 foreach( $_module_params as $param => $value )
31 31
 {
32
-	$cm->set( $param, $value );
32
+    $cm->set( $param, $value );
33 33
 }
34 34
 
35 35
 // catch the request actions
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 
38 38
 if( !$categories = $cm->getCategories() )
39 39
 {
40
-	setcookie('webfxtab_manage-categories-pane', 0 );
41
-	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
40
+    setcookie('webfxtab_manage-categories-pane', 0 );
41
+    $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
42 42
 }
43 43
 
44 44
 $cm->renderView('main', $categories );
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 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
     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(!$modx->hasPermission('category_manager')) {
6
+if (!$modx->hasPermission('category_manager')) {
7 7
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
8 8
 }
9 9
 
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 	'native_language'  => 'de',
16 16
 	'name'             => 'Categories Manager',
17 17
 	'dirname'          => $site_manager_url,
18
-	'url'              => 'index.php?a=120&amp;id=' . $_GET['id'],
19
-	'path'             => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR,
20
-	'inc_dir'          => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR,
21
-	'languages_dir'    => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR,
22
-	'views_dir'        => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR,
18
+	'url'              => 'index.php?a=120&amp;id='.$_GET['id'],
19
+	'path'             => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR,
20
+	'inc_dir'          => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR,
21
+	'languages_dir'    => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR,
22
+	'views_dir'        => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR,
23 23
 	'request_key'      => 'module_categories_manager',
24 24
 	'messages'         => array()
25 25
 );
@@ -27,19 +27,19 @@  discard block
 block discarded – undo
27 27
 $cm = new EvolutionCMS\Legacy\ModuleCategoriesManager();
28 28
 
29 29
 // assign module_params to internal params
30
-foreach( $_module_params as $param => $value )
30
+foreach ($_module_params as $param => $value)
31 31
 {
32
-	$cm->set( $param, $value );
32
+	$cm->set($param, $value);
33 33
 }
34 34
 
35 35
 // catch the request actions
36
-include_once $cm->get('inc_dir') . 'request_trigger.inc.php';
36
+include_once $cm->get('inc_dir').'request_trigger.inc.php';
37 37
 
38
-if( !$categories = $cm->getCategories() )
38
+if (!$categories = $cm->getCategories())
39 39
 {
40
-	setcookie('webfxtab_manage-categories-pane', 0 );
41
-	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
40
+	setcookie('webfxtab_manage-categories-pane', 0);
41
+	$cm->addMessage($cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global');
42 42
 }
43 43
 
44
-$cm->renderView('main', $categories );
44
+$cm->renderView('main', $categories);
45 45
 return;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,16 +27,14 @@
 block discarded – undo
27 27
 $cm = new EvolutionCMS\Legacy\ModuleCategoriesManager();
28 28
 
29 29
 // assign module_params to internal params
30
-foreach( $_module_params as $param => $value )
31
-{
30
+foreach( $_module_params as $param => $value ) {
32 31
 	$cm->set( $param, $value );
33 32
 }
34 33
 
35 34
 // catch the request actions
36 35
 include_once $cm->get('inc_dir') . 'request_trigger.inc.php';
37 36
 
38
-if( !$categories = $cm->getCategories() )
39
-{
37
+if( !$categories = $cm->getCategories() ) {
40 38
 	setcookie('webfxtab_manage-categories-pane', 0 );
41 39
 	$cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' );
42 40
 }
Please login to merge, or discard this patch.
manager/actions/resources/mgrResources.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,4 +6,6 @@
 block discarded – undo
6 6
 /**
7 7
  * Don't delete
8 8
  */
9
-class mgrResources extends EvolutionCMS\Legacy\mgrResources{}
9
+class mgrResources extends EvolutionCMS\Legacy\mgrResources
10
+{
11
+}
Please login to merge, or discard this patch.
manager/actions/category_mgr/inc/Categories.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,4 +4,6 @@
 block discarded – undo
4 4
  * Class to handle the modx-categories
5 5
  * @deprecated use EvolutionCMS\Legacy\Categories
6 6
  */
7
-class Categories extends EvolutionCMS\Legacy\Categories{}
7
+class Categories extends EvolutionCMS\Legacy\Categories
8
+{
9
+}
Please login to merge, or discard this patch.
manager/processors/execute_module.processor.php 3 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -3,51 +3,51 @@  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('exec_module')) {
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
 // check if user has access permission, except admins
15 15
 if($_SESSION['mgrRole']!=1){
16
-	$rs = $modx->db->select(
17
-		'sma.usergroup,mg.member',
18
-		$modx->getFullTableName("site_module_access")." sma
16
+    $rs = $modx->db->select(
17
+        'sma.usergroup,mg.member',
18
+        $modx->getFullTableName("site_module_access")." sma
19 19
 			LEFT JOIN ".$modx->getFullTableName("member_groups")." mg ON mg.user_group = sma.usergroup AND member='".$modx->getLoginUserID()."'",
20
-		"sma.module = '{$id}'"
21
-		);
22
-	//initialize permission to -1, if it stays -1 no permissions
23
-	//attached so permission granted
24
-	$permissionAccessInt = -1;
20
+        "sma.module = '{$id}'"
21
+        );
22
+    //initialize permission to -1, if it stays -1 no permissions
23
+    //attached so permission granted
24
+    $permissionAccessInt = -1;
25 25
 
26
-	while ($row = $modx->db->getRow($rs)) {
27
-		if($row["usergroup"] && $row["member"]) {
28
-			//if there are permissions and this member has permission, ofcourse
29
-			//this is granted
30
-			$permissionAccessInt = 1;
31
-		} elseif ($permissionAccessInt==-1) {
32
-			//if there are permissions but this member has no permission and the
33
-			//variable was still in init state we set permission to 0; no permissions
34
-			$permissionAccessInt = 0;
35
-		}
36
-	}
26
+    while ($row = $modx->db->getRow($rs)) {
27
+        if($row["usergroup"] && $row["member"]) {
28
+            //if there are permissions and this member has permission, ofcourse
29
+            //this is granted
30
+            $permissionAccessInt = 1;
31
+        } elseif ($permissionAccessInt==-1) {
32
+            //if there are permissions but this member has no permission and the
33
+            //variable was still in init state we set permission to 0; no permissions
34
+            $permissionAccessInt = 0;
35
+        }
36
+    }
37 37
 
38
-	if($permissionAccessInt==0) {
39
-		$modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106");
40
-	}
38
+    if($permissionAccessInt==0) {
39
+        $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106");
40
+    }
41 41
 }
42 42
 
43 43
 // get module data
44 44
 $rs = $modx->db->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'");
45 45
 $content = $modx->db->getRow($rs);
46 46
 if(!$content) {
47
-	$modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106");
47
+    $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106");
48 48
 }
49 49
 if($content['disabled']) {
50
-	$modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106");
50
+    $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106");
51 51
 }
52 52
 
53 53
 // Set the item name for logger
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 $output = evalModule($content["modulecode"],$parameter);
64 64
 if (strpos(trim($output),'<')===0 && strpos(trim($output),'<?xml')!==0) {
65
-	echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller
65
+    echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller
66 66
 }
67 67
 echo $output;
68 68
 include MODX_MANAGER_PATH."includes/sysalert.display.inc.php";
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 }
13 13
 
14 14
 // check if user has access permission, except admins
15
-if($_SESSION['mgrRole']!=1){
15
+if($_SESSION['mgrRole']!=1) {
16 16
 	$rs = $modx->db->select(
17 17
 		'sma.usergroup,mg.member',
18 18
 		$modx->getFullTableName("site_module_access")." sma
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  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('exec_module')) {
5
+if (!$modx->hasPermission('exec_module')) {
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
 // check if user has access permission, except admins
15
-if($_SESSION['mgrRole']!=1){
15
+if ($_SESSION['mgrRole'] != 1) {
16 16
 	$rs = $modx->db->select(
17 17
 		'sma.usergroup,mg.member',
18 18
 		$modx->getFullTableName("site_module_access")." sma
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 	$permissionAccessInt = -1;
25 25
 
26 26
 	while ($row = $modx->db->getRow($rs)) {
27
-		if($row["usergroup"] && $row["member"]) {
27
+		if ($row["usergroup"] && $row["member"]) {
28 28
 			//if there are permissions and this member has permission, ofcourse
29 29
 			//this is granted
30 30
 			$permissionAccessInt = 1;
31
-		} elseif ($permissionAccessInt==-1) {
31
+		} elseif ($permissionAccessInt == -1) {
32 32
 			//if there are permissions but this member has no permission and the
33 33
 			//variable was still in init state we set permission to 0; no permissions
34 34
 			$permissionAccessInt = 0;
35 35
 		}
36 36
 	}
37 37
 
38
-	if($permissionAccessInt==0) {
38
+	if ($permissionAccessInt == 0) {
39 39
 		$modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106");
40 40
 	}
41 41
 }
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 // get module data
44 44
 $rs = $modx->db->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'");
45 45
 $content = $modx->db->getRow($rs);
46
-if(!$content) {
46
+if (!$content) {
47 47
 	$modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106");
48 48
 }
49
-if($content['disabled']) {
49
+if ($content['disabled']) {
50 50
 	$modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106");
51 51
 }
52 52
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 $_SESSION['itemname'] = $content['name'];
61 61
 
62 62
 
63
-$output = evalModule($content["modulecode"],$parameter);
64
-if (strpos(trim($output),'<')===0 && strpos(trim($output),'<?xml')!==0) {
63
+$output = evalModule($content["modulecode"], $parameter);
64
+if (strpos(trim($output), '<') === 0 && strpos(trim($output), '<?xml') !== 0) {
65 65
 	echo "<style>@supports (-webkit-overflow-scrolling: touch) {body,html {-webkit-overflow-scrolling: touch;overflow:auto!important;height:100%!important}}</style>"; // for iframe scroller
66 66
 }
67 67
 echo $output;
Please login to merge, or discard this patch.
manager/processors/publish_content.processor.php 1 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/unpublish_content.processor.php 1 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 OnDocUnPublished  event
51
-$modx->invokeEvent("OnDocUnPublished",array("docid"=>$id));
51
+$modx->invokeEvent("OnDocUnPublished", 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/duplicate_module.processor.php 3 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,11 @@
 block discarded – undo
31 31
 // count duplicates
32 32
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_modules'), "id='{$id}'"));
33 33
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_modules'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
34
-if($count>=1) $count = ' '.($count+1);
35
-else $count = '';
34
+if($count>=1) {
35
+    $count = ' '.($count+1);
36
+} else {
37
+    $count = '';
38
+}
36 39
 
37 40
 // duplicate module
38 41
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 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_module')) {
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
 // count duplicates
14 14
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_modules'), "id='{$id}'"));
@@ -18,40 +18,40 @@  discard block
 block discarded – undo
18 18
 
19 19
 // duplicate module
20 20
 $newid = $modx->db->insert(
21
-	array(
22
-		'name'=>'',
23
-		'description'=>'',
24
-		'disabled'=>'',
25
-		'category'=>'',
26
-		'wrap'=>'',
27
-		'icon'=>'',
28
-		'enable_resource'=>'',
29
-		'resourcefile'=>'',
30
-		'createdon'=>'',
31
-		'editedon'=>'',
32
-		'guid'=>'',
33
-		'enable_sharedparams'=>'',
34
-		'properties'=>'',
35
-		'modulecode'=>'',
36
-		), $modx->getFullTableName('site_modules'), // Insert into
37
-	"CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, '1' AS disabled, category, wrap, icon, enable_resource, resourcefile, createdon, editedon, '".createGUID()."' AS guid, enable_sharedparams, properties, modulecode", $modx->getFullTableName('site_modules'), "id='{$id}'"); // Copy from
21
+    array(
22
+        'name'=>'',
23
+        'description'=>'',
24
+        'disabled'=>'',
25
+        'category'=>'',
26
+        'wrap'=>'',
27
+        'icon'=>'',
28
+        'enable_resource'=>'',
29
+        'resourcefile'=>'',
30
+        'createdon'=>'',
31
+        'editedon'=>'',
32
+        'guid'=>'',
33
+        'enable_sharedparams'=>'',
34
+        'properties'=>'',
35
+        'modulecode'=>'',
36
+        ), $modx->getFullTableName('site_modules'), // Insert into
37
+    "CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, '1' AS disabled, category, wrap, icon, enable_resource, resourcefile, createdon, editedon, '".createGUID()."' AS guid, enable_sharedparams, properties, modulecode", $modx->getFullTableName('site_modules'), "id='{$id}'"); // Copy from
38 38
 
39 39
 // duplicate module dependencies
40 40
 $modx->db->insert(
41
-	array(
42
-		'module'=>'',
43
-		'resource'=>'',
44
-		'type'=>'',
45
-		), $modx->getFullTableName('site_module_depobj'), // Insert into
46
-	"'{$newid}', resource, type", $modx->getFullTableName('site_module_depobj'), "module='{$id}'"); // Copy from
41
+    array(
42
+        'module'=>'',
43
+        'resource'=>'',
44
+        'type'=>'',
45
+        ), $modx->getFullTableName('site_module_depobj'), // Insert into
46
+    "'{$newid}', resource, type", $modx->getFullTableName('site_module_depobj'), "module='{$id}'"); // Copy from
47 47
 
48 48
 // duplicate module user group access
49 49
 $modx->db->insert(
50
-	array(
51
-		'module'=>'',
52
-		'usergroup'=>'',
53
-		), $modx->getFullTableName('site_module_access'), // Insert into
54
-	"'{$newid}', usergroup", $modx->getFullTableName('site_module_access'), "module='{$id}'"); // Copy from
50
+    array(
51
+        'module'=>'',
52
+        'usergroup'=>'',
53
+        ), $modx->getFullTableName('site_module_access'), // Insert into
54
+    "'{$newid}', usergroup", $modx->getFullTableName('site_module_access'), "module='{$id}'"); // Copy from
55 55
 
56 56
 // Set the item name for logger
57 57
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_modules'), "id='{$newid}'"));
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('new_module')) {
5
+if (!$modx->hasPermission('new_module')) {
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
 // count duplicates
14 14
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_modules'), "id='{$id}'"));
15 15
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_modules'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
16
-if($count>=1) $count = ' '.($count+1);
16
+if ($count >= 1) $count = ' '.($count + 1);
17 17
 else $count = '';
18 18
 
19 19
 // duplicate module
@@ -58,5 +58,5 @@  discard block
 block discarded – undo
58 58
 $_SESSION['itemname'] = $name;
59 59
 
60 60
 // finish duplicating - redirect to new module
61
-$header="Location: index.php?r=2&a=108&id=$newid";
61
+$header = "Location: index.php?r=2&a=108&id=$newid";
62 62
 header($header);
Please login to merge, or discard this patch.
manager/processors/move_document.processor.php 3 patches
Braces   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,12 +12,20 @@  discard block
 block discarded – undo
12 12
 // ok, two things to check.
13 13
 // first, document cannot be moved to itself
14 14
 // second, new parent must be a folder. If not, set it to folder.
15
-if($documentID==$newParentID) $modx->webAlertAndQuit($_lang["error_movedocument1"]);
16
-if($documentID <= 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]);
17
-if($newParentID < 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]);
15
+if($documentID==$newParentID) {
16
+    $modx->webAlertAndQuit($_lang["error_movedocument1"]);
17
+}
18
+if($documentID <= 0) {
19
+    $modx->webAlertAndQuit($_lang["error_movedocument2"]);
20
+}
21
+if($newParentID < 0) {
22
+    $modx->webAlertAndQuit($_lang["error_movedocument2"]);
23
+}
18 24
 
19 25
 $parents = $modx->getParentIds($newParentID);
20
-if (in_array($documentID, $parents))  $modx->webAlertAndQuit($_lang["error_movedocument2"]);
26
+if (in_array($documentID, $parents)) {
27
+    $modx->webAlertAndQuit($_lang["error_movedocument2"]);
28
+}
21 29
 
22 30
 $rs = $modx->db->select('parent', $modx->getFullTableName('site_content'), "id='{$documentID}'");
23 31
 $oldparent = $modx->db->getValue($rs);
@@ -62,11 +70,11 @@  discard block
 block discarded – undo
62 70
 	"old_parent" => $oldparent,
63 71
 	"new_parent" => $newParentID
64 72
 ));
65
-if (is_array($evtOut) && count($evtOut) > 0){
73
+if (is_array($evtOut) && count($evtOut) > 0) {
66 74
 	$newParent = array_pop($evtOut);
67 75
 	if($newParent == $oldparent) {
68 76
 		$modx->webAlertAndQuit($_lang["error_movedocument2"]);
69
-	}else{
77
+	} else {
70 78
 		$newParentID = $newParent;
71 79
 	}
72 80
 }
Please login to merge, or discard this patch.
Indentation   +48 added lines, -48 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('edit_document')) {
6
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $newParentID = isset($_REQUEST['new_parent']) ? (int)$_REQUEST['new_parent'] : 0;
@@ -25,68 +25,68 @@  discard block
 block discarded – undo
25 25
 // check user has permission to move document to chosen location
26 26
 
27 27
 if ($use_udperms == 1) {
28
-	if ($oldparent != $newParentID) {
29
-		$udperms = new EvolutionCMS\Legacy\Permissions();
30
-		$udperms->user = $modx->getLoginUserID();
31
-		$udperms->document = $newParentID;
32
-		$udperms->role = $_SESSION['mgrRole'];
28
+    if ($oldparent != $newParentID) {
29
+        $udperms = new EvolutionCMS\Legacy\Permissions();
30
+        $udperms->user = $modx->getLoginUserID();
31
+        $udperms->document = $newParentID;
32
+        $udperms->role = $_SESSION['mgrRole'];
33 33
 
34
-		 if (!$udperms->checkPermissions()) {
35
-			$modx->webAlertAndQuit($_lang["access_permission_parent_denied"]);
36
-		 }
37
-	}
34
+            if (!$udperms->checkPermissions()) {
35
+            $modx->webAlertAndQuit($_lang["access_permission_parent_denied"]);
36
+            }
37
+    }
38 38
 }
39 39
 
40 40
 $evtOut = $modx->invokeEvent("onBeforeMoveDocument", array (
41
-	"id_document" => $documentID,
42
-	"old_parent" => $oldparent,
43
-	"new_parent" => $newParentID
41
+    "id_document" => $documentID,
42
+    "old_parent" => $oldparent,
43
+    "new_parent" => $newParentID
44 44
 ));
45 45
 if (is_array($evtOut) && count($evtOut) > 0){
46
-	$newParent = array_pop($evtOut);
47
-	if($newParent == $oldparent) {
48
-		$modx->webAlertAndQuit($_lang["error_movedocument2"]);
49
-	}else{
50
-		$newParentID = $newParent;
51
-	}
46
+    $newParent = array_pop($evtOut);
47
+    if($newParent == $oldparent) {
48
+        $modx->webAlertAndQuit($_lang["error_movedocument2"]);
49
+    }else{
50
+        $newParentID = $newParent;
51
+    }
52 52
 }
53 53
 
54 54
 $children = allChildren($documentID);
55 55
 if (!array_search($newParentID, $children)) {
56
-	$modx->db->update(array(
57
-		'isfolder' => 1,
58
-	), $modx->getFullTableName('site_content'), "id='{$newParentID}'");
56
+    $modx->db->update(array(
57
+        'isfolder' => 1,
58
+    ), $modx->getFullTableName('site_content'), "id='{$newParentID}'");
59 59
 
60
-	$modx->db->update(array(
61
-		'parent'   => $newParentID,
62
-		'editedby' => $modx->getLoginUserID(),
63
-		'editedon' => time(),
64
-	), $modx->getFullTableName('site_content'), "id='{$documentID}'");
60
+    $modx->db->update(array(
61
+        'parent'   => $newParentID,
62
+        'editedby' => $modx->getLoginUserID(),
63
+        'editedon' => time(),
64
+    ), $modx->getFullTableName('site_content'), "id='{$documentID}'");
65 65
 
66
-	// finished moving the document, now check to see if the old_parent should no longer be a folder.
67
-	$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_content'), "parent='{$oldparent}'");
68
-	$limit = $modx->db->getValue($rs);
66
+    // finished moving the document, now check to see if the old_parent should no longer be a folder.
67
+    $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_content'), "parent='{$oldparent}'");
68
+    $limit = $modx->db->getValue($rs);
69 69
 
70
-	if(!$limit>0) {
71
-		$modx->db->update(array(
72
-			'isfolder' => 0,
73
-		), $modx->getFullTableName('site_content'), "id='{$oldparent}'");
74
-	}
75
-	// Set the item name for logger
76
-	$pagetitle = $modx->db->getValue($modx->db->select('pagetitle', $modx->getFullTableName('site_content'), "id='{$documentID}'"));
77
-	$_SESSION['itemname'] = $pagetitle;
70
+    if(!$limit>0) {
71
+        $modx->db->update(array(
72
+            'isfolder' => 0,
73
+        ), $modx->getFullTableName('site_content'), "id='{$oldparent}'");
74
+    }
75
+    // Set the item name for logger
76
+    $pagetitle = $modx->db->getValue($modx->db->select('pagetitle', $modx->getFullTableName('site_content'), "id='{$documentID}'"));
77
+    $_SESSION['itemname'] = $pagetitle;
78 78
 
79
-	$modx->invokeEvent("onAfterMoveDocument", array (
80
-		"id_document" => $documentID,
81
-		"old_parent" => $oldparent,
82
-		"new_parent" => $newParentID
83
-	));
79
+    $modx->invokeEvent("onAfterMoveDocument", array (
80
+        "id_document" => $documentID,
81
+        "old_parent" => $oldparent,
82
+        "new_parent" => $newParentID
83
+    ));
84 84
 
85
-	// empty cache & sync site
86
-	$modx->clearCache('full');
85
+    // empty cache & sync site
86
+    $modx->clearCache('full');
87 87
 
88
-	$header="Location: index.php?a=3&id={$documentID}&r=9";
89
-	header($header);
88
+    $header="Location: index.php?a=3&id={$documentID}&r=9";
89
+    header($header);
90 90
 } else {
91
-	$modx->webAlertAndQuit("You cannot move a document to a child document!");
91
+    $modx->webAlertAndQuit("You cannot move a document to a child document!");
92 92
 }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 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('edit_document')) {
5
+if (!$modx->hasPermission('edit_document')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$newParentID = isset($_REQUEST['new_parent']) ? (int)$_REQUEST['new_parent'] : 0;
10
-$documentID = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
9
+$newParentID = isset($_REQUEST['new_parent']) ? (int) $_REQUEST['new_parent'] : 0;
10
+$documentID = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
11 11
 
12 12
 // ok, two things to check.
13 13
 // first, document cannot be moved to itself
14 14
 // second, new parent must be a folder. If not, set it to folder.
15
-if($documentID==$newParentID) $modx->webAlertAndQuit($_lang["error_movedocument1"]);
16
-if($documentID <= 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]);
17
-if($newParentID < 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]);
15
+if ($documentID == $newParentID) $modx->webAlertAndQuit($_lang["error_movedocument1"]);
16
+if ($documentID <= 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]);
17
+if ($newParentID < 0) $modx->webAlertAndQuit($_lang["error_movedocument2"]);
18 18
 
19 19
 $parents = $modx->getParentIds($newParentID);
20 20
 if (in_array($documentID, $parents))  $modx->webAlertAndQuit($_lang["error_movedocument2"]);
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 }
39 39
 
40
-$evtOut = $modx->invokeEvent("onBeforeMoveDocument", array (
40
+$evtOut = $modx->invokeEvent("onBeforeMoveDocument", array(
41 41
 	"id_document" => $documentID,
42 42
 	"old_parent" => $oldparent,
43 43
 	"new_parent" => $newParentID
44 44
 ));
45
-if (is_array($evtOut) && count($evtOut) > 0){
45
+if (is_array($evtOut) && count($evtOut) > 0) {
46 46
 	$newParent = array_pop($evtOut);
47
-	if($newParent == $oldparent) {
47
+	if ($newParent == $oldparent) {
48 48
 		$modx->webAlertAndQuit($_lang["error_movedocument2"]);
49
-	}else{
49
+	} else {
50 50
 		$newParentID = $newParent;
51 51
 	}
52 52
 }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_content'), "parent='{$oldparent}'");
68 68
 	$limit = $modx->db->getValue($rs);
69 69
 
70
-	if(!$limit>0) {
70
+	if (!$limit > 0) {
71 71
 		$modx->db->update(array(
72 72
 			'isfolder' => 0,
73 73
 		), $modx->getFullTableName('site_content'), "id='{$oldparent}'");
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	$pagetitle = $modx->db->getValue($modx->db->select('pagetitle', $modx->getFullTableName('site_content'), "id='{$documentID}'"));
77 77
 	$_SESSION['itemname'] = $pagetitle;
78 78
 
79
-	$modx->invokeEvent("onAfterMoveDocument", array (
79
+	$modx->invokeEvent("onAfterMoveDocument", array(
80 80
 		"id_document" => $documentID,
81 81
 		"old_parent" => $oldparent,
82 82
 		"new_parent" => $newParentID
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	// empty cache & sync site
86 86
 	$modx->clearCache('full');
87 87
 
88
-	$header="Location: index.php?a=3&id={$documentID}&r=9";
88
+	$header = "Location: index.php?a=3&id={$documentID}&r=9";
89 89
 	header($header);
90 90
 } else {
91 91
 	$modx->webAlertAndQuit("You cannot move a document to a child document!");
Please login to merge, or discard this patch.
manager/processors/duplicate_content.processor.php 2 patches
Indentation   +3 added lines, -3 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_document') || !$modx->hasPermission('save_document')) {
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
 $children = array();
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 $udperms->duplicateDoc = true;
22 22
 
23 23
 if(!$udperms->checkPermissions()) {
24
-	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
24
+    $modx->webAlertAndQuit($_lang["access_permission_denied"]);
25 25
 }
26 26
 
27 27
 // Run the duplicator
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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('new_document') || !$modx->hasPermission('save_document')) {
5
+if (!$modx->hasPermission('new_document') || !$modx->hasPermission('save_document')) {
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
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 $udperms->role = $_SESSION['mgrRole'];
21 21
 $udperms->duplicateDoc = true;
22 22
 
23
-if(!$udperms->checkPermissions()) {
23
+if (!$udperms->checkPermissions()) {
24 24
 	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
25 25
 }
26 26
 
@@ -32,5 +32,5 @@  discard block
 block discarded – undo
32 32
 $_SESSION['itemname'] = $name;
33 33
 
34 34
 // finish cloning - redirect
35
-$header="Location: index.php?r=1&a=3&id=$id";
35
+$header = "Location: index.php?r=1&a=3&id=$id";
36 36
 header($header);
Please login to merge, or discard this patch.