Completed
Push — develop ( cb7ecf...5e631f )
by Dmytro
17s
created
install/src/controllers/summary.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -248,9 +248,9 @@
 block discarded – undo
248 248
         echo '<span class="notok">' . $_lang['failed'] . '</span></b>' . $_lang['table_prefix_not_exist'] . '</p>';
249 249
         $errors++;
250 250
         echo '<p>' . $_lang['table_prefix_not_exist_note'] . '</p>';
251
-  } else {
251
+    } else {
252 252
         echo '<span class="ok">' . $_lang['ok'] . '</span></p>';
253
-  }
253
+    }
254 254
 }
255 255
 
256 256
 // check mysql version
Please login to merge, or discard this patch.
install/src/sqlParser.class.php 1 patch
Indentation   +122 added lines, -122 removed lines patch added patch discarded remove patch
@@ -4,141 +4,141 @@
 block discarded – undo
4 4
 // SNUFFKIN/ Alex 2004
5 5
 
6 6
 class SqlParser {
7
-	public $host;
8
-	public $dbname;
9
-	public $prefix;
10
-	public $user;
11
-	public $password;
12
-	public $mysqlErrors;
13
-	public $conn;
14
-	public $installFailed;
15
-	public $sitename;
16
-	public $adminname;
17
-	public $adminemail;
18
-	public $adminpass;
19
-	public $managerlanguage;
20
-	public $mode;
21
-	public $fileManagerPath;
22
-	public $imgPath;
23
-	public $imgUrl;
24
-	public $dbMODx;
25
-	public $dbVersion;
7
+    public $host;
8
+    public $dbname;
9
+    public $prefix;
10
+    public $user;
11
+    public $password;
12
+    public $mysqlErrors;
13
+    public $conn;
14
+    public $installFailed;
15
+    public $sitename;
16
+    public $adminname;
17
+    public $adminemail;
18
+    public $adminpass;
19
+    public $managerlanguage;
20
+    public $mode;
21
+    public $fileManagerPath;
22
+    public $imgPath;
23
+    public $imgUrl;
24
+    public $dbMODx;
25
+    public $dbVersion;
26 26
     public $connection_charset;
27 27
     public $connection_method;
28 28
     public $ignoreDuplicateErrors;
29 29
     public $autoTemplateLogic;
30 30
 
31
-	public function __construct($host, $user, $password, $db, $prefix='modx_', $adminname, $adminemail, $adminpass, $connection_charset= 'utf8', $managerlanguage='english', $connection_method = 'SET CHARACTER SET', $auto_template_logic = 'parent') {
32
-		$this->host = $host;
33
-		$this->dbname = $db;
34
-		$this->prefix = $prefix;
35
-		$this->user = $user;
36
-		$this->password = $password;
37
-		$this->adminpass = $adminpass;
38
-		$this->adminname = $adminname;
39
-		$this->adminemail = $adminemail;
40
-		$this->connection_charset = $connection_charset;
41
-		$this->connection_method = $connection_method;
42
-		$this->ignoreDuplicateErrors = false;
43
-		$this->managerlanguage = $managerlanguage;
31
+    public function __construct($host, $user, $password, $db, $prefix='modx_', $adminname, $adminemail, $adminpass, $connection_charset= 'utf8', $managerlanguage='english', $connection_method = 'SET CHARACTER SET', $auto_template_logic = 'parent') {
32
+        $this->host = $host;
33
+        $this->dbname = $db;
34
+        $this->prefix = $prefix;
35
+        $this->user = $user;
36
+        $this->password = $password;
37
+        $this->adminpass = $adminpass;
38
+        $this->adminname = $adminname;
39
+        $this->adminemail = $adminemail;
40
+        $this->connection_charset = $connection_charset;
41
+        $this->connection_method = $connection_method;
42
+        $this->ignoreDuplicateErrors = false;
43
+        $this->managerlanguage = $managerlanguage;
44 44
         $this->autoTemplateLogic = $auto_template_logic;
45
-	}
45
+    }
46 46
 
47
-	public function connect() {
48
-		$this->conn = mysqli_connect($this->host, $this->user, $this->password);
49
-		mysqli_select_db($this->conn, $this->dbname);
50
-		if (function_exists('mysqli_set_charset')) mysqli_set_charset($this->conn, $this->connection_charset);
47
+    public function connect() {
48
+        $this->conn = mysqli_connect($this->host, $this->user, $this->password);
49
+        mysqli_select_db($this->conn, $this->dbname);
50
+        if (function_exists('mysqli_set_charset')) mysqli_set_charset($this->conn, $this->connection_charset);
51 51
 
52
-		$this->dbVersion = 3.23; // assume version 3.23
53
-		if(function_exists("mysqli_get_server_info")) {
54
-			$ver = mysqli_get_server_info($this->conn);
55
-			$this->dbMODx 	 = version_compare($ver,"4.0.2");
56
-			$this->dbVersion = (float) $ver; // Typecasting (float) instead of floatval() [PHP < 4.2]
57
-		}
52
+        $this->dbVersion = 3.23; // assume version 3.23
53
+        if(function_exists("mysqli_get_server_info")) {
54
+            $ver = mysqli_get_server_info($this->conn);
55
+            $this->dbMODx 	 = version_compare($ver,"4.0.2");
56
+            $this->dbVersion = (float) $ver; // Typecasting (float) instead of floatval() [PHP < 4.2]
57
+        }
58 58
 
59 59
         mysqli_query($this->conn,"{$this->connection_method} {$this->connection_charset}");
60
-	}
60
+    }
61 61
 
62 62
     public function process($filename) {
63
-	    global $custom_placeholders;
64
-
65
-		// check to make sure file exists
66
-		if (!file_exists($filename)) {
67
-			$this->mysqlErrors[] = array("error" => "File '$filename' not found");
68
-			$this->installFailed = true ;
69
-			return false;
70
-		}
71
-
72
-		$fh = fopen($filename, 'r');
73
-		$idata = '';
74
-
75
-		while (!feof($fh)) {
76
-			$idata .= fread($fh, 1024);
77
-		}
78
-
79
-		fclose($fh);
80
-		$idata = str_replace("\r", '', $idata);
81
-
82
-		// check if in upgrade mode
83
-		if ($this->mode === 'upd') {
84
-			// remove non-upgradeable parts
85
-			$s = strpos($idata,'non-upgrade-able[[');
86
-			$e = strpos($idata,']]non-upgrade-able') + 17;
87
-			if($s && $e) {
88
-			    $idata = str_replace(substr($idata, $s,$e-$s),' Removed non upgradeable items', $idata);
63
+        global $custom_placeholders;
64
+
65
+        // check to make sure file exists
66
+        if (!file_exists($filename)) {
67
+            $this->mysqlErrors[] = array("error" => "File '$filename' not found");
68
+            $this->installFailed = true ;
69
+            return false;
70
+        }
71
+
72
+        $fh = fopen($filename, 'r');
73
+        $idata = '';
74
+
75
+        while (!feof($fh)) {
76
+            $idata .= fread($fh, 1024);
77
+        }
78
+
79
+        fclose($fh);
80
+        $idata = str_replace("\r", '', $idata);
81
+
82
+        // check if in upgrade mode
83
+        if ($this->mode === 'upd') {
84
+            // remove non-upgradeable parts
85
+            $s = strpos($idata,'non-upgrade-able[[');
86
+            $e = strpos($idata,']]non-upgrade-able') + 17;
87
+            if($s && $e) {
88
+                $idata = str_replace(substr($idata, $s,$e-$s),' Removed non upgradeable items', $idata);
89 89
             }
90
-		}
91
-
92
-		// replace {} tags
93
-		$idata = str_replace('{PREFIX}', $this->prefix, $idata);
94
-		$idata = str_replace('{ADMIN}', $this->adminname, $idata);
95
-		$idata = str_replace('{ADMINEMAIL}', $this->adminemail, $idata);
96
-		$idata = str_replace('{ADMINPASS}', $this->adminpass, $idata);
97
-		$idata = str_replace('{IMAGEPATH}', $this->imgPath, $idata);
98
-		$idata = str_replace('{IMAGEURL}', $this->imgUrl, $idata);
99
-		$idata = str_replace('{FILEMANAGERPATH}', $this->fileManagerPath, $idata);
100
-		$idata = str_replace('{MANAGERLANGUAGE}', $this->managerlanguage, $idata);
101
-		$idata = str_replace('{AUTOTEMPLATELOGIC}', $this->autoTemplateLogic, $idata);
102
-		/*$idata = str_replace('{VERSION}', $modx_version, $idata);*/
103
-
104
-		// Replace custom placeholders
105
-		foreach($custom_placeholders as $key=>$val) {
106
-			if (strpos($idata, '{'.$key.'}') !== false) {
107
-				$idata = str_replace('{'.$key.'}', $val, $idata);
108
-			}
109
-		}
110
-
111
-		$sql_array = explode("\n\n", $idata);
112
-
113
-		$num = 0;
114
-		foreach($sql_array as $sql_entry) {
115
-			$sql_do = trim($sql_entry, "\r\n; ");
116
-
117
-			if (preg_match('/^\#/', $sql_do)) continue;
118
-
119
-			// strip out comments and \n for mysql 3.x
120
-			if ($this->dbVersion <4.0) {
121
-				$sql_do = preg_replace("~COMMENT.*[^']?'.*[^']?'~","",$sql_do);
122
-				$sql_do = str_replace('\r', "", $sql_do);
123
-				$sql_do = str_replace('\n', "", $sql_do);
124
-			}
125
-
126
-
127
-			$num = $num + 1;
128
-			if ($sql_do) mysqli_query($this->conn, $sql_do);
129
-			if(mysqli_error($this->conn)) {
130
-				// Ignore duplicate and drop errors - Raymond
131
-				if ($this->ignoreDuplicateErrors){
132
-					if (mysqli_errno($this->conn) == 1060 || mysqli_errno($this->conn) == 1061 || mysqli_errno($this->conn) == 1062 ||mysqli_errno($this->conn) == 1091) continue;
133
-				}
134
-				// End Ignore duplicate
135
-				$this->mysqlErrors[] = array("error" => mysqli_error($this->conn), "sql" => $sql_do);
136
-				$this->installFailed = true;
137
-			}
138
-		}
139
-	}
90
+        }
91
+
92
+        // replace {} tags
93
+        $idata = str_replace('{PREFIX}', $this->prefix, $idata);
94
+        $idata = str_replace('{ADMIN}', $this->adminname, $idata);
95
+        $idata = str_replace('{ADMINEMAIL}', $this->adminemail, $idata);
96
+        $idata = str_replace('{ADMINPASS}', $this->adminpass, $idata);
97
+        $idata = str_replace('{IMAGEPATH}', $this->imgPath, $idata);
98
+        $idata = str_replace('{IMAGEURL}', $this->imgUrl, $idata);
99
+        $idata = str_replace('{FILEMANAGERPATH}', $this->fileManagerPath, $idata);
100
+        $idata = str_replace('{MANAGERLANGUAGE}', $this->managerlanguage, $idata);
101
+        $idata = str_replace('{AUTOTEMPLATELOGIC}', $this->autoTemplateLogic, $idata);
102
+        /*$idata = str_replace('{VERSION}', $modx_version, $idata);*/
103
+
104
+        // Replace custom placeholders
105
+        foreach($custom_placeholders as $key=>$val) {
106
+            if (strpos($idata, '{'.$key.'}') !== false) {
107
+                $idata = str_replace('{'.$key.'}', $val, $idata);
108
+            }
109
+        }
110
+
111
+        $sql_array = explode("\n\n", $idata);
112
+
113
+        $num = 0;
114
+        foreach($sql_array as $sql_entry) {
115
+            $sql_do = trim($sql_entry, "\r\n; ");
116
+
117
+            if (preg_match('/^\#/', $sql_do)) continue;
118
+
119
+            // strip out comments and \n for mysql 3.x
120
+            if ($this->dbVersion <4.0) {
121
+                $sql_do = preg_replace("~COMMENT.*[^']?'.*[^']?'~","",$sql_do);
122
+                $sql_do = str_replace('\r', "", $sql_do);
123
+                $sql_do = str_replace('\n', "", $sql_do);
124
+            }
125
+
126
+
127
+            $num = $num + 1;
128
+            if ($sql_do) mysqli_query($this->conn, $sql_do);
129
+            if(mysqli_error($this->conn)) {
130
+                // Ignore duplicate and drop errors - Raymond
131
+                if ($this->ignoreDuplicateErrors){
132
+                    if (mysqli_errno($this->conn) == 1060 || mysqli_errno($this->conn) == 1061 || mysqli_errno($this->conn) == 1062 ||mysqli_errno($this->conn) == 1091) continue;
133
+                }
134
+                // End Ignore duplicate
135
+                $this->mysqlErrors[] = array("error" => mysqli_error($this->conn), "sql" => $sql_do);
136
+                $this->installFailed = true;
137
+            }
138
+        }
139
+    }
140 140
 
141 141
     public function close() {
142
-		mysqli_close($this->conn);
143
-	}
142
+        mysqli_close($this->conn);
143
+    }
144 144
 }
Please login to merge, or discard this patch.
manager/actions/mutate_categories.dynamic.php 1 patch
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&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
-	'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&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
+    '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.
manager/processors/duplicate_content.processor.php 1 patch
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.
manager/actions/help/01About_EVO.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 $logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">';
6 6
 $downloadLinks = array(
7
-	0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'),
8
-	1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
-	2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
-	3=>array('title'=>$_lang["extras"],'link'=>array(
11
-		'http://extras.evolution-cms.com/',
12
-		'https://github.com/extras-evolution'
13
-	)),
7
+    0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'),
8
+    1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'),
9
+    2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'),
10
+    3=>array('title'=>$_lang["extras"],'link'=>array(
11
+        'http://extras.evolution-cms.com/',
12
+        'https://github.com/extras-evolution'
13
+    )),
14 14
 );
15 15
 
16 16
 $translationLinks = array(
17
-	0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
-	1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'),
17
+    0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'),
18
+    1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'),
19 19
 );
20 20
 
21 21
 
Please login to merge, or discard this patch.
manager/includes/functions/actions/import.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@
 block discarded – undo
114 114
                 $field['menuindex'] = 1;
115 115
                 $find = false;
116 116
                 foreach (array(
117
-                             'index.html',
118
-                             'index.htm'
119
-                         ) as $filename) {
117
+                                'index.html',
118
+                                'index.htm'
119
+                            ) as $filename) {
120 120
                     $filepath = $filedir . $alias . '/' . $filename;
121 121
                     if ($find === false && file_exists($filepath)) {
122 122
                         $file = getFileContent($filepath);
Please login to merge, or discard this patch.
manager/media/style/default/style.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@  discard block
 block discarded – undo
11 11
 $style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/';
12 12
 $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php';
13 13
 if(!$modx->config['lang_code']) {
14
-	global $modx_lang_attribute;
15
-	$modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute;
14
+    global $modx_lang_attribute;
15
+    $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute;
16 16
 }
17 17
 
18 18
 if(!empty($_GET['a']) && $_GET['a'] == 2) {
19
-	include_once('welcome.php');
19
+    include_once('welcome.php');
20 20
 }
21 21
 
22 22
 // Favicon
@@ -274,66 +274,66 @@  discard block
 block discarded – undo
274 274
 $addnew = 0;
275 275
 $run = 0;
276 276
 switch($action) {
277
-	case '3':
278
-	case '4':
279
-	case '27':
280
-	case '72':
281
-		if($modx->hasPermission('new_document')) {
282
-			$addnew = 1;
283
-		}
284
-		break;
285
-	case '16':
286
-	case '19':
287
-		if($modx->hasPermission('new_template')) {
288
-			$addnew = 1;
289
-		}
290
-		break;
291
-	case '300':
292
-	case '301':
293
-		if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) {
294
-			$addnew = 1;
295
-		}
296
-		break;
297
-	case '77':
298
-	case '78':
299
-		if($modx->hasPermission('new_chunk')) {
300
-			$addnew = 1;
301
-		}
302
-		break;
303
-	case '22':
304
-	case '23':
305
-		if($modx->hasPermission('new_snippet')) {
306
-			$addnew = 1;
307
-		}
308
-		break;
309
-	case '101':
310
-	case '102':
311
-		if($modx->hasPermission('new_plugin')) {
312
-			$addnew = 1;
313
-		}
314
-		break;
315
-	case '106':
316
-	case '107':
317
-	case '108':
318
-		if($modx->hasPermission('new_module')) {
319
-			$addnew = 1;
320
-		}
321
-		if($modx->hasPermission('exec_module')) {
322
-			$run = 1;
323
-		}
324
-		break;
325
-	case '88':
326
-		if($modx->hasPermission('new_web_user')) {
327
-			$addnew = 1;
328
-		}
329
-		break;
277
+    case '3':
278
+    case '4':
279
+    case '27':
280
+    case '72':
281
+        if($modx->hasPermission('new_document')) {
282
+            $addnew = 1;
283
+        }
284
+        break;
285
+    case '16':
286
+    case '19':
287
+        if($modx->hasPermission('new_template')) {
288
+            $addnew = 1;
289
+        }
290
+        break;
291
+    case '300':
292
+    case '301':
293
+        if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) {
294
+            $addnew = 1;
295
+        }
296
+        break;
297
+    case '77':
298
+    case '78':
299
+        if($modx->hasPermission('new_chunk')) {
300
+            $addnew = 1;
301
+        }
302
+        break;
303
+    case '22':
304
+    case '23':
305
+        if($modx->hasPermission('new_snippet')) {
306
+            $addnew = 1;
307
+        }
308
+        break;
309
+    case '101':
310
+    case '102':
311
+        if($modx->hasPermission('new_plugin')) {
312
+            $addnew = 1;
313
+        }
314
+        break;
315
+    case '106':
316
+    case '107':
317
+    case '108':
318
+        if($modx->hasPermission('new_module')) {
319
+            $addnew = 1;
320
+        }
321
+        if($modx->hasPermission('exec_module')) {
322
+            $run = 1;
323
+        }
324
+        break;
325
+    case '88':
326
+        if($modx->hasPermission('new_web_user')) {
327
+            $addnew = 1;
328
+        }
329
+        break;
330 330
 }
331 331
 
332 332
 $disabled = ($action == '19' || $action == '300' || $action == '77' || $action == '23' || $action == '101' || $action == '4' || $action == '72' || $action == '87' || $action == '11' || $action == '107' || $action == '38') ? ' disabled' : '';
333 333
 
334 334
 $_style['actionbuttons'] = array(
335
-	'dynamic' => array(
336
-		'document' => '<div id="actions">
335
+    'dynamic' => array(
336
+        'document' => '<div id="actions">
337 337
 			<div class="btn-group">
338 338
 				<div class="btn-group">
339 339
 					<a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();">
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 						<option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option>
349 349
 					</select>
350 350
 				</div>' .
351
-					($addnew ? '
351
+                    ($addnew ? '
352 352
 					<a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();">
353 353
 						<i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span>
354 354
 					</a>
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 				</a>
365 365
 			</div>
366 366
 		</div>',
367
-		'user' => '<div id="actions">
367
+        'user' => '<div id="actions">
368 368
 			<div class="btn-group">
369 369
 				<div class="btn-group">
370 370
 					<a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();">
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 				</a>
388 388
 			</div>
389 389
 		</div>',
390
-		'element' => '<div id="actions">
390
+        'element' => '<div id="actions">
391 391
 			<div class="btn-group">
392 392
 				<div class="btn-group">
393 393
 					<a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();">
@@ -420,21 +420,21 @@  discard block
 block discarded – undo
420 420
 				' : '') . '
421 421
 			</div>
422 422
 		</div>',
423
-		'newmodule' => ($addnew ? '<div id="actions">
423
+        'newmodule' => ($addnew ? '<div id="actions">
424 424
 			<div class="btn-group">
425 425
 				<a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();">
426 426
 					<i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span>
427 427
 				</a>
428 428
 			</div>
429 429
 		</div>' : ''),
430
-		'close' => '<div id="actions">
430
+        'close' => '<div id="actions">
431 431
 			<div class="btn-group">
432 432
 				<a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();">
433 433
 					<i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span>
434 434
 				</a>
435 435
 			</div>
436 436
 		</div>',
437
-		'save' => '<div id="actions">
437
+        'save' => '<div id="actions">
438 438
 			<div class="btn-group">
439 439
 				<a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();">
440 440
 					<i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span>
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 				</a>
445 445
 			</div>
446 446
 		</div>',
447
-		'savedelete' => '<div id="actions">
447
+        'savedelete' => '<div id="actions">
448 448
 			<div class="btn-group">
449 449
 				<a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();">
450 450
 					<i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span>
@@ -457,14 +457,14 @@  discard block
 block discarded – undo
457 457
 				</a>
458 458
 			</div>
459 459
 		</div>',
460
-		'cancel' => '<div id="actions">
460
+        'cancel' => '<div id="actions">
461 461
 			<div class="btn-group">
462 462
 				<a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();">
463 463
 					<i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span>
464 464
 				</a>
465 465
 			</div>
466 466
 		</div>',
467
-		'canceldelete' => '<div id="actions">
467
+        'canceldelete' => '<div id="actions">
468 468
 			<div class="btn-group">
469 469
 				<a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();">
470 470
 					<i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span>
@@ -474,11 +474,11 @@  discard block
 block discarded – undo
474 474
 				</a>
475 475
 			</div>
476 476
 		</div>',
477
-	),
478
-	'static' => array(
479
-		'document' => '<div id="actions">
477
+    ),
478
+    'static' => array(
479
+        'document' => '<div id="actions">
480 480
 			<div class="btn-group">' .
481
-				($addnew ? '
481
+                ($addnew ? '
482 482
 					<a class="btn btn-secondary" href="javascript:;" onclick="actions.new();">
483 483
 						<i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span>
484 484
 					</a>
@@ -503,12 +503,12 @@  discard block
 block discarded – undo
503 503
 				</a>
504 504
 			</div>
505 505
 		</div>',
506
-		'cancel' => '<div id="actions">
506
+        'cancel' => '<div id="actions">
507 507
 			<div class="btn-group">
508 508
 				<a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();">
509 509
 					<i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span>
510 510
 				</a>
511 511
 			</div>
512 512
 		</div>',
513
-	)
513
+    )
514 514
 );
Please login to merge, or discard this patch.
manager/includes/config_check.inc.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
 
6 6
 // PROCESSOR FIRST
7 7
 if($_SESSION['mgrRole'] == 1) {
8
-	if($_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) {
9
-		$current = $modx->getManagerApi()->getSystemChecksum($modx->config['check_files_onlogin']);
10
-		if(!empty($current)) {
11
-			$modx->getManagerApi()->setSystemChecksum($current);
12
-			$modx->clearCache('full');
13
-			$modx->config['sys_files_checksum'] = $current;
14
-		};
15
-	}
8
+    if($_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) {
9
+        $current = $modx->getManagerApi()->getSystemChecksum($modx->config['check_files_onlogin']);
10
+        if(!empty($current)) {
11
+            $modx->getManagerApi()->setSystemChecksum($current);
12
+            $modx->clearCache('full');
13
+            $modx->config['sys_files_checksum'] = $current;
14
+        };
15
+    }
16 16
 }
17 17
 
18 18
 // NOW CHECK CONFIG
@@ -20,15 +20,15 @@  discard block
 block discarded – undo
20 20
 
21 21
 $sysfiles_check = $modx->getManagerApi()->checkSystemChecksum();
22 22
 if ($sysfiles_check!=='0'){
23
-      $warningspresent = 1;
24
-      $warnings[] = array($_lang['configcheck_sysfiles_mod']);
23
+        $warningspresent = 1;
24
+        $warnings[] = array($_lang['configcheck_sysfiles_mod']);
25 25
 }
26 26
 
27 27
 if (is_writable("includes/config.inc.php")){
28 28
     // Warn if world writable
29 29
     if(@fileperms('includes/config.inc.php') & 0x0002) {
30
-      $warningspresent = 1;
31
-      $warnings[] = array($_lang['configcheck_configinc']);
30
+        $warningspresent = 1;
31
+        $warnings[] = array($_lang['configcheck_configinc']);
32 32
     }
33 33
 }
34 34
 
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
             break;
183 183
         case $_lang['configcheck_sysfiles_mod']:
184 184
             $warnings[$i][1] = $_lang["configcheck_sysfiles_mod_msg"];
185
-			$warnings[$i][2] = '<ul><li>'. implode('</li><li>', $sysfiles_check) .'</li></ul>';
186
-			if($modx->hasPermission('settings')) {
187
-				$warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>';
188
-			}
185
+            $warnings[$i][2] = '<ul><li>'. implode('</li><li>', $sysfiles_check) .'</li></ul>';
186
+            if($modx->hasPermission('settings')) {
187
+                $warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>';
188
+            }
189 189
             if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1]." ".implode(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']);
190 190
             break;
191 191
         case $_lang['configcheck_lang_difference'] :
Please login to merge, or discard this patch.
manager/includes/footer.inc.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3
-	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
3
+    die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 global $SystemAlertMsgQueque;
6 6
 // display system alert window if messages are available
7 7
 if(count($SystemAlertMsgQueque) > 0) {
8
-	include "sysalert.display.inc.php";
8
+    include "sysalert.display.inc.php";
9 9
 }
10 10
 ?>
11 11
 <script type='text/javascript'>
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
 </script>
20 20
 <?php
21 21
 if(in_array($modx->getManagerApi()->action, array(
22
-	85,
23
-	27,
24
-	4,
25
-	72,
26
-	13,
27
-	11,
28
-	12,
29
-	87,
30
-	88
22
+    85,
23
+    27,
24
+    4,
25
+    72,
26
+    13,
27
+    11,
28
+    12,
29
+    87,
30
+    88
31 31
 ))) {
32
-	echo $modx->getManagerApi()->loadDatePicker($modx->config['mgr_date_picker_path']);
32
+    echo $modx->getManagerApi()->loadDatePicker($modx->config['mgr_date_picker_path']);
33 33
 }
34 34
 ?>
35 35
 </body>
Please login to merge, or discard this patch.