Completed
Pull Request — develop (#518)
by Agel_Nash
05:24
created
manager/processors/duplicate_module.processor.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php 
2 2
 if(IN_MANAGER_MODE!="true") 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_module')) {
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
 // create globally unique identifiers (guid)
13 13
 function createGUID(){
14
-	srand((double)microtime()*1000000);
15
-	$r = rand() ;
16
-	$u = uniqid(getmypid() . $r . (double)microtime()*1000000,1);
17
-	$m = md5 ($u);
18
-	return $m;
14
+    srand((double)microtime()*1000000);
15
+    $r = rand() ;
16
+    $u = uniqid(getmypid() . $r . (double)microtime()*1000000,1);
17
+    $m = md5 ($u);
18
+    return $m;
19 19
 }
20 20
 
21 21
 // count duplicates
@@ -26,40 +26,40 @@  discard block
 block discarded – undo
26 26
 
27 27
 // duplicate module
28 28
 $newid = $modx->db->insert(
29
-	array(
30
-		'name'=>'',
31
-		'description'=>'',
32
-		'disabled'=>'',
33
-		'category'=>'',
34
-		'wrap'=>'',
35
-		'icon'=>'',
36
-		'enable_resource'=>'',
37
-		'resourcefile'=>'',
38
-		'createdon'=>'',
39
-		'editedon'=>'',
40
-		'guid'=>'',
41
-		'enable_sharedparams'=>'',
42
-		'properties'=>'',
43
-		'modulecode'=>'',
44
-		), $modx->getFullTableName('site_modules'), // Insert into
45
-	"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
29
+    array(
30
+        'name'=>'',
31
+        'description'=>'',
32
+        'disabled'=>'',
33
+        'category'=>'',
34
+        'wrap'=>'',
35
+        'icon'=>'',
36
+        'enable_resource'=>'',
37
+        'resourcefile'=>'',
38
+        'createdon'=>'',
39
+        'editedon'=>'',
40
+        'guid'=>'',
41
+        'enable_sharedparams'=>'',
42
+        'properties'=>'',
43
+        'modulecode'=>'',
44
+        ), $modx->getFullTableName('site_modules'), // Insert into
45
+    "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
46 46
 
47 47
 // duplicate module dependencies
48 48
 $modx->db->insert(
49
-	array(
50
-		'module'=>'',
51
-		'resource'=>'',
52
-		'type'=>'',
53
-		), $modx->getFullTableName('site_module_depobj'), // Insert into
54
-	"'{$newid}', resource, type", $modx->getFullTableName('site_module_depobj'), "module='{$id}'"); // Copy from
49
+    array(
50
+        'module'=>'',
51
+        'resource'=>'',
52
+        'type'=>'',
53
+        ), $modx->getFullTableName('site_module_depobj'), // Insert into
54
+    "'{$newid}', resource, type", $modx->getFullTableName('site_module_depobj'), "module='{$id}'"); // Copy from
55 55
 
56 56
 // duplicate module user group access
57 57
 $modx->db->insert(
58
-	array(
59
-		'module'=>'',
60
-		'usergroup'=>'',
61
-		), $modx->getFullTableName('site_module_access'), // Insert into
62
-	"'{$newid}', usergroup", $modx->getFullTableName('site_module_access'), "module='{$id}'"); // Copy from
58
+    array(
59
+        'module'=>'',
60
+        'usergroup'=>'',
61
+        ), $modx->getFullTableName('site_module_access'), // Insert into
62
+    "'{$newid}', usergroup", $modx->getFullTableName('site_module_access'), "module='{$id}'"); // Copy from
63 63
 
64 64
 // Set the item name for logger
65 65
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_modules'), "id='{$newid}'"));
Please login to merge, or discard this patch.
manager/processors/undelete_content.processor.php 1 patch
Indentation   +25 added lines, -25 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('delete_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 ********/
@@ -30,50 +30,50 @@  discard block
 block discarded – undo
30 30
 $udperms->role = $_SESSION['mgrRole'];
31 31
 
32 32
 if(!$udperms->checkPermissions()) {
33
-	$modx->webAlertAndQuit($_lang["access_permission_denied"]);
33
+    $modx->webAlertAndQuit($_lang["access_permission_denied"]);
34 34
 }
35 35
 
36 36
 // get the timestamp on which the document was deleted.
37 37
 $rs = $modx->db->select('deletedon', $modx->getFullTableName('site_content'), "id='{$id}' AND deleted=1");
38 38
 $deltime = $modx->db->getValue($rs);
39 39
 if(!$deltime) {
40
-	$modx->webAlertAndQuit("Couldn't find document to determine it's date of deletion!");
40
+    $modx->webAlertAndQuit("Couldn't find document to determine it's date of deletion!");
41 41
 }
42 42
 
43 43
 $children = array();
44 44
 
45 45
 function getChildren($parent) {
46 46
 	
47
-	global $modx;
48
-	global $children;
49
-	global $deltime;
47
+    global $modx;
48
+    global $children;
49
+    global $deltime;
50 50
 	
51
-	$rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "parent='{$parent}' AND deleted=1 AND deletedon='{$deltime}'");
52
-		// the document has children documents, we'll need to delete those too
53
-		while ($row=$modx->db->getRow($rs)) {
54
-			$children[] = $row['id'];
55
-			getChildren($row['id']);
56
-			//echo "Found childNode of parentNode $parent: ".$row['id']."<br />";
57
-		}
51
+    $rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "parent='{$parent}' AND deleted=1 AND deletedon='{$deltime}'");
52
+        // the document has children documents, we'll need to delete those too
53
+        while ($row=$modx->db->getRow($rs)) {
54
+            $children[] = $row['id'];
55
+            getChildren($row['id']);
56
+            //echo "Found childNode of parentNode $parent: ".$row['id']."<br />";
57
+        }
58 58
 }
59 59
 
60 60
 getChildren($id);
61 61
 
62 62
 if(count($children)>0) {
63
-	$modx->db->update(
64
-		array(
65
-			'deleted'   => 0,
66
-			'deletedby' => 0,
67
-			'deletedon' => 0,
68
-		), $modx->getFullTableName('site_content'), "id IN(".implode(", ", $children).")");
63
+    $modx->db->update(
64
+        array(
65
+            'deleted'   => 0,
66
+            'deletedby' => 0,
67
+            'deletedon' => 0,
68
+        ), $modx->getFullTableName('site_content'), "id IN(".implode(", ", $children).")");
69 69
 }
70 70
 //'undelete' the document.
71 71
 $modx->db->update(
72
-	array(
73
-		'deleted'   => 0,
74
-		'deletedby' => 0,
75
-		'deletedon' => 0,
76
-	), $modx->getFullTableName('site_content'), "id='{$id}'");
72
+    array(
73
+        'deleted'   => 0,
74
+        'deletedby' => 0,
75
+        'deletedon' => 0,
76
+    ), $modx->getFullTableName('site_content'), "id='{$id}'");
77 77
 
78 78
 $modx->invokeEvent("OnDocFormUnDelete",
79 79
     array(
Please login to merge, or discard this patch.
manager/processors/save_settings.processor.php 1 patch
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  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('settings')) {
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 $data = $_POST;
7 7
 // lose the POST now, gets rid of quirky issue with Safari 3 - see FS#972
@@ -9,41 +9,41 @@  discard block
 block discarded – undo
9 9
 
10 10
 if($data['friendly_urls']==='1' && strpos($_SERVER['SERVER_SOFTWARE'],'IIS')===false)
11 11
 {
12
-	$htaccess        = $modx->config['base_path'] . '.htaccess';
13
-	$sample_htaccess = $modx->config['base_path'] . 'ht.access';
14
-	$dir = '/' . trim($modx->config['base_url'],'/');
15
-	if(is_file($htaccess))
16
-	{
17
-		$_ = file_get_contents($htaccess);
18
-		if(strpos($_,'RewriteBase')===false)
19
-		{
20
-			$warnings[] = $_lang["settings_friendlyurls_alert2"];
21
-		}
22
-		elseif(is_writable($htaccess))
23
-		{
24
-			$_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_);
25
-			if(!@file_put_contents($htaccess,$_))
26
-			{
27
-				$warnings[] = $_lang["settings_friendlyurls_alert2"];
28
-			}
29
-		}
30
-	}
31
-	elseif(is_file($sample_htaccess))
32
-	{
33
-		if(!@rename($sample_htaccess,$htaccess))
12
+    $htaccess        = $modx->config['base_path'] . '.htaccess';
13
+    $sample_htaccess = $modx->config['base_path'] . 'ht.access';
14
+    $dir = '/' . trim($modx->config['base_url'],'/');
15
+    if(is_file($htaccess))
16
+    {
17
+        $_ = file_get_contents($htaccess);
18
+        if(strpos($_,'RewriteBase')===false)
34 19
         {
35
-        	$warnings[] = $_lang["settings_friendlyurls_alert"];
36
-		}
37
-		elseif($modx->config['base_url']!=='/')
38
-		{
39
-			$_ = file_get_contents($htaccess);
40
-			$_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_);
41
-			if(!@file_put_contents($htaccess,$_))
42
-			{
43
-				$warnings[] = $_lang["settings_friendlyurls_alert2"];
44
-			}
45
-		}
46
-	}
20
+            $warnings[] = $_lang["settings_friendlyurls_alert2"];
21
+        }
22
+        elseif(is_writable($htaccess))
23
+        {
24
+            $_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_);
25
+            if(!@file_put_contents($htaccess,$_))
26
+            {
27
+                $warnings[] = $_lang["settings_friendlyurls_alert2"];
28
+            }
29
+        }
30
+    }
31
+    elseif(is_file($sample_htaccess))
32
+    {
33
+        if(!@rename($sample_htaccess,$htaccess))
34
+        {
35
+            $warnings[] = $_lang["settings_friendlyurls_alert"];
36
+        }
37
+        elseif($modx->config['base_url']!=='/')
38
+        {
39
+            $_ = file_get_contents($htaccess);
40
+            $_ = preg_replace('@RewriteBase.+@',"RewriteBase {$dir}", $_);
41
+            if(!@file_put_contents($htaccess,$_))
42
+            {
43
+                $warnings[] = $_lang["settings_friendlyurls_alert2"];
44
+            }
45
+        }
46
+    }
47 47
 }
48 48
 
49 49
 if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
 $data['rb_base_dir']      = str_replace('[(base_path)]',MODX_BASE_PATH,$data['rb_base_dir']); 
55 55
 
56 56
 if (isset($data) && count($data) > 0) {
57
-	if(isset($data['manager_language'])) {
58
-		$lang_path = MODX_MANAGER_PATH . 'includes/lang/' . $data['manager_language'] . '.inc.php';
59
-		if(is_file($lang_path)) {
60
-			include($lang_path);
57
+    if(isset($data['manager_language'])) {
58
+        $lang_path = MODX_MANAGER_PATH . 'includes/lang/' . $data['manager_language'] . '.inc.php';
59
+        if(is_file($lang_path)) {
60
+            include($lang_path);
61 61
             global $modx_lang_attribute;
62 62
             $data['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute;
63
-		}
64
-	}
65
-	$savethese = array();
66
-	$data['sys_files_checksum'] = $modx->manager->getSystemChecksum($data['check_files_onlogin']);
67
-	$data['mail_check_timeperiod'] = intval($data['mail_check_timeperiod']) < 60 ? 60 : $data['mail_check_timeperiod']; // updateMail() in mainMenu no faster than every minute
68
-	foreach ($data as $k => $v) {
69
-		switch ($k) {
63
+        }
64
+    }
65
+    $savethese = array();
66
+    $data['sys_files_checksum'] = $modx->manager->getSystemChecksum($data['check_files_onlogin']);
67
+    $data['mail_check_timeperiod'] = intval($data['mail_check_timeperiod']) < 60 ? 60 : $data['mail_check_timeperiod']; // updateMail() in mainMenu no faster than every minute
68
+    foreach ($data as $k => $v) {
69
+        switch ($k) {
70 70
             case 'settings_version':{
71 71
                 if($modx->getVersionData('version')!=$data['settings_version']){
72 72
                     $modx->logEvent(17,2,'<pre>'.var_export($data['settings_version'],true).'</pre>','fake settings_version');
@@ -74,24 +74,24 @@  discard block
 block discarded – undo
74 74
                 }
75 75
                 break;
76 76
             }
77
-			case 'error_page':
78
-			case 'unauthorized_page':
79
-			if (trim($v) == '' || !is_numeric($v)) {
80
-				$v = $data['site_start'];
81
-			}
82
-			break;
77
+            case 'error_page':
78
+            case 'unauthorized_page':
79
+            if (trim($v) == '' || !is_numeric($v)) {
80
+                $v = $data['site_start'];
81
+            }
82
+            break;
83 83
 	
84
-			case 'lst_custom_contenttype':
85
-			case 'txt_custom_contenttype':
86
-				// Skip these
87
-				$k = '';
88
-				break;
89
-			case 'rb_base_dir':
90
-			case 'rb_base_url':
91
-			case 'filemanager_path':
92
-				$v = trim($v);
93
-				$v = rtrim($v,'/') . '/';
94
-				break;
84
+            case 'lst_custom_contenttype':
85
+            case 'txt_custom_contenttype':
86
+                // Skip these
87
+                $k = '';
88
+                break;
89
+            case 'rb_base_dir':
90
+            case 'rb_base_url':
91
+            case 'filemanager_path':
92
+                $v = trim($v);
93
+                $v = rtrim($v,'/') . '/';
94
+                break;
95 95
             case 'manager_language':
96 96
                 $langDir = realpath(MODX_MANAGER_PATH . 'includes/lang');
97 97
                 $langFile = realpath(MODX_MANAGER_PATH . 'includes/lang/' . $v . '.inc.php');
@@ -99,56 +99,56 @@  discard block
 block discarded – undo
99 99
                 if($langDir !== $langFileDir || !file_exists($langFile)) {
100 100
                     $v = 'english';
101 101
                 }
102
-				break;
103
-			case 'smtppw':
104
-				if ($v !== '********************' && $v !== '') {
105
-					$v = trim($v);
106
-					$v = base64_encode($v) . substr(str_shuffle('abcdefghjkmnpqrstuvxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'), 0, 7);
107
-					$v = str_replace('=','%',$v);
108
-				} elseif ($v === '********************') {
109
-					$k = '';
110
-				}
111
-				break;
102
+                break;
103
+            case 'smtppw':
104
+                if ($v !== '********************' && $v !== '') {
105
+                    $v = trim($v);
106
+                    $v = base64_encode($v) . substr(str_shuffle('abcdefghjkmnpqrstuvxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'), 0, 7);
107
+                    $v = str_replace('=','%',$v);
108
+                } elseif ($v === '********************') {
109
+                    $k = '';
110
+                }
111
+                break;
112 112
             case 'valid_hostnames':
113
-				$v = str_replace(array(' ,', ', '), ',', $v);
114
-				if ($v !== ',') {
115
-					$v = ($v != 'MODX_SITE_HOSTNAMES') ? $v : '';
116
-					$configString = '<?php' . "\n" . 'define(\'MODX_SITE_HOSTNAMES\', \'' . $v . '\');' . "\n";
117
-					@file_put_contents(MODX_BASE_PATH . 'assets/cache/siteHostnames.php', $configString);
118
-				}
119
-				$k = '';
120
-				break;
121
-			case 'session_timeout':
122
-				$mail_check_timeperiod = $data['mail_check_timeperiod'];
123
-				$v = intval($v) < ($data['mail_check_timeperiod']/60+1) ? ($data['mail_check_timeperiod']/60+1) : $v; // updateMail() in mainMenu pings as per mail_check_timeperiod, so +1min is minimum
124
-				break;
125
-			default:
126
-			break;
127
-		}
128
-		$v = is_array($v) ? implode(",", $v) : $v;
113
+                $v = str_replace(array(' ,', ', '), ',', $v);
114
+                if ($v !== ',') {
115
+                    $v = ($v != 'MODX_SITE_HOSTNAMES') ? $v : '';
116
+                    $configString = '<?php' . "\n" . 'define(\'MODX_SITE_HOSTNAMES\', \'' . $v . '\');' . "\n";
117
+                    @file_put_contents(MODX_BASE_PATH . 'assets/cache/siteHostnames.php', $configString);
118
+                }
119
+                $k = '';
120
+                break;
121
+            case 'session_timeout':
122
+                $mail_check_timeperiod = $data['mail_check_timeperiod'];
123
+                $v = intval($v) < ($data['mail_check_timeperiod']/60+1) ? ($data['mail_check_timeperiod']/60+1) : $v; // updateMail() in mainMenu pings as per mail_check_timeperiod, so +1min is minimum
124
+                break;
125
+            default:
126
+            break;
127
+        }
128
+        $v = is_array($v) ? implode(",", $v) : $v;
129 129
 		
130
-		$modx->config[$k] = $v;
130
+        $modx->config[$k] = $v;
131 131
 		
132
-		if(!empty($k)) $savethese[] = '(\''.$modx->db->escape($k).'\', \''.$modx->db->escape($v).'\')';
133
-	}
132
+        if(!empty($k)) $savethese[] = '(\''.$modx->db->escape($k).'\', \''.$modx->db->escape($v).'\')';
133
+    }
134 134
 	
135
-	// Run a single query to save all the values
136
-	$sql = "REPLACE INTO ".$modx->getFullTableName("system_settings")." (setting_name, setting_value)
135
+    // Run a single query to save all the values
136
+    $sql = "REPLACE INTO ".$modx->getFullTableName("system_settings")." (setting_name, setting_value)
137 137
 		VALUES ".implode(', ', $savethese);
138
-	$modx->db->query($sql);
138
+    $modx->db->query($sql);
139 139
 	
140
-	// Reset Template Pages
141
-	if (isset($data['reset_template'])) {
142
-		$newtemplate = intval($data['default_template']);
143
-		$oldtemplate = intval($data['old_template']);
144
-		$tbl = $modx->getFullTableName('site_content');
145
-		$reset = $data['reset_template'];
146
-		if($reset==1) $modx->db->update(array('template' => $newtemplate), $tbl, "type='document'");
147
-		else if($reset==2) $modx->db->update(array('template' => $newtemplate), $tbl, "template='{$oldtemplate}'");
148
-	}
140
+    // Reset Template Pages
141
+    if (isset($data['reset_template'])) {
142
+        $newtemplate = intval($data['default_template']);
143
+        $oldtemplate = intval($data['old_template']);
144
+        $tbl = $modx->getFullTableName('site_content');
145
+        $reset = $data['reset_template'];
146
+        if($reset==1) $modx->db->update(array('template' => $newtemplate), $tbl, "type='document'");
147
+        else if($reset==2) $modx->db->update(array('template' => $newtemplate), $tbl, "template='{$oldtemplate}'");
148
+    }
149 149
 	
150
-	// empty cache
151
-	$modx->clearCache('full');
150
+    // empty cache
151
+    $modx->clearCache('full');
152 152
 }
153 153
 $header="Location: index.php?a=7&r=10";
154 154
 header($header);
Please login to merge, or discard this patch.
manager/processors/remove_installer.processor.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@
 block discarded – undo
16 16
 $pth = dirname(dirname(dirname(__FILE__)))."/install/";
17 17
 $pth = str_replace("\\","/",$pth);
18 18
 if(isset($_GET["rminstall"])) {
19
-	if(is_dir($pth)) {
20
-		if(!rmdirRecursive($pth)) $msg="An error occured while attempting to remove the install folder";
21
-	}
19
+    if(is_dir($pth)) {
20
+        if(!rmdirRecursive($pth)) $msg="An error occured while attempting to remove the install folder";
21
+    }
22 22
 }
23 23
 if($msg) echo "<script>alert('".addslashes($msg)."');</script>";
24 24
 echo "<script>window.location='../index.php?a=2';</script>";
25 25
 
26 26
 // rmdirRecursive - detects symbollic links on unix
27 27
 function rmdirRecursive($path,$followLinks=false) {   
28
-   $dir = opendir($path) ;
29
-   while ($entry = readdir($dir)) {       
30
-	   if (is_file("$path/$entry") || ((!$followLinks) && is_link("$path/$entry"))) {
31
-		   @unlink( "$path/$entry" );
32
-	   }
33
-	   elseif (is_dir("$path/$entry") && $entry!='.' && $entry!='..') {
34
-		   rmdirRecursive("$path/$entry"); // recursive
35
-	   }
36
-   }
37
-   closedir($dir);
38
-   return @rmdir($path);
28
+    $dir = opendir($path) ;
29
+    while ($entry = readdir($dir)) {       
30
+        if (is_file("$path/$entry") || ((!$followLinks) && is_link("$path/$entry"))) {
31
+            @unlink( "$path/$entry" );
32
+        }
33
+        elseif (is_dir("$path/$entry") && $entry!='.' && $entry!='..') {
34
+            rmdirRecursive("$path/$entry"); // recursive
35
+        }
36
+    }
37
+    closedir($dir);
38
+    return @rmdir($path);
39 39
 }
Please login to merge, or discard this patch.
manager/processors/save_content.processor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -491,7 +491,7 @@
 block discarded – undo
491 491
             }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) {
492 492
             $publishedon = $pub_date;
493 493
             $publishedby = $modx->getLoginUserID();
494
-               }elseif ($was_published && !$published) {
494
+                }elseif ($was_published && !$published) {
495 495
             $publishedon = 0;
496 496
             $publishedby = 0;
497 497
         } else {
Please login to merge, or discard this patch.
manager/processors/empty_table.processor.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 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')) {
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7 7
 $modx->db->truncate($modx->getFullTableName('manager_log'));
Please login to merge, or discard this patch.
manager/processors/delete_module.processor.php 1 patch
Indentation   +8 added lines, -8 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('delete_module')) {
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
 // Set the item name for logger
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 
16 16
 // invoke OnBeforeModFormDelete event
17 17
 $modx->invokeEvent("OnBeforeModFormDelete",
18
-	array(
19
-		"id"	=> $id
20
-	));
18
+    array(
19
+        "id"	=> $id
20
+    ));
21 21
 
22 22
 // delete the module.
23 23
 $modx->db->delete($modx->getFullTableName('site_modules'), "id='{$id}'");
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 
31 31
 // invoke OnModFormDelete event
32 32
 $modx->invokeEvent("OnModFormDelete",
33
-	array(
34
-		"id"	=> $id
35
-	));
33
+    array(
34
+        "id"	=> $id
35
+    ));
36 36
 
37 37
 // empty cache
38 38
 $modx->clearCache('full');
Please login to merge, or discard this patch.
manager/processors/save_password.processor.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  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_password')) {
4
-	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
4
+    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
5 5
 }
6 6
 
7 7
 $id = $_POST['id'];
@@ -9,26 +9,26 @@  discard block
 block discarded – undo
9 9
 $pass2 = $_POST['pass2'];
10 10
 
11 11
 if($pass1!=$pass2){
12
-	$modx->webAlertAndQuit("Passwords don't match!");
12
+    $modx->webAlertAndQuit("Passwords don't match!");
13 13
 }
14 14
 
15 15
 if(strlen($pass1)<6){
16
-	$modx->webAlertAndQuit("Password is too short. Please specify a password of at least 6 characters.");
16
+    $modx->webAlertAndQuit("Password is too short. Please specify a password of at least 6 characters.");
17 17
 }
18 18
 
19 19
     $pass1 = $modx->htmlspecialchars($pass1, ENT_NOQUOTES);
20
-	$tbl_manager_users = $modx->getFullTableName('manager_users');
21
-	$uid = $modx->getLoginUserID();
22
-	$modx->loadExtension('phpass');
23
-	$f['password'] = $modx->phpass->HashPassword($pass1);
24
-	$modx->db->update($f,$tbl_manager_users,"id='{$uid}'");
20
+    $tbl_manager_users = $modx->getFullTableName('manager_users');
21
+    $uid = $modx->getLoginUserID();
22
+    $modx->loadExtension('phpass');
23
+    $f['password'] = $modx->phpass->HashPassword($pass1);
24
+    $modx->db->update($f,$tbl_manager_users,"id='{$uid}'");
25 25
 
26
-	// invoke OnManagerChangePassword event
27
-	$modx->invokeEvent('OnManagerChangePassword', array (
28
-		'userid' => $uid,
29
-		'username' => $_SESSION['mgrShortname'],
30
-		'userpassword' => $pass1
31
-	));
26
+    // invoke OnManagerChangePassword event
27
+    $modx->invokeEvent('OnManagerChangePassword', array (
28
+        'userid' => $uid,
29
+        'username' => $_SESSION['mgrShortname'],
30
+        'userpassword' => $pass1
31
+    ));
32 32
 
33 33
 $header="Location: index.php?a=2";
34 34
 header($header);
Please login to merge, or discard this patch.
manager/processors/delete_htmlsnippet.processor.php 1 patch
Indentation   +8 added lines, -8 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('delete_snippet')) {
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
 // Set the item name for logger
@@ -15,18 +15,18 @@  discard block
 block discarded – undo
15 15
 
16 16
 // invoke OnBeforeChunkFormDelete event
17 17
 $modx->invokeEvent("OnBeforeChunkFormDelete",
18
-	array(
19
-		"id"	=> $id
20
-	));
18
+    array(
19
+        "id"	=> $id
20
+    ));
21 21
 
22 22
 // delete the chunk.
23 23
 $modx->db->delete($modx->getFullTableName('site_htmlsnippets'), "id='{$id}'");
24 24
 
25 25
 // invoke OnChunkFormDelete event
26 26
 $modx->invokeEvent("OnChunkFormDelete",
27
-	array(
28
-		"id"	=> $id
29
-	));
27
+    array(
28
+        "id"	=> $id
29
+    ));
30 30
 
31 31
 // empty cache
32 32
 $modx->clearCache('full');
Please login to merge, or discard this patch.