Completed
Pull Request — develop (#740)
by Maxim
08:32
created
manager/includes/actionlist.inc.php 1 patch
Indentation   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -5,133 +5,133 @@  discard block
 block discarded – undo
5 5
 
6 6
 // action list
7 7
 $GLOBALS['action_list'] = array(
8
-	'1'	=> 'Loading a frame(set)',
9
-	'2'	=> 'Viewing home page/ online users',
10
-	'3'	=> 'Viewing data for resource',
11
-	'4'	=> 'Creating a resource',
12
-	'5'	=> 'Saving resource',
13
-	'6'	=> 'Deleting resource',
14
-	'7'	=> 'Waiting while MODX cleans up',
15
-	'8'	=> 'Logged out',
16
-	'9'	=> 'Viewing help',
17
-	'10'	=> 'Viewing/ composing messages',
18
-	'11'	=> 'Creating a user',
19
-	'12'	=> 'Editing user',
20
-	'13'	=> 'Viewing logging',
21
-	'14'	=> 'Editing a parser',
22
-	'15'	=> 'Saving a parser',
23
-	'16'	=> 'Editing template',
24
-	'17'	=> 'Editing settings',
25
-	'18'	=> 'Viewing Credits :)',
26
-	'19'	=> 'Creating a new template',
27
-	'20'	=> 'Saving template',
28
-	'21'	=> 'Deleting template',
29
-	'22'	=> 'Editing Snippet',
30
-	'23'	=> 'Creating a new Snippet',
31
-	'24'	=> 'Saving Snippet',
32
-	'25'	=> 'Deleting Snippet',
33
-	'26'	=> 'Refreshing site',
34
-	'27'	=> 'Editing resource',
35
-	'28'	=> 'Changing password',
36
-	'29'	=> 'Error',
37
-	'30'	=> 'Saving settings',
38
-	'31'	=> 'Using file manager',
39
-	'32'	=> 'Saving user',
40
-	'33'	=> 'Deleting user',
41
-	'34'	=> 'Saving new password',
42
-	'35'	=> 'Editing role',
43
-	'36'	=> 'Saving role',
44
-	'37'	=> 'Deleting role',
45
-	'38'	=> 'Creating new role',
46
-	'40'	=> 'Editing Access Permissions',
47
-	'41'	=> 'Editing Access Permissions',
48
-	'42'	=> 'Editing Access Permissions',
49
-	'43'	=> 'Editing Access Permissions',
50
-	'44'	=> 'Editing Access Permissions',
51
-	'45'	=> 'Idle',
52
-	'46'	=> 'Editing Access Permissions',
53
-	'47'	=> 'Editing Access Permissions',
54
-	'48'	=> 'Editing Access Permissions',
55
-	'49'	=> 'Editing Access Permissions',
56
-	'50'	=> 'Editing Access Permissions',
57
-	'51'	=> 'Moving resource',
58
-	'52'	=> 'Moved resource',
59
-	'53'	=> 'Viewing system info',
60
-	'54'	=> 'Optimizing a table',
61
-	'55'	=> 'Empty logs',
62
-	'56'	=> 'Refresh resource tree',
63
-	'57'	=> 'Refresh menu',
64
-	'58'	=> 'Logged in',
65
-	'59'    => 'About MODX',
66
-	'60'	=> 'Emptying Recycle Bin',
67
-	'61'	=> 'Publishing a resource',
68
-	'62'	=> 'Un-publishing a resource',
69
-	'63'	=> 'Un-deleting a resource',
70
-	'64'	=> 'Removing deleted content',
71
-	'65'	=> 'Deleting a message',
72
-	'66'	=> 'Sending a message',
73
-	'67'	=> 'Removing locks',
74
-	'68'	=> 'Viewing site logging',
75
-	'69'	=> 'Viewing online visitors',
76
-	'70'	=> 'Viewing site schedule',
77
-	'71'	=> 'Searching',
78
-	'72'	=> 'Adding a weblink',
79
-	'73'	=> 'Editing a weblink',
80
-		//case "74" : return "Changing personal preferences"; break;
81
-	'75'	=> 'User/ role management',
82
-	'76'	=> 'Element management',
83
-	'77'	=> 'Creating a new Chunk (HTML Snippet)',
84
-	'78'	=> 'Editing Chunk (HTML Snippet)',
85
-	'79'	=> 'Saving Chunk (HTML Snippet)',
86
-	'80'	=> 'Deleting Chunk (HTML Snippet)',
87
-	'83'	=> 'Exporting a resource to HTML',
88
-	'84'	=> 'Load Element Selector',
89
-	'85'	=> 'Create Folder',
90
-	'86'	=> 'Role management',
91
-	'87'	=> 'Create new web user',
92
-	'88'	=> 'Editing web user',
93
-	'89'	=> 'Saving web user',
94
-	'90'	=> 'Deleting web user',
95
-	'91'	=> 'Editing Web Access Permissions',
96
-	'92'	=> 'Editing Access Permissions',
97
-	'93'	=> 'Backup Manager',
98
-	'94'	=> 'Duplicate resource',
99
-	'95'	=> 'Importing resources from HTML',
100
-	'96'	=> 'Duplicate Template',
101
-	'97'	=> 'Duplicate Chunk (HTML Snippet)',
102
-	'98'	=> 'Duplicate Snippet',
103
-	'99'	=> 'Manage Web Users',
104
-	'100'	=> 'Previewing resource',
105
-	'101'	=> 'Create new plugin',
106
-	'102'	=> 'Edit plugin',
107
-	'103'	=> 'Saving plugin',
108
-	'104'	=> 'Delete plugin',
109
-	'105'	=> 'Duplicate plugin',
110
-	'106'	=> 'Viewing Modules',
111
-	'107'	=> 'Create new module',
112
-	'108'	=> 'Edit module',
113
-	'109'	=> 'Saving module',
114
-	'110'	=> 'Delete module',
115
-	'111'	=> 'Duplicate module',
116
-	'112'	=> 'Execute module',
117
-	'113'	=> 'Manage module dependencies',
118
-	'114'	=> 'View event log',
119
-	'115'	=> 'View event log details',
120
-	'116'	=> 'Delete event log',
121
-	'117'   => 'Editing tv rank',
122
-	'118'   => 'Call settings ajax include',
123
-	'119'   => 'Login Fail (Temporary Block)',
8
+    '1'	=> 'Loading a frame(set)',
9
+    '2'	=> 'Viewing home page/ online users',
10
+    '3'	=> 'Viewing data for resource',
11
+    '4'	=> 'Creating a resource',
12
+    '5'	=> 'Saving resource',
13
+    '6'	=> 'Deleting resource',
14
+    '7'	=> 'Waiting while MODX cleans up',
15
+    '8'	=> 'Logged out',
16
+    '9'	=> 'Viewing help',
17
+    '10'	=> 'Viewing/ composing messages',
18
+    '11'	=> 'Creating a user',
19
+    '12'	=> 'Editing user',
20
+    '13'	=> 'Viewing logging',
21
+    '14'	=> 'Editing a parser',
22
+    '15'	=> 'Saving a parser',
23
+    '16'	=> 'Editing template',
24
+    '17'	=> 'Editing settings',
25
+    '18'	=> 'Viewing Credits :)',
26
+    '19'	=> 'Creating a new template',
27
+    '20'	=> 'Saving template',
28
+    '21'	=> 'Deleting template',
29
+    '22'	=> 'Editing Snippet',
30
+    '23'	=> 'Creating a new Snippet',
31
+    '24'	=> 'Saving Snippet',
32
+    '25'	=> 'Deleting Snippet',
33
+    '26'	=> 'Refreshing site',
34
+    '27'	=> 'Editing resource',
35
+    '28'	=> 'Changing password',
36
+    '29'	=> 'Error',
37
+    '30'	=> 'Saving settings',
38
+    '31'	=> 'Using file manager',
39
+    '32'	=> 'Saving user',
40
+    '33'	=> 'Deleting user',
41
+    '34'	=> 'Saving new password',
42
+    '35'	=> 'Editing role',
43
+    '36'	=> 'Saving role',
44
+    '37'	=> 'Deleting role',
45
+    '38'	=> 'Creating new role',
46
+    '40'	=> 'Editing Access Permissions',
47
+    '41'	=> 'Editing Access Permissions',
48
+    '42'	=> 'Editing Access Permissions',
49
+    '43'	=> 'Editing Access Permissions',
50
+    '44'	=> 'Editing Access Permissions',
51
+    '45'	=> 'Idle',
52
+    '46'	=> 'Editing Access Permissions',
53
+    '47'	=> 'Editing Access Permissions',
54
+    '48'	=> 'Editing Access Permissions',
55
+    '49'	=> 'Editing Access Permissions',
56
+    '50'	=> 'Editing Access Permissions',
57
+    '51'	=> 'Moving resource',
58
+    '52'	=> 'Moved resource',
59
+    '53'	=> 'Viewing system info',
60
+    '54'	=> 'Optimizing a table',
61
+    '55'	=> 'Empty logs',
62
+    '56'	=> 'Refresh resource tree',
63
+    '57'	=> 'Refresh menu',
64
+    '58'	=> 'Logged in',
65
+    '59'    => 'About MODX',
66
+    '60'	=> 'Emptying Recycle Bin',
67
+    '61'	=> 'Publishing a resource',
68
+    '62'	=> 'Un-publishing a resource',
69
+    '63'	=> 'Un-deleting a resource',
70
+    '64'	=> 'Removing deleted content',
71
+    '65'	=> 'Deleting a message',
72
+    '66'	=> 'Sending a message',
73
+    '67'	=> 'Removing locks',
74
+    '68'	=> 'Viewing site logging',
75
+    '69'	=> 'Viewing online visitors',
76
+    '70'	=> 'Viewing site schedule',
77
+    '71'	=> 'Searching',
78
+    '72'	=> 'Adding a weblink',
79
+    '73'	=> 'Editing a weblink',
80
+        //case "74" : return "Changing personal preferences"; break;
81
+    '75'	=> 'User/ role management',
82
+    '76'	=> 'Element management',
83
+    '77'	=> 'Creating a new Chunk (HTML Snippet)',
84
+    '78'	=> 'Editing Chunk (HTML Snippet)',
85
+    '79'	=> 'Saving Chunk (HTML Snippet)',
86
+    '80'	=> 'Deleting Chunk (HTML Snippet)',
87
+    '83'	=> 'Exporting a resource to HTML',
88
+    '84'	=> 'Load Element Selector',
89
+    '85'	=> 'Create Folder',
90
+    '86'	=> 'Role management',
91
+    '87'	=> 'Create new web user',
92
+    '88'	=> 'Editing web user',
93
+    '89'	=> 'Saving web user',
94
+    '90'	=> 'Deleting web user',
95
+    '91'	=> 'Editing Web Access Permissions',
96
+    '92'	=> 'Editing Access Permissions',
97
+    '93'	=> 'Backup Manager',
98
+    '94'	=> 'Duplicate resource',
99
+    '95'	=> 'Importing resources from HTML',
100
+    '96'	=> 'Duplicate Template',
101
+    '97'	=> 'Duplicate Chunk (HTML Snippet)',
102
+    '98'	=> 'Duplicate Snippet',
103
+    '99'	=> 'Manage Web Users',
104
+    '100'	=> 'Previewing resource',
105
+    '101'	=> 'Create new plugin',
106
+    '102'	=> 'Edit plugin',
107
+    '103'	=> 'Saving plugin',
108
+    '104'	=> 'Delete plugin',
109
+    '105'	=> 'Duplicate plugin',
110
+    '106'	=> 'Viewing Modules',
111
+    '107'	=> 'Create new module',
112
+    '108'	=> 'Edit module',
113
+    '109'	=> 'Saving module',
114
+    '110'	=> 'Delete module',
115
+    '111'	=> 'Duplicate module',
116
+    '112'	=> 'Execute module',
117
+    '113'	=> 'Manage module dependencies',
118
+    '114'	=> 'View event log',
119
+    '115'	=> 'View event log details',
120
+    '116'	=> 'Delete event log',
121
+    '117'   => 'Editing tv rank',
122
+    '118'   => 'Call settings ajax include',
123
+    '119'   => 'Login Fail (Temporary Block)',
124 124
 
125
-	'300'	=> 'Create Template Variable',
126
-	'301'	=> 'Edit Template Variable',
127
-	'302'	=> 'Save Template Variable',
128
-	'303'	=> 'Delete Template Variable',
129
-	'304'	=> 'Duplicate Template Variable',
125
+    '300'	=> 'Create Template Variable',
126
+    '301'	=> 'Edit Template Variable',
127
+    '302'	=> 'Save Template Variable',
128
+    '303'	=> 'Delete Template Variable',
129
+    '304'	=> 'Duplicate Template Variable',
130 130
 
131
-	'200'	=> 'Viewing phpInfo()',
132
-	'501'   => 'Delete category',
133
-	'998'	=> 'Viewing web page',
134
-	'999'	=> 'Viewing test page',
131
+    '200'	=> 'Viewing phpInfo()',
132
+    '501'   => 'Delete category',
133
+    '998'	=> 'Viewing web page',
134
+    '999'	=> 'Viewing test page',
135 135
 );
136 136
 
137 137
 /**
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
  * @return string
141 141
  */
142 142
 function getAction($actionId, $itemid='') {
143
-	global $action_list;
143
+    global $action_list;
144 144
 
145
-	$ret = sprintf($action_list[$actionId], $itemid);
146
-	if (!$ret) $ret = "Idle (unknown)";
145
+    $ret = sprintf($action_list[$actionId], $itemid);
146
+    if (!$ret) $ret = "Idle (unknown)";
147 147
 
148
-	return $ret;
148
+    return $ret;
149 149
 }
Please login to merge, or discard this patch.
manager/media/script/air-datepicker/datepicker.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
         $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl');
10 10
         if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode();
11
-		$modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
11
+        $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy';
12 12
         return $modx->mergeSettingsContent($load_script);
13 13
     }
14 14
 
Please login to merge, or discard this patch.
manager/media/calendar/datepicker.inc.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class DATEPICKER {
4
-	function __construct() {
5
-	}
4
+    function __construct() {
5
+    }
6 6
 
7
-	function getDP() {
8
-		$modx = evolutionCMS(); global $_lang;
7
+    function getDP() {
8
+        $modx = evolutionCMS(); global $_lang;
9 9
 
10
-		$tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
11
-		return $modx->parseText($tpl, $_lang, '[%', '%]');
12
-	}
10
+        $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl');
11
+        return $modx->parseText($tpl, $_lang, '[%', '%]');
12
+    }
13 13
 }
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
@@ -492,7 +492,7 @@
 block discarded – undo
492 492
                 }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) {
493 493
                 $publishedon = $pub_date;
494 494
                 $publishedby = $modx->getLoginUserID();
495
-                   }elseif ($was_published && !$published) {
495
+                    }elseif ($was_published && !$published) {
496 496
                 $publishedon = 0;
497 497
                 $publishedby = 0;
498 498
             } else {
Please login to merge, or discard this patch.
manager/includes/accesscontrol.inc.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,19 +102,19 @@
 block discarded – undo
102 102
     $modx->setPlaceholder('login_form_position_class', 'loginbox-' . $modx->config['login_form_position']);
103 103
     
104 104
     switch ($modx->config['manager_theme_mode']) {
105
-      case '1':
105
+        case '1':
106 106
         $modx->setPlaceholder('manager_theme_style', 'lightness');
107 107
         break;
108
-      case '2':
108
+        case '2':
109 109
         $modx->setPlaceholder('manager_theme_style', 'light');
110 110
         break;
111
-      case '3':
111
+        case '3':
112 112
         $modx->setPlaceholder('manager_theme_style', 'dark');
113 113
         break;
114
-      case '4':
114
+        case '4':
115 115
         $modx->setPlaceholder('manager_theme_style', 'darkness');
116 116
         break;
117
-	}
117
+    }
118 118
 
119 119
     // andrazk 20070416 - notify user of install/update
120 120
     if (isset($_GET['installGoingOn'])) {
Please login to merge, or discard this patch.
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.