@@ -170,70 +170,70 @@ |
||
170 | 170 | array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false |
171 | 171 | ); |
172 | 172 | } |
173 | - if (intval($params['shareparams']) || !empty($params['dependencies'])) { |
|
174 | - $dependencies = explode(',', $params['dependencies']); |
|
175 | - foreach ($dependencies as $dependency) { |
|
176 | - $dependency = explode(':', $dependency); |
|
177 | - switch (trim($dependency[0])) { |
|
178 | - case 'template': |
|
179 | - $mdp[] = array( |
|
180 | - 'module' => $params['name'], |
|
181 | - 'table' => 'templates', |
|
182 | - 'column' => 'templatename', |
|
183 | - 'type' => 50, |
|
184 | - 'name' => trim($dependency[1]) |
|
185 | - ); |
|
186 | - break; |
|
187 | - case 'tv': |
|
188 | - case 'tmplvar': |
|
189 | - $mdp[] = array( |
|
190 | - 'module' => $params['name'], |
|
191 | - 'table' => 'tmplvars', |
|
192 | - 'column' => 'name', |
|
193 | - 'type' => 60, |
|
194 | - 'name' => trim($dependency[1]) |
|
195 | - ); |
|
196 | - break; |
|
197 | - case 'chunk': |
|
198 | - case 'htmlsnippet': |
|
199 | - $mdp[] = array( |
|
200 | - 'module' => $params['name'], |
|
201 | - 'table' => 'htmlsnippets', |
|
202 | - 'column' => 'name', |
|
203 | - 'type' => 10, |
|
204 | - 'name' => trim($dependency[1]) |
|
205 | - ); |
|
206 | - break; |
|
207 | - case 'snippet': |
|
208 | - $mdp[] = array( |
|
209 | - 'module' => $params['name'], |
|
210 | - 'table' => 'snippets', |
|
211 | - 'column' => 'name', |
|
212 | - 'type' => 40, |
|
213 | - 'name' => trim($dependency[1]) |
|
214 | - ); |
|
215 | - break; |
|
216 | - case 'plugin': |
|
217 | - $mdp[] = array( |
|
218 | - 'module' => $params['name'], |
|
219 | - 'table' => 'plugins', |
|
220 | - 'column' => 'name', |
|
221 | - 'type' => 30, |
|
222 | - 'name' => trim($dependency[1]) |
|
223 | - ); |
|
224 | - break; |
|
225 | - case 'resource': |
|
226 | - $mdp[] = array( |
|
227 | - 'module' => $params['name'], |
|
228 | - 'table' => 'content', |
|
229 | - 'column' => 'pagetitle', |
|
230 | - 'type' => 20, |
|
231 | - 'name' => trim($dependency[1]) |
|
232 | - ); |
|
233 | - break; |
|
234 | - } |
|
235 | - } |
|
236 | - } |
|
173 | + if (intval($params['shareparams']) || !empty($params['dependencies'])) { |
|
174 | + $dependencies = explode(',', $params['dependencies']); |
|
175 | + foreach ($dependencies as $dependency) { |
|
176 | + $dependency = explode(':', $dependency); |
|
177 | + switch (trim($dependency[0])) { |
|
178 | + case 'template': |
|
179 | + $mdp[] = array( |
|
180 | + 'module' => $params['name'], |
|
181 | + 'table' => 'templates', |
|
182 | + 'column' => 'templatename', |
|
183 | + 'type' => 50, |
|
184 | + 'name' => trim($dependency[1]) |
|
185 | + ); |
|
186 | + break; |
|
187 | + case 'tv': |
|
188 | + case 'tmplvar': |
|
189 | + $mdp[] = array( |
|
190 | + 'module' => $params['name'], |
|
191 | + 'table' => 'tmplvars', |
|
192 | + 'column' => 'name', |
|
193 | + 'type' => 60, |
|
194 | + 'name' => trim($dependency[1]) |
|
195 | + ); |
|
196 | + break; |
|
197 | + case 'chunk': |
|
198 | + case 'htmlsnippet': |
|
199 | + $mdp[] = array( |
|
200 | + 'module' => $params['name'], |
|
201 | + 'table' => 'htmlsnippets', |
|
202 | + 'column' => 'name', |
|
203 | + 'type' => 10, |
|
204 | + 'name' => trim($dependency[1]) |
|
205 | + ); |
|
206 | + break; |
|
207 | + case 'snippet': |
|
208 | + $mdp[] = array( |
|
209 | + 'module' => $params['name'], |
|
210 | + 'table' => 'snippets', |
|
211 | + 'column' => 'name', |
|
212 | + 'type' => 40, |
|
213 | + 'name' => trim($dependency[1]) |
|
214 | + ); |
|
215 | + break; |
|
216 | + case 'plugin': |
|
217 | + $mdp[] = array( |
|
218 | + 'module' => $params['name'], |
|
219 | + 'table' => 'plugins', |
|
220 | + 'column' => 'name', |
|
221 | + 'type' => 30, |
|
222 | + 'name' => trim($dependency[1]) |
|
223 | + ); |
|
224 | + break; |
|
225 | + case 'resource': |
|
226 | + $mdp[] = array( |
|
227 | + 'module' => $params['name'], |
|
228 | + 'table' => 'content', |
|
229 | + 'column' => 'pagetitle', |
|
230 | + 'type' => 20, |
|
231 | + 'name' => trim($dependency[1]) |
|
232 | + ); |
|
233 | + break; |
|
234 | + } |
|
235 | + } |
|
236 | + } |
|
237 | 237 | } |
238 | 238 | $d->close(); |
239 | 239 | } |
@@ -1,33 +1,32 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | //:: EVO Installer Setup file |
3 | 3 | //::::::::::::::::::::::::::::::::::::::::: |
4 | -if (is_file($base_path . 'assets/cache/siteManager.php')) { |
|
5 | - include_once($base_path . 'assets/cache/siteManager.php'); |
|
4 | +if (is_file($base_path.'assets/cache/siteManager.php')) { |
|
5 | + include_once($base_path.'assets/cache/siteManager.php'); |
|
6 | 6 | } |
7 | -if(!defined('MGR_DIR')) define('MGR_DIR', 'manager'); |
|
7 | +if (!defined('MGR_DIR')) define('MGR_DIR', 'manager'); |
|
8 | 8 | |
9 | 9 | require_once('../'.MGR_DIR.'/includes/version.inc.php'); |
10 | 10 | |
11 | -$chunkPath = $base_path .'install/assets/chunks'; |
|
12 | -$snippetPath = $base_path .'install/assets/snippets'; |
|
13 | -$pluginPath = $base_path .'install/assets/plugins'; |
|
14 | -$modulePath = $base_path .'install/assets/modules'; |
|
15 | -$templatePath = $base_path .'install/assets/templates'; |
|
16 | -$tvPath = $base_path .'install/assets/tvs'; |
|
11 | +$chunkPath = $base_path.'install/assets/chunks'; |
|
12 | +$snippetPath = $base_path.'install/assets/snippets'; |
|
13 | +$pluginPath = $base_path.'install/assets/plugins'; |
|
14 | +$modulePath = $base_path.'install/assets/modules'; |
|
15 | +$templatePath = $base_path.'install/assets/templates'; |
|
16 | +$tvPath = $base_path.'install/assets/tvs'; |
|
17 | 17 | |
18 | 18 | // setup Template template files - array : name, description, type - 0:file or 1:content, parameters, category |
19 | 19 | $mt = &$moduleTemplates; |
20 | -if(is_dir($templatePath) && is_readable($templatePath)) { |
|
20 | +if (is_dir($templatePath) && is_readable($templatePath)) { |
|
21 | 21 | $d = dir($templatePath); |
22 | 22 | while (false !== ($tplfile = $d->read())) |
23 | 23 | { |
24 | - if(substr($tplfile, -4) != '.tpl') continue; |
|
24 | + if (substr($tplfile, -4) != '.tpl') continue; |
|
25 | 25 | $params = parse_docblock($templatePath, $tplfile); |
26 | - if(is_array($params) && (count($params)>0)) |
|
26 | + if (is_array($params) && (count($params) > 0)) |
|
27 | 27 | { |
28 | 28 | $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}"; |
29 | - $mt[] = array |
|
30 | - ( |
|
29 | + $mt[] = array( |
|
31 | 30 | $params['name'], |
32 | 31 | $description, |
33 | 32 | // Don't think this is gonna be used ... but adding it just in case 'type' |
@@ -45,12 +44,12 @@ discard block |
||
45 | 44 | |
46 | 45 | // setup Template Variable template files |
47 | 46 | $mtv = &$moduleTVs; |
48 | -if(is_dir($tvPath) && is_readable($tvPath)) { |
|
47 | +if (is_dir($tvPath) && is_readable($tvPath)) { |
|
49 | 48 | $d = dir($tvPath); |
50 | 49 | while (false !== ($tplfile = $d->read())) { |
51 | - if(substr($tplfile, -4) != '.tpl') continue; |
|
50 | + if (substr($tplfile, -4) != '.tpl') continue; |
|
52 | 51 | $params = parse_docblock($tvPath, $tplfile); |
53 | - if(is_array($params) && (count($params)>0)) { |
|
52 | + if (is_array($params) && (count($params) > 0)) { |
|
54 | 53 | $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}"; |
55 | 54 | $mtv[] = array( |
56 | 55 | $params['name'], |
@@ -62,9 +61,9 @@ discard block |
||
62 | 61 | $params['output_widget'], |
63 | 62 | $params['output_widget_params'], |
64 | 63 | "$templatePath/{$params['filename']}", /* not currently used */ |
65 | - $params['template_assignments']!="*"?$params['template_assignments']:implode(",",array_map(create_function('$v','return $v[0];'),$mt)), /* comma-separated list of template names */ |
|
64 | + $params['template_assignments'] != "*" ? $params['template_assignments'] : implode(",", array_map(create_function('$v', 'return $v[0];'), $mt)), /* comma-separated list of template names */ |
|
66 | 65 | $params['modx_category'], |
67 | - $params['lock_tv'], /* value should be 1 or 0 */ |
|
66 | + $params['lock_tv'], /* value should be 1 or 0 */ |
|
68 | 67 | array_key_exists('installset', $params) ? preg_split("/\s*,\s*/", $params['installset']) : false |
69 | 68 | ); |
70 | 69 | } |
@@ -74,14 +73,14 @@ discard block |
||
74 | 73 | |
75 | 74 | // setup chunks template files - array : name, description, type - 0:file or 1:content, file or content |
76 | 75 | $mc = &$moduleChunks; |
77 | -if(is_dir($chunkPath) && is_readable($chunkPath)) { |
|
76 | +if (is_dir($chunkPath) && is_readable($chunkPath)) { |
|
78 | 77 | $d = dir($chunkPath); |
79 | 78 | while (false !== ($tplfile = $d->read())) { |
80 | - if(substr($tplfile, -4) != '.tpl') { |
|
79 | + if (substr($tplfile, -4) != '.tpl') { |
|
81 | 80 | continue; |
82 | 81 | } |
83 | 82 | $params = parse_docblock($chunkPath, $tplfile); |
84 | - if(is_array($params) && count($params) > 0) { |
|
83 | + if (is_array($params) && count($params) > 0) { |
|
85 | 84 | $mc[] = array( |
86 | 85 | $params['name'], |
87 | 86 | $params['description'], |
@@ -97,14 +96,14 @@ discard block |
||
97 | 96 | |
98 | 97 | // setup snippets template files - array : name, description, type - 0:file or 1:content, file or content,properties |
99 | 98 | $ms = &$moduleSnippets; |
100 | -if(is_dir($snippetPath) && is_readable($snippetPath)) { |
|
99 | +if (is_dir($snippetPath) && is_readable($snippetPath)) { |
|
101 | 100 | $d = dir($snippetPath); |
102 | 101 | while (false !== ($tplfile = $d->read())) { |
103 | - if(substr($tplfile, -4) != '.tpl') { |
|
102 | + if (substr($tplfile, -4) != '.tpl') { |
|
104 | 103 | continue; |
105 | 104 | } |
106 | 105 | $params = parse_docblock($snippetPath, $tplfile); |
107 | - if(is_array($params) && count($params) > 0) { |
|
106 | + if (is_array($params) && count($params) > 0) { |
|
108 | 107 | $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}"; |
109 | 108 | $ms[] = array( |
110 | 109 | $params['name'], |
@@ -121,14 +120,14 @@ discard block |
||
121 | 120 | |
122 | 121 | // setup plugins template files - array : name, description, type - 0:file or 1:content, file or content,properties |
123 | 122 | $mp = &$modulePlugins; |
124 | -if(is_dir($pluginPath) && is_readable($pluginPath)) { |
|
123 | +if (is_dir($pluginPath) && is_readable($pluginPath)) { |
|
125 | 124 | $d = dir($pluginPath); |
126 | 125 | while (false !== ($tplfile = $d->read())) { |
127 | - if(substr($tplfile, -4) != '.tpl') { |
|
126 | + if (substr($tplfile, -4) != '.tpl') { |
|
128 | 127 | continue; |
129 | 128 | } |
130 | 129 | $params = parse_docblock($pluginPath, $tplfile); |
131 | - if(is_array($params) && count($params) > 0) { |
|
130 | + if (is_array($params) && count($params) > 0) { |
|
132 | 131 | $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}"; |
133 | 132 | $mp[] = array( |
134 | 133 | $params['name'], |
@@ -150,14 +149,14 @@ discard block |
||
150 | 149 | // setup modules - array : name, description, type - 0:file or 1:content, file or content,properties, guid,enable_sharedparams |
151 | 150 | $mm = &$moduleModules; |
152 | 151 | $mdp = &$moduleDependencies; |
153 | -if(is_dir($modulePath) && is_readable($modulePath)) { |
|
152 | +if (is_dir($modulePath) && is_readable($modulePath)) { |
|
154 | 153 | $d = dir($modulePath); |
155 | 154 | while (false !== ($tplfile = $d->read())) { |
156 | - if(substr($tplfile, -4) != '.tpl') { |
|
155 | + if (substr($tplfile, -4) != '.tpl') { |
|
157 | 156 | continue; |
158 | 157 | } |
159 | 158 | $params = parse_docblock($modulePath, $tplfile); |
160 | - if(is_array($params) && count($params) > 0) { |
|
159 | + if (is_array($params) && count($params) > 0) { |
|
161 | 160 | $description = empty($params['version']) ? $params['description'] : "<strong>{$params['version']}</strong> {$params['description']}"; |
162 | 161 | $mm[] = array( |
163 | 162 | $params['name'], |
@@ -241,103 +240,103 @@ discard block |
||
241 | 240 | // setup callback function |
242 | 241 | $callBackFnc = "clean_up"; |
243 | 242 | |
244 | -function clean_up($sqlParser) { |
|
243 | +function clean_up($sqlParser){ |
|
245 | 244 | $ids = array(); |
246 | 245 | |
247 | 246 | // secure web documents - privateweb |
248 | - mysqli_query($sqlParser->conn,"UPDATE `".$sqlParser->prefix."site_content` SET privateweb = 0 WHERE privateweb = 1"); |
|
249 | - $sql = "SELECT DISTINCT sc.id |
|
247 | + mysqli_query($sqlParser->conn, "UPDATE `".$sqlParser->prefix."site_content` SET privateweb = 0 WHERE privateweb = 1"); |
|
248 | + $sql = "SELECT DISTINCT sc.id |
|
250 | 249 | FROM `".$sqlParser->prefix."site_content` sc |
251 | 250 | LEFT JOIN `".$sqlParser->prefix."document_groups` dg ON dg.document = sc.id |
252 | 251 | LEFT JOIN `".$sqlParser->prefix."webgroup_access` wga ON wga.documentgroup = dg.document_group |
253 | 252 | WHERE wga.id>0"; |
254 | - $ds = mysqli_query($sqlParser->conn,$sql); |
|
255 | - if(!$ds) { |
|
253 | + $ds = mysqli_query($sqlParser->conn, $sql); |
|
254 | + if (!$ds) { |
|
256 | 255 | echo "An error occurred while executing a query: ".mysqli_error($sqlParser->conn); |
257 | 256 | } |
258 | 257 | else { |
259 | - while($r = mysqli_fetch_assoc($ds)) $ids[]=$r["id"]; |
|
260 | - if(count($ids)>0) { |
|
261 | - mysqli_query($sqlParser->conn,"UPDATE `".$sqlParser->prefix."site_content` SET privateweb = 1 WHERE id IN (".implode(", ",$ids).")"); |
|
258 | + while ($r = mysqli_fetch_assoc($ds)) $ids[] = $r["id"]; |
|
259 | + if (count($ids) > 0) { |
|
260 | + mysqli_query($sqlParser->conn, "UPDATE `".$sqlParser->prefix."site_content` SET privateweb = 1 WHERE id IN (".implode(", ", $ids).")"); |
|
262 | 261 | unset($ids); |
263 | 262 | } |
264 | 263 | } |
265 | 264 | |
266 | 265 | // secure manager documents privatemgr |
267 | - mysqli_query($sqlParser->conn,"UPDATE `".$sqlParser->prefix."site_content` SET privatemgr = 0 WHERE privatemgr = 1"); |
|
268 | - $sql = "SELECT DISTINCT sc.id |
|
266 | + mysqli_query($sqlParser->conn, "UPDATE `".$sqlParser->prefix."site_content` SET privatemgr = 0 WHERE privatemgr = 1"); |
|
267 | + $sql = "SELECT DISTINCT sc.id |
|
269 | 268 | FROM `".$sqlParser->prefix."site_content` sc |
270 | 269 | LEFT JOIN `".$sqlParser->prefix."document_groups` dg ON dg.document = sc.id |
271 | 270 | LEFT JOIN `".$sqlParser->prefix."membergroup_access` mga ON mga.documentgroup = dg.document_group |
272 | 271 | WHERE mga.id>0"; |
273 | - $ds = mysqli_query($sqlParser->conn,$sql); |
|
274 | - if(!$ds) { |
|
272 | + $ds = mysqli_query($sqlParser->conn, $sql); |
|
273 | + if (!$ds) { |
|
275 | 274 | echo "An error occurred while executing a query: ".mysqli_error($sqlParser->conn); |
276 | 275 | } |
277 | 276 | else { |
278 | - while($r = mysqli_fetch_assoc($ds)) $ids[]=$r["id"]; |
|
279 | - if(count($ids)>0) { |
|
280 | - mysqli_query($sqlParser->conn,"UPDATE `".$sqlParser->prefix."site_content` SET privatemgr = 1 WHERE id IN (".implode(", ",$ids).")"); |
|
277 | + while ($r = mysqli_fetch_assoc($ds)) $ids[] = $r["id"]; |
|
278 | + if (count($ids) > 0) { |
|
279 | + mysqli_query($sqlParser->conn, "UPDATE `".$sqlParser->prefix."site_content` SET privatemgr = 1 WHERE id IN (".implode(", ", $ids).")"); |
|
281 | 280 | unset($ids); |
282 | 281 | } |
283 | 282 | } |
284 | 283 | } |
285 | 284 | |
286 | -function parse_docblock($element_dir, $filename) { |
|
285 | +function parse_docblock($element_dir, $filename){ |
|
287 | 286 | $params = array(); |
288 | - $fullpath = $element_dir . '/' . $filename; |
|
289 | - if(is_readable($fullpath)) { |
|
287 | + $fullpath = $element_dir.'/'.$filename; |
|
288 | + if (is_readable($fullpath)) { |
|
290 | 289 | $tpl = @fopen($fullpath, "r"); |
291 | - if($tpl) { |
|
290 | + if ($tpl) { |
|
292 | 291 | $params['filename'] = $filename; |
293 | 292 | $docblock_start_found = false; |
294 | 293 | $name_found = false; |
295 | 294 | $description_found = false; |
296 | 295 | |
297 | - while(!feof($tpl)) { |
|
296 | + while (!feof($tpl)) { |
|
298 | 297 | $line = fgets($tpl); |
299 | - if(!$docblock_start_found) { |
|
298 | + if (!$docblock_start_found) { |
|
300 | 299 | // find docblock start |
301 | - if(strpos($line, '/**') !== false) { |
|
300 | + if (strpos($line, '/**') !== false) { |
|
302 | 301 | $docblock_start_found = true; |
303 | 302 | } |
304 | 303 | continue; |
305 | - } elseif(!$name_found) { |
|
304 | + } elseif (!$name_found) { |
|
306 | 305 | // find name |
307 | 306 | $ma = null; |
308 | - if(preg_match("/^\s+\*\s+(.+)/", $line, $ma)) { |
|
307 | + if (preg_match("/^\s+\*\s+(.+)/", $line, $ma)) { |
|
309 | 308 | $params['name'] = trim($ma[1]); |
310 | 309 | $name_found = !empty($params['name']); |
311 | 310 | } |
312 | 311 | continue; |
313 | - } elseif(!$description_found) { |
|
312 | + } elseif (!$description_found) { |
|
314 | 313 | // find description |
315 | 314 | $ma = null; |
316 | - if(preg_match("/^\s+\*\s+(.+)/", $line, $ma)) { |
|
315 | + if (preg_match("/^\s+\*\s+(.+)/", $line, $ma)) { |
|
317 | 316 | $params['description'] = trim($ma[1]); |
318 | 317 | $description_found = !empty($params['description']); |
319 | 318 | } |
320 | 319 | continue; |
321 | 320 | } else { |
322 | 321 | $ma = null; |
323 | - if(preg_match("/^\s+\*\s+\@([^\s]+)\s+(.+)/", $line, $ma)) { |
|
322 | + if (preg_match("/^\s+\*\s+\@([^\s]+)\s+(.+)/", $line, $ma)) { |
|
324 | 323 | $param = trim($ma[1]); |
325 | 324 | $val = trim($ma[2]); |
326 | - if(!empty($param) && !empty($val)) { |
|
327 | - if($param == 'internal') { |
|
325 | + if (!empty($param) && !empty($val)) { |
|
326 | + if ($param == 'internal') { |
|
328 | 327 | $ma = null; |
329 | - if(preg_match("/\@([^\s]+)\s+(.+)/", $val, $ma)) { |
|
328 | + if (preg_match("/\@([^\s]+)\s+(.+)/", $val, $ma)) { |
|
330 | 329 | $param = trim($ma[1]); |
331 | 330 | $val = trim($ma[2]); |
332 | 331 | } |
333 | 332 | //if($val !== '0' && (empty($param) || empty($val))) { |
334 | - if(empty($param)) { |
|
333 | + if (empty($param)) { |
|
335 | 334 | continue; |
336 | 335 | } |
337 | 336 | } |
338 | 337 | $params[$param] = $val; |
339 | 338 | } |
340 | - } elseif(preg_match("/^\s*\*\/\s*$/", $line)) { |
|
339 | + } elseif (preg_match("/^\s*\*\/\s*$/", $line)) { |
|
341 | 340 | break; |
342 | 341 | } |
343 | 342 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <form name="install" id="install_form" action="index.php?action=options" method="post"> |
21 | 21 | <?php |
22 | 22 | if ($errors == 0) { |
23 | - // check if install folder is removeable |
|
23 | + // check if install folder is removeable |
|
24 | 24 | if (is_writable("../install")) { ?> |
25 | 25 | <span id="removeinstall" style="float:left;cursor:pointer;color:#505050;line-height:18px;" onclick="var chk=document.install.rminstaller; if(chk) chk.checked=!chk.checked;"><input type="checkbox" name="rminstaller" onclick="event.cancelBubble=true;" <?php echo (empty ($errors) ? 'checked="checked"' : '') ?> style="cursor:default;" /><?php echo $_lang['remove_install_folder_auto'] ?></span> |
26 | 26 | <?php |
@@ -43,10 +43,10 @@ |
||
43 | 43 | var chk = document.install.rminstaller; |
44 | 44 | if(chk && chk.checked) { |
45 | 45 | // remove install folder and files |
46 | - window.location.href = "../<?php echo MGR_DIR;?>/processors/remove_installer.processor.php?rminstall=1"; |
|
46 | + window.location.href = "../<?php echo MGR_DIR; ?>/processors/remove_installer.processor.php?rminstall=1"; |
|
47 | 47 | } |
48 | 48 | else { |
49 | - window.location.href = "../<?php echo MGR_DIR;?>/"; |
|
49 | + window.location.href = "../<?php echo MGR_DIR; ?>/"; |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | /* ]]> */ |
@@ -8,10 +8,10 @@ |
||
8 | 8 | $self = 'install/connection.databasetest.php'; |
9 | 9 | $base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
10 | 10 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
11 | - include_once("{$base_path}assets/cache/siteManager.php"); |
|
11 | + include_once("{$base_path}assets/cache/siteManager.php"); |
|
12 | 12 | } |
13 | 13 | if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
14 | - define('MGR_DIR','manager'); |
|
14 | + define('MGR_DIR','manager'); |
|
15 | 15 | } |
16 | 16 | require_once("lang.php"); |
17 | 17 |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | $installMode = $_POST['installMode']; |
7 | 7 | |
8 | 8 | $self = 'install/connection.databasetest.php'; |
9 | -$base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
|
9 | +$base_path = str_replace($self, '', str_replace('\\', '/', __FILE__)); |
|
10 | 10 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
11 | 11 | include_once("{$base_path}assets/cache/siteManager.php"); |
12 | 12 | } |
13 | -if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
14 | - define('MGR_DIR','manager'); |
|
13 | +if (!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
14 | + define('MGR_DIR', 'manager'); |
|
15 | 15 | } |
16 | 16 | require_once("lang.php"); |
17 | 17 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $database_charset = substr($database_collation, 0, strpos($database_collation, '_')); |
32 | 32 | $query = "CREATE DATABASE `".$database_name."` CHARACTER SET ".$database_charset." COLLATE ".$database_collation.";"; |
33 | 33 | |
34 | - if (! mysqli_query($conn, $query)){ |
|
34 | + if (!mysqli_query($conn, $query)) { |
|
35 | 35 | $output .= '<span id="database_fail" style="color:#FF0000;">'.$_lang['status_failed_could_not_create_database'].'</span>'; |
36 | 36 | } |
37 | 37 | else { |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | function install_sessionCheck() |
3 | 3 | { |
4 | - global $_lang; |
|
4 | + global $_lang; |
|
5 | 5 | |
6 | - // session loop-back tester |
|
7 | - if(!isset($_GET['action']) || $_GET['action']!=='mode') |
|
8 | - { |
|
9 | - if(!isset($_SESSION['test']) || $_SESSION['test']!=1) |
|
10 | - { |
|
11 | - echo ' |
|
6 | + // session loop-back tester |
|
7 | + if(!isset($_GET['action']) || $_GET['action']!=='mode') |
|
8 | + { |
|
9 | + if(!isset($_SESSION['test']) || $_SESSION['test']!=1) |
|
10 | + { |
|
11 | + echo ' |
|
12 | 12 | <html> |
13 | 13 | <head> |
14 | 14 | <title>Install Problem</title> |
@@ -27,86 +27,86 @@ discard block |
||
27 | 27 | </div> |
28 | 28 | </body> |
29 | 29 | </html>'; |
30 | - exit; |
|
31 | - } |
|
32 | - } |
|
30 | + exit; |
|
31 | + } |
|
32 | + } |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | function parse($src,$ph,$left='[+',$right='+]') |
36 | 36 | { |
37 | - foreach($ph as $k=>$v) |
|
38 | - { |
|
39 | - $k = $left . $k . $right; |
|
40 | - $src = str_replace($k,$v,$src); |
|
41 | - } |
|
42 | - return $src; |
|
37 | + foreach($ph as $k=>$v) |
|
38 | + { |
|
39 | + $k = $left . $k . $right; |
|
40 | + $src = str_replace($k,$v,$src); |
|
41 | + } |
|
42 | + return $src; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | function ph() |
46 | 46 | { |
47 | - global $_lang,$moduleName,$moduleVersion,$modx_textdir,$modx_release_date; |
|
47 | + global $_lang,$moduleName,$moduleVersion,$modx_textdir,$modx_release_date; |
|
48 | 48 | |
49 | - if(isset($_SESSION['installmode'])) $installmode = $_SESSION['installmode']; |
|
50 | - else $installmode = get_installmode(); |
|
49 | + if(isset($_SESSION['installmode'])) $installmode = $_SESSION['installmode']; |
|
50 | + else $installmode = get_installmode(); |
|
51 | 51 | |
52 | - $ph['pagetitle'] = $_lang['modx_install']; |
|
53 | - $ph['textdir'] = $modx_textdir ? ' id="rtl"':''; |
|
54 | - $ph['help_link'] = $installmode == 0 ? $_lang['help_link_new'] : $_lang['help_link_upd']; |
|
55 | - $ph['version'] = $moduleVersion; |
|
56 | - $ph['release_date'] = ($modx_textdir ? '‏':'') . $modx_release_date; |
|
57 | - $ph['footer1'] = $_lang['modx_footer1']; |
|
58 | - $ph['footer2'] = $_lang['modx_footer2']; |
|
59 | - $ph['current_year'] = date('Y'); |
|
60 | - return $ph; |
|
52 | + $ph['pagetitle'] = $_lang['modx_install']; |
|
53 | + $ph['textdir'] = $modx_textdir ? ' id="rtl"':''; |
|
54 | + $ph['help_link'] = $installmode == 0 ? $_lang['help_link_new'] : $_lang['help_link_upd']; |
|
55 | + $ph['version'] = $moduleVersion; |
|
56 | + $ph['release_date'] = ($modx_textdir ? '‏':'') . $modx_release_date; |
|
57 | + $ph['footer1'] = $_lang['modx_footer1']; |
|
58 | + $ph['footer2'] = $_lang['modx_footer2']; |
|
59 | + $ph['current_year'] = date('Y'); |
|
60 | + return $ph; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | function get_installmode() |
64 | 64 | { |
65 | - global $base_path,$database_server, $database_user, $database_password, $dbase, $table_prefix; |
|
65 | + global $base_path,$database_server, $database_user, $database_password, $dbase, $table_prefix; |
|
66 | 66 | |
67 | - $conf_path = "{$base_path}manager/includes/config.inc.php"; |
|
68 | - if (!is_file($conf_path)) $installmode = 0; |
|
69 | - elseif(isset($_POST['installmode'])) $installmode = $_POST['installmode']; |
|
70 | - else |
|
71 | - { |
|
72 | - include_once("{$base_path}manager/includes/config.inc.php"); |
|
67 | + $conf_path = "{$base_path}manager/includes/config.inc.php"; |
|
68 | + if (!is_file($conf_path)) $installmode = 0; |
|
69 | + elseif(isset($_POST['installmode'])) $installmode = $_POST['installmode']; |
|
70 | + else |
|
71 | + { |
|
72 | + include_once("{$base_path}manager/includes/config.inc.php"); |
|
73 | 73 | |
74 | - if(!isset($dbase) || empty($dbase)) $installmode = 0; |
|
75 | - else |
|
76 | - { |
|
77 | - $conn = mysqli_connect($database_server, $database_user, $database_password); |
|
78 | - if($conn) |
|
79 | - { |
|
80 | - $_SESSION['database_server'] = $database_server; |
|
81 | - $_SESSION['database_user'] = $database_user; |
|
82 | - $_SESSION['database_password'] = $database_password; |
|
74 | + if(!isset($dbase) || empty($dbase)) $installmode = 0; |
|
75 | + else |
|
76 | + { |
|
77 | + $conn = mysqli_connect($database_server, $database_user, $database_password); |
|
78 | + if($conn) |
|
79 | + { |
|
80 | + $_SESSION['database_server'] = $database_server; |
|
81 | + $_SESSION['database_user'] = $database_user; |
|
82 | + $_SESSION['database_password'] = $database_password; |
|
83 | 83 | |
84 | - $dbase = trim($dbase, '`'); |
|
85 | - $rs = mysqli_select_db($conn, $dbase); |
|
86 | - } |
|
87 | - else $rs = false; |
|
84 | + $dbase = trim($dbase, '`'); |
|
85 | + $rs = mysqli_select_db($conn, $dbase); |
|
86 | + } |
|
87 | + else $rs = false; |
|
88 | 88 | |
89 | - if($rs) |
|
90 | - { |
|
91 | - $_SESSION['dbase'] = $dbase; |
|
92 | - $_SESSION['table_prefix'] = $table_prefix; |
|
93 | - $_SESSION['database_collation'] = 'utf8_general_ci'; |
|
94 | - $_SESSION['database_connection_method'] = 'SET CHARACTER SET'; |
|
89 | + if($rs) |
|
90 | + { |
|
91 | + $_SESSION['dbase'] = $dbase; |
|
92 | + $_SESSION['table_prefix'] = $table_prefix; |
|
93 | + $_SESSION['database_collation'] = 'utf8_general_ci'; |
|
94 | + $_SESSION['database_connection_method'] = 'SET CHARACTER SET'; |
|
95 | 95 | |
96 | - $tbl_system_settings = "`{$dbase}`.`{$table_prefix}system_settings`"; |
|
97 | - $rs = mysqli_query($conn, "SELECT setting_value FROM {$tbl_system_settings} WHERE setting_name='settings_version'"); |
|
98 | - if($rs) |
|
99 | - { |
|
100 | - $row = mysqli_fetch_assoc($rs); |
|
101 | - $settings_version = $row['setting_value']; |
|
102 | - } |
|
103 | - else $settings_version = ''; |
|
96 | + $tbl_system_settings = "`{$dbase}`.`{$table_prefix}system_settings`"; |
|
97 | + $rs = mysqli_query($conn, "SELECT setting_value FROM {$tbl_system_settings} WHERE setting_name='settings_version'"); |
|
98 | + if($rs) |
|
99 | + { |
|
100 | + $row = mysqli_fetch_assoc($rs); |
|
101 | + $settings_version = $row['setting_value']; |
|
102 | + } |
|
103 | + else $settings_version = ''; |
|
104 | 104 | |
105 | - if (empty($settings_version)) $installmode = 0; |
|
106 | - else $installmode = 1; |
|
107 | - } |
|
108 | - else $installmode = 1; |
|
109 | - } |
|
110 | - } |
|
111 | - return $installmode; |
|
105 | + if (empty($settings_version)) $installmode = 0; |
|
106 | + else $installmode = 1; |
|
107 | + } |
|
108 | + else $installmode = 1; |
|
109 | + } |
|
110 | + } |
|
111 | + return $installmode; |
|
112 | 112 | } |
@@ -4,9 +4,9 @@ discard block |
||
4 | 4 | global $_lang; |
5 | 5 | |
6 | 6 | // session loop-back tester |
7 | - if(!isset($_GET['action']) || $_GET['action']!=='mode') |
|
7 | + if (!isset($_GET['action']) || $_GET['action'] !== 'mode') |
|
8 | 8 | { |
9 | - if(!isset($_SESSION['test']) || $_SESSION['test']!=1) |
|
9 | + if (!isset($_SESSION['test']) || $_SESSION['test'] != 1) |
|
10 | 10 | { |
11 | 11 | echo ' |
12 | 12 | <html> |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | </head> |
23 | 23 | <body> |
24 | 24 | <div class="install"> |
25 | - <p>' . $_lang["session_problem"] . '</p> |
|
26 | - <p><a href="./">' .$_lang["session_problem_try_again"] . '</a></p> |
|
25 | + <p>' . $_lang["session_problem"].'</p> |
|
26 | + <p><a href="./">' .$_lang["session_problem_try_again"].'</a></p> |
|
27 | 27 | </div> |
28 | 28 | </body> |
29 | 29 | </html>'; |
@@ -32,28 +32,28 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | -function parse($src,$ph,$left='[+',$right='+]') |
|
35 | +function parse($src, $ph, $left = '[+', $right = '+]') |
|
36 | 36 | { |
37 | - foreach($ph as $k=>$v) |
|
37 | + foreach ($ph as $k=>$v) |
|
38 | 38 | { |
39 | - $k = $left . $k . $right; |
|
40 | - $src = str_replace($k,$v,$src); |
|
39 | + $k = $left.$k.$right; |
|
40 | + $src = str_replace($k, $v, $src); |
|
41 | 41 | } |
42 | 42 | return $src; |
43 | 43 | } |
44 | 44 | |
45 | 45 | function ph() |
46 | 46 | { |
47 | - global $_lang,$moduleName,$moduleVersion,$modx_textdir,$modx_release_date; |
|
47 | + global $_lang, $moduleName, $moduleVersion, $modx_textdir, $modx_release_date; |
|
48 | 48 | |
49 | - if(isset($_SESSION['installmode'])) $installmode = $_SESSION['installmode']; |
|
49 | + if (isset($_SESSION['installmode'])) $installmode = $_SESSION['installmode']; |
|
50 | 50 | else $installmode = get_installmode(); |
51 | 51 | |
52 | 52 | $ph['pagetitle'] = $_lang['modx_install']; |
53 | - $ph['textdir'] = $modx_textdir ? ' id="rtl"':''; |
|
53 | + $ph['textdir'] = $modx_textdir ? ' id="rtl"' : ''; |
|
54 | 54 | $ph['help_link'] = $installmode == 0 ? $_lang['help_link_new'] : $_lang['help_link_upd']; |
55 | 55 | $ph['version'] = $moduleVersion; |
56 | - $ph['release_date'] = ($modx_textdir ? '‏':'') . $modx_release_date; |
|
56 | + $ph['release_date'] = ($modx_textdir ? '‏' : '').$modx_release_date; |
|
57 | 57 | $ph['footer1'] = $_lang['modx_footer1']; |
58 | 58 | $ph['footer2'] = $_lang['modx_footer2']; |
59 | 59 | $ph['current_year'] = date('Y'); |
@@ -62,20 +62,20 @@ discard block |
||
62 | 62 | |
63 | 63 | function get_installmode() |
64 | 64 | { |
65 | - global $base_path,$database_server, $database_user, $database_password, $dbase, $table_prefix; |
|
65 | + global $base_path, $database_server, $database_user, $database_password, $dbase, $table_prefix; |
|
66 | 66 | |
67 | 67 | $conf_path = "{$base_path}manager/includes/config.inc.php"; |
68 | 68 | if (!is_file($conf_path)) $installmode = 0; |
69 | - elseif(isset($_POST['installmode'])) $installmode = $_POST['installmode']; |
|
69 | + elseif (isset($_POST['installmode'])) $installmode = $_POST['installmode']; |
|
70 | 70 | else |
71 | 71 | { |
72 | 72 | include_once("{$base_path}manager/includes/config.inc.php"); |
73 | 73 | |
74 | - if(!isset($dbase) || empty($dbase)) $installmode = 0; |
|
74 | + if (!isset($dbase) || empty($dbase)) $installmode = 0; |
|
75 | 75 | else |
76 | 76 | { |
77 | 77 | $conn = mysqli_connect($database_server, $database_user, $database_password); |
78 | - if($conn) |
|
78 | + if ($conn) |
|
79 | 79 | { |
80 | 80 | $_SESSION['database_server'] = $database_server; |
81 | 81 | $_SESSION['database_user'] = $database_user; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | else $rs = false; |
88 | 88 | |
89 | - if($rs) |
|
89 | + if ($rs) |
|
90 | 90 | { |
91 | 91 | $_SESSION['dbase'] = $dbase; |
92 | 92 | $_SESSION['table_prefix'] = $table_prefix; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $tbl_system_settings = "`{$dbase}`.`{$table_prefix}system_settings`"; |
97 | 97 | $rs = mysqli_query($conn, "SELECT setting_value FROM {$tbl_system_settings} WHERE setting_name='settings_version'"); |
98 | - if($rs) |
|
98 | + if ($rs) |
|
99 | 99 | { |
100 | 100 | $row = mysqli_fetch_assoc($rs); |
101 | 101 | $settings_version = $row['setting_value']; |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | $self = 'install/connection.servertest.php'; |
8 | 8 | $base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
9 | 9 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
10 | - include_once("{$base_path}assets/cache/siteManager.php"); |
|
10 | + include_once("{$base_path}assets/cache/siteManager.php"); |
|
11 | 11 | } |
12 | 12 | if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
13 | - define('MGR_DIR','manager'); |
|
13 | + define('MGR_DIR','manager'); |
|
14 | 14 | } |
15 | 15 | require_once("lang.php"); |
16 | 16 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $modes = mysqli_fetch_array($mysqlmode, MYSQLI_NUM); |
32 | 32 | $strictMode = false; |
33 | 33 | foreach ($modes as $mode) { |
34 | - if (stristr($mode, "STRICT_TRANS_TABLES") !== false || stristr($mode, "STRICT_ALL_TABLES") !== false) $strictMode = true; |
|
34 | + if (stristr($mode, "STRICT_TRANS_TABLES") !== false || stristr($mode, "STRICT_ALL_TABLES") !== false) $strictMode = true; |
|
35 | 35 | } |
36 | 36 | if ($strictMode) $output .= '<br /><span style="color:#FF0000;"> '.$_lang['strict_mode'].'</span>'; |
37 | 37 | } |
@@ -5,12 +5,12 @@ discard block |
||
5 | 5 | $pwd = $_POST['pwd']; |
6 | 6 | |
7 | 7 | $self = 'install/connection.servertest.php'; |
8 | -$base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
|
8 | +$base_path = str_replace($self, '', str_replace('\\', '/', __FILE__)); |
|
9 | 9 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
10 | 10 | include_once("{$base_path}assets/cache/siteManager.php"); |
11 | 11 | } |
12 | -if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
13 | - define('MGR_DIR','manager'); |
|
12 | +if (!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
13 | + define('MGR_DIR', 'manager'); |
|
14 | 14 | } |
15 | 15 | require_once("lang.php"); |
16 | 16 | |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | $output .= '<span id="server_pass" style="color:#80c000;"> '.$_lang['status_passed_server'].'</span>'; |
23 | 23 | |
24 | 24 | // Mysql version check |
25 | - if ( version_compare(mysqli_get_server_info($conn), '5.0.51', '=') ) { |
|
25 | + if (version_compare(mysqli_get_server_info($conn), '5.0.51', '=')) { |
|
26 | 26 | $output .= '<br /><span style="color:#FF0000;"> '.$_lang['mysql_5051'].'</span>'; |
27 | 27 | } |
28 | 28 | // Mode check |
29 | 29 | $mysqlmode = mysqli_query($conn, "SELECT @@session.sql_mode"); |
30 | - if (@mysqli_num_rows($mysqlmode) > 0){ |
|
30 | + if (@mysqli_num_rows($mysqlmode) > 0) { |
|
31 | 31 | $modes = mysqli_fetch_array($mysqlmode, MYSQLI_NUM); |
32 | 32 | $strictMode = false; |
33 | 33 | foreach ($modes as $mode) { |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | $self = 'install/connection.collation.php'; |
8 | 8 | $base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
9 | 9 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
10 | - include_once("{$base_path}assets/cache/siteManager.php"); |
|
10 | + include_once("{$base_path}assets/cache/siteManager.php"); |
|
11 | 11 | } |
12 | 12 | if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
13 | - define('MGR_DIR','manager'); |
|
13 | + define('MGR_DIR','manager'); |
|
14 | 14 | } |
15 | 15 | require_once('lang.php'); |
16 | 16 | |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | $rs = array('recommend'=>''); |
60 | 60 | $order = explode(',', $order); |
61 | 61 | foreach($order as $v) { |
62 | - foreach($array as $name=>$sel) { |
|
63 | - if(strpos($name,$v)!==false) { |
|
64 | - $rs[$name] = $array[$name]; |
|
65 | - unset($array[$name]); |
|
66 | - } |
|
67 | - } |
|
62 | + foreach($array as $name=>$sel) { |
|
63 | + if(strpos($name,$v)!==false) { |
|
64 | + $rs[$name] = $array[$name]; |
|
65 | + unset($array[$name]); |
|
66 | + } |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | $rs['unrecommend']=''; |
70 | 70 | return $rs + $array; |
@@ -5,17 +5,17 @@ discard block |
||
5 | 5 | $pwd = $_POST['pwd']; |
6 | 6 | |
7 | 7 | $self = 'install/connection.collation.php'; |
8 | -$base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
|
8 | +$base_path = str_replace($self, '', str_replace('\\', '/', __FILE__)); |
|
9 | 9 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
10 | 10 | include_once("{$base_path}assets/cache/siteManager.php"); |
11 | 11 | } |
12 | -if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
13 | - define('MGR_DIR','manager'); |
|
12 | +if (!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
13 | + define('MGR_DIR', 'manager'); |
|
14 | 14 | } |
15 | 15 | require_once('lang.php'); |
16 | 16 | |
17 | 17 | $conn = mysqli_connect($host, $uid, $pwd); |
18 | -if(!$conn) exit('can not connect'); |
|
18 | +if (!$conn) exit('can not connect'); |
|
19 | 19 | |
20 | 20 | // get collation |
21 | 21 | $rs = mysqli_query($conn, "SHOW COLLATION"); |
@@ -29,20 +29,20 @@ discard block |
||
29 | 29 | $database_collation = htmlentities($_POST['database_collation']); |
30 | 30 | $recommend_collation = $_lang['recommend_collation']; |
31 | 31 | |
32 | - if (isset($_[$recommend_collation])) $_[$recommend_collation] = ' selected'; |
|
33 | - elseif(isset($_['utf8mb4_general_ci'])) $_['utf8mb4_general_ci'] = ' selected'; |
|
34 | - elseif(isset($_['utf8_general_ci'])) $_['utf8_general_ci'] = ' selected'; |
|
35 | - elseif(isset($_[$database_collation])) $_[$database_collation] = ' selected'; |
|
32 | + if (isset($_[$recommend_collation])) $_[$recommend_collation] = ' selected'; |
|
33 | + elseif (isset($_['utf8mb4_general_ci'])) $_['utf8mb4_general_ci'] = ' selected'; |
|
34 | + elseif (isset($_['utf8_general_ci'])) $_['utf8_general_ci'] = ' selected'; |
|
35 | + elseif (isset($_[$database_collation])) $_[$database_collation] = ' selected'; |
|
36 | 36 | |
37 | - $_ = sortItem($_,$_lang['recommend_collations_order']); |
|
37 | + $_ = sortItem($_, $_lang['recommend_collations_order']); |
|
38 | 38 | |
39 | - foreach($_ as $collation=>$selected) { |
|
39 | + foreach ($_ as $collation=>$selected) { |
|
40 | 40 | $collation = htmlentities($collation); |
41 | 41 | // if(substr($collation,0,4)!=='utf8') continue; |
42 | - if(strpos($collation,'sjis')===0) continue; |
|
43 | - if($collation=='recommend') |
|
42 | + if (strpos($collation, 'sjis') === 0) continue; |
|
43 | + if ($collation == 'recommend') |
|
44 | 44 | $output .= '<optgroup label="recommend">'; |
45 | - elseif($collation=='unrecommend') |
|
45 | + elseif ($collation == 'unrecommend') |
|
46 | 46 | $output .= '</optgroup><optgroup label="unrecommend">'; |
47 | 47 | else |
48 | 48 | $output .= sprintf('<option value="%s" %s>%s</option>', $collation, $selected, $collation); |
@@ -55,17 +55,17 @@ discard block |
||
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | -function sortItem($array=array(),$order='utf8mb4,utf8') { |
|
58 | +function sortItem($array = array(), $order = 'utf8mb4,utf8'){ |
|
59 | 59 | $rs = array('recommend'=>''); |
60 | 60 | $order = explode(',', $order); |
61 | - foreach($order as $v) { |
|
62 | - foreach($array as $name=>$sel) { |
|
63 | - if(strpos($name,$v)!==false) { |
|
61 | + foreach ($order as $v) { |
|
62 | + foreach ($array as $name=>$sel) { |
|
63 | + if (strpos($name, $v) !== false) { |
|
64 | 64 | $rs[$name] = $array[$name]; |
65 | 65 | unset($array[$name]); |
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |
69 | - $rs['unrecommend']=''; |
|
69 | + $rs['unrecommend'] = ''; |
|
70 | 70 | return $rs + $array; |
71 | 71 | } |
@@ -16,10 +16,10 @@ |
||
16 | 16 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); |
17 | 17 | |
18 | 18 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
19 | - include_once("{$base_path}assets/cache/siteManager.php"); |
|
19 | + include_once("{$base_path}assets/cache/siteManager.php"); |
|
20 | 20 | } |
21 | 21 | if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
22 | - define('MGR_DIR', 'manager'); |
|
22 | + define('MGR_DIR', 'manager'); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | } |
10 | 10 | |
11 | 11 | $self = 'install/index.php'; |
12 | -$base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
|
12 | +$base_path = str_replace($self, '', str_replace('\\', '/', __FILE__)); |
|
13 | 13 | require_once("{$base_path}install/functions.php"); |
14 | 14 | |
15 | 15 | // set error reporting |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | if (is_file("{$base_path}assets/cache/siteManager.php")) { |
19 | 19 | include_once("{$base_path}assets/cache/siteManager.php"); |
20 | 20 | } |
21 | -if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
21 | +if (!defined('MGR_DIR') && is_dir("{$base_path}manager")) { |
|
22 | 22 | define('MGR_DIR', 'manager'); |
23 | 23 | } |
24 | 24 | |
@@ -38,26 +38,26 @@ discard block |
||
38 | 38 | $moduleSQLDataFile = "setup.data.sql"; |
39 | 39 | $moduleSQLResetFile = "setup.data.reset.sql"; |
40 | 40 | |
41 | -$moduleChunks = array (); // chunks - array : name, description, type - 0:file or 1:content, file or content |
|
42 | -$moduleTemplates = array (); // templates - array : name, description, type - 0:file or 1:content, file or content |
|
43 | -$moduleSnippets = array (); // snippets - array : name, description, type - 0:file or 1:content, file or content,properties |
|
44 | -$modulePlugins = array (); // plugins - array : name, description, type - 0:file or 1:content, file or content,properties, events,guid |
|
45 | -$moduleModules = array (); // modules - array : name, description, type - 0:file or 1:content, file or content,properties, guid |
|
46 | -$moduleTemplates = array (); // templates - array : name, description, type - 0:file or 1:content, file or content,properties |
|
47 | -$moduleTVs = array (); // template variables - array : name, description, type - 0:file or 1:content, file or content,properties |
|
41 | +$moduleChunks = array(); // chunks - array : name, description, type - 0:file or 1:content, file or content |
|
42 | +$moduleTemplates = array(); // templates - array : name, description, type - 0:file or 1:content, file or content |
|
43 | +$moduleSnippets = array(); // snippets - array : name, description, type - 0:file or 1:content, file or content,properties |
|
44 | +$modulePlugins = array(); // plugins - array : name, description, type - 0:file or 1:content, file or content,properties, events,guid |
|
45 | +$moduleModules = array(); // modules - array : name, description, type - 0:file or 1:content, file or content,properties, guid |
|
46 | +$moduleTemplates = array(); // templates - array : name, description, type - 0:file or 1:content, file or content,properties |
|
47 | +$moduleTVs = array(); // template variables - array : name, description, type - 0:file or 1:content, file or content,properties |
|
48 | 48 | $moduleDependencies = array(); // module depedencies - array : module, table, column, type, name |
49 | 49 | |
50 | -$errors= 0; |
|
50 | +$errors = 0; |
|
51 | 51 | |
52 | 52 | // get post back status |
53 | 53 | $isPostBack = (count($_POST)); |
54 | 54 | |
55 | 55 | $ph = ph(); |
56 | -$ph = array_merge($ph,$_lang); |
|
56 | +$ph = array_merge($ph, $_lang); |
|
57 | 57 | $ph['install_language'] = $install_language; |
58 | 58 | |
59 | 59 | ob_start(); |
60 | -$action= isset ($_GET['action']) ? trim(strip_tags($_GET['action'])) : 'language'; |
|
60 | +$action = isset ($_GET['action']) ? trim(strip_tags($_GET['action'])) : 'language'; |
|
61 | 61 | if (!@include_once("actions/action_{$action}.php")) { |
62 | 62 | die ("Invalid install action attempted. [action={$action}]"); |
63 | 63 | } |
@@ -65,5 +65,5 @@ discard block |
||
65 | 65 | ob_end_clean(); |
66 | 66 | |
67 | 67 | $tpl = file_get_contents("{$base_path}install/template.tpl"); |
68 | -echo parse($tpl,$ph); |
|
68 | +echo parse($tpl, $ph); |
|
69 | 69 |
@@ -177,9 +177,9 @@ |
||
177 | 177 | <td colspan="2"><div class="split"></div></td> |
178 | 178 | </tr> |
179 | 179 | <?php |
180 | - // Check for GD before allowing captcha to be enabled |
|
181 | - $gdAvailable = extension_loaded('gd'); |
|
182 | - ?> |
|
180 | + // Check for GD before allowing captcha to be enabled |
|
181 | + $gdAvailable = extension_loaded('gd'); |
|
182 | + ?> |
|
183 | 183 | <?php |
184 | 184 | $gdAvailable = extension_loaded('gd'); |
185 | 185 | if(!$gdAvailable) $use_captcha = 0; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) $valid_hostnames = $_SERVER['HTTP_HOST']; |
|
3 | + if (empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) $valid_hostnames = $_SERVER['HTTP_HOST']; |
|
4 | 4 | ?> |
5 | 5 | <!-- Interface & editor settings --> |
6 | 6 | <div class="tab-page" id="tabPageSecurity"> |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | <tr> |
12 | 12 | <th><?php echo $_lang['allow_eval_title']; ?><br><small>[(allow_eval)]</small></th> |
13 | 13 | <td> |
14 | -<?php echo wrap_label($_lang['allow_eval_with_scan'] , form_radio('allow_eval','with_scan'));?><br /> |
|
15 | -<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'] , form_radio('allow_eval','with_scan_at_post'));?><br /> |
|
16 | -<?php echo wrap_label($_lang['allow_eval_everytime_eval'] , form_radio('allow_eval','everytime_eval'));?><br /> |
|
17 | -<?php echo wrap_label($_lang['allow_eval_dont_eval'] , form_radio('allow_eval','dont_eval'));?> |
|
14 | +<?php echo wrap_label($_lang['allow_eval_with_scan'], form_radio('allow_eval', 'with_scan')); ?><br /> |
|
15 | +<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'], form_radio('allow_eval', 'with_scan_at_post')); ?><br /> |
|
16 | +<?php echo wrap_label($_lang['allow_eval_everytime_eval'], form_radio('allow_eval', 'everytime_eval')); ?><br /> |
|
17 | +<?php echo wrap_label($_lang['allow_eval_dont_eval'], form_radio('allow_eval', 'dont_eval')); ?> |
|
18 | 18 | <div class="comment"> |
19 | 19 | <?php echo $_lang['allow_eval_msg'] ?> |
20 | 20 | </div> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <tr> |
40 | 40 | <th><?php echo $_lang['check_files_onlogin_title'] ?><br><small>[(check_files_onlogin)]</small></th> |
41 | 41 | <td> |
42 | - <textarea name="check_files_onlogin"><?php echo $check_files_onlogin;?></textarea><br /> |
|
42 | + <textarea name="check_files_onlogin"><?php echo $check_files_onlogin; ?></textarea><br /> |
|
43 | 43 | |
44 | 44 | </td> |
45 | 45 | </tr> |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | <tr> |
50 | 50 | <td nowrap class="warning"><?php echo $_lang['validate_referer_title'] ?><br><small>[(validate_referer)]</small></td> |
51 | 51 | <td> |
52 | - <?php echo wrap_label($_lang['yes'],form_radio('validate_referer', 1));?><br /> |
|
53 | - <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0));?> |
|
52 | + <?php echo wrap_label($_lang['yes'], form_radio('validate_referer', 1)); ?><br /> |
|
53 | + <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0)); ?> |
|
54 | 54 | </td> |
55 | 55 | </tr> |
56 | 56 | <tr> |
@@ -85,25 +85,25 @@ discard block |
||
85 | 85 | <tr> |
86 | 86 | <th><?php echo $_lang['a17_error_reporting_title']; ?><br><small>[(error_reporting)]</small></th> |
87 | 87 | <td> |
88 | -<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting','0'));?><br /> |
|
89 | -<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting','1'));?><br /> |
|
90 | -<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting','2'));?><br /> |
|
91 | -<?php echo wrap_label($_lang['a17_error_reporting_opt99'],form_radio('error_reporting','99'));?> |
|
88 | +<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting', '0')); ?><br /> |
|
89 | +<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting', '1')); ?><br /> |
|
90 | +<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting', '2')); ?><br /> |
|
91 | +<?php echo wrap_label($_lang['a17_error_reporting_opt99'], form_radio('error_reporting', '99')); ?> |
|
92 | 92 | </td> |
93 | 93 | </tr> |
94 | 94 | <tr> |
95 | 95 | <td width="200"> </td> |
96 | - <td class="comment"> <?php echo $_lang['a17_error_reporting_msg'];?></td> |
|
96 | + <td class="comment"> <?php echo $_lang['a17_error_reporting_msg']; ?></td> |
|
97 | 97 | </tr> |
98 | 98 | <tr><td colspan="2"><div class="split"></div></td></tr> |
99 | 99 | <tr> |
100 | 100 | <th><?php echo $_lang['mutate_settings.dynamic.php6']; ?><br><small>[(send_errormail)]</small></th> |
101 | 101 | <td> |
102 | -<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'],form_radio('send_errormail','0'));?><br /> |
|
103 | -<?php echo wrap_label('error',form_radio('send_errormail','3'));?><br /> |
|
104 | -<?php echo wrap_label('error + warning',form_radio('send_errormail','2'));?><br /> |
|
105 | -<?php echo wrap_label('error + warning + information',form_radio('send_errormail','1'));?><br /> |
|
106 | -<?php echo parseText($_lang['mutate_settings.dynamic.php8'],array('emailsender'=>$modx->config['emailsender']));?></td> |
|
102 | +<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'], form_radio('send_errormail', '0')); ?><br /> |
|
103 | +<?php echo wrap_label('error', form_radio('send_errormail', '3')); ?><br /> |
|
104 | +<?php echo wrap_label('error + warning', form_radio('send_errormail', '2')); ?><br /> |
|
105 | +<?php echo wrap_label('error + warning + information', form_radio('send_errormail', '1')); ?><br /> |
|
106 | +<?php echo parseText($_lang['mutate_settings.dynamic.php8'], array('emailsender'=>$modx->config['emailsender'])); ?></td> |
|
107 | 107 | </tr> |
108 | 108 | <tr> |
109 | 109 | <td colspan="2"><div class="split"></div></td> |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | <tr> |
112 | 112 | <th><?php echo $_lang['enable_bindings_title'] ?><br><small>[(enable_bindings)]</small></th> |
113 | 113 | <td> |
114 | -<?php echo wrap_label($_lang['yes'],form_radio('enable_bindings','1'));?><br /> |
|
115 | -<?php echo wrap_label($_lang['no'], form_radio('enable_bindings','0'));?> |
|
114 | +<?php echo wrap_label($_lang['yes'], form_radio('enable_bindings', '1')); ?><br /> |
|
115 | +<?php echo wrap_label($_lang['no'], form_radio('enable_bindings', '0')); ?> |
|
116 | 116 | |
117 | 117 | </td> |
118 | 118 | </tr> |
@@ -153,20 +153,20 @@ discard block |
||
153 | 153 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
154 | 154 | <td> |
155 | 155 | <?php |
156 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
157 | -$phm['e']['BLOWFISH_Y'] = $modx->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0:1; |
|
158 | -$phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0:1; |
|
159 | -$phm['e']['SHA512'] = $modx->manager->checkHashAlgorithm('SHA512') ? 0:1; |
|
160 | -$phm['e']['SHA256'] = $modx->manager->checkHashAlgorithm('SHA256') ? 0:1; |
|
161 | -$phm['e']['MD5'] = $modx->manager->checkHashAlgorithm('MD5') ? 0:1; |
|
162 | -$phm['e']['UNCRYPT'] = $modx->manager->checkHashAlgorithm('UNCRYPT') ? 0:1; |
|
156 | +if (empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
157 | +$phm['e']['BLOWFISH_Y'] = $modx->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0 : 1; |
|
158 | +$phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0 : 1; |
|
159 | +$phm['e']['SHA512'] = $modx->manager->checkHashAlgorithm('SHA512') ? 0 : 1; |
|
160 | +$phm['e']['SHA256'] = $modx->manager->checkHashAlgorithm('SHA256') ? 0 : 1; |
|
161 | +$phm['e']['MD5'] = $modx->manager->checkHashAlgorithm('MD5') ? 0 : 1; |
|
162 | +$phm['e']['UNCRYPT'] = $modx->manager->checkHashAlgorithm('UNCRYPT') ? 0 : 1; |
|
163 | 163 | ?> |
164 | -<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y']));?><br /> |
|
165 | -<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_A', '', $phm['e']['BLOWFISH_A']));?><br /> |
|
166 | -<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA512' , '', $phm['e']['SHA512']));?><br /> |
|
167 | -<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA256' , '', $phm['e']['SHA256']));?><br /> |
|
168 | -<?php echo wrap_label('CRYPT_MD5 (salt & stretch)' ,form_radio('pwd_hash_algo','MD5' , '', $phm['e']['MD5']));?><br /> |
|
169 | -<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)' ,form_radio('pwd_hash_algo','UNCRYPT' , '', $phm['e']['UNCRYPT']));?> |
|
164 | +<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y'])); ?><br /> |
|
165 | +<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_A', '', $phm['e']['BLOWFISH_A'])); ?><br /> |
|
166 | +<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA512', '', $phm['e']['SHA512'])); ?><br /> |
|
167 | +<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA256', '', $phm['e']['SHA256'])); ?><br /> |
|
168 | +<?php echo wrap_label('CRYPT_MD5 (salt & stretch)', form_radio('pwd_hash_algo', 'MD5', '', $phm['e']['MD5'])); ?><br /> |
|
169 | +<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)', form_radio('pwd_hash_algo', 'UNCRYPT', '', $phm['e']['UNCRYPT'])); ?> |
|
170 | 170 | </td> |
171 | 171 | </tr> |
172 | 172 | <tr> |
@@ -182,13 +182,13 @@ discard block |
||
182 | 182 | ?> |
183 | 183 | <?php |
184 | 184 | $gdAvailable = extension_loaded('gd'); |
185 | -if(!$gdAvailable) $use_captcha = 0; |
|
185 | +if (!$gdAvailable) $use_captcha = 0; |
|
186 | 186 | ?> |
187 | 187 | <tr> |
188 | 188 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
189 | - <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha==1) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> /> |
|
189 | + <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha == 1) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
190 | 190 | <?php echo $_lang['yes']?></label><br /> |
191 | - <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha==0) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : '';?> /> |
|
191 | + <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha == 0) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
192 | 192 | <?php echo $_lang['no']?></label> </td> |
193 | 193 | </tr> |
194 | 194 | <tr> |
@@ -198,23 +198,23 @@ discard block |
||
198 | 198 | <tr> |
199 | 199 | <td colspan="2"><div class="split"></div></td> |
200 | 200 | </tr> |
201 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
201 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
202 | 202 | <td nowrap class="warning"><?php echo $_lang['captcha_words_title'] ?><br><small>[(captcha_words)]</small> |
203 | 203 | <br /> |
204 | 204 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
205 | 205 | <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');"> |
206 | -<?php echo get_lang_options('captcha_words_default');?> |
|
206 | +<?php echo get_lang_options('captcha_words_default'); ?> |
|
207 | 207 | </select> |
208 | 208 | </td> |
209 | 209 | <td><input type="text" id="captcha_words_input" name="captcha_words" style="width:250px" value="<?php echo $captcha_words; ?>" /> |
210 | - <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']);?>" /> |
|
210 | + <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']); ?>" /> |
|
211 | 211 | </td> |
212 | 212 | </tr> |
213 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
213 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
214 | 214 | <td width="200"> </td> |
215 | 215 | <td class="comment"><?php echo $_lang['captcha_words_message'] ?></td> |
216 | 216 | </tr> |
217 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
217 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
218 | 218 | <td colspan="2"><div class="split"></div></td> |
219 | 219 | </tr> |
220 | 220 | </table> |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | <tr> |
7 | 7 | <td nowrap class="warning"><?php echo $_lang['udperms_title'] ?><br><small>[(use_udperms)]</small></td> |
8 | 8 | <td> |
9 | - <?php echo wrap_label($_lang['yes'],form_radio('use_udperms', 1, 'id="udPermsOn"'));?><br /> |
|
10 | - <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"'));?> |
|
9 | + <?php echo wrap_label($_lang['yes'], form_radio('use_udperms', 1, 'id="udPermsOn"')); ?><br /> |
|
10 | + <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"')); ?> |
|
11 | 11 | </td> |
12 | 12 | </tr> |
13 | 13 | <tr> |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | <tr> |
18 | 18 | <td colspan="2"><div class="split"></div></td> |
19 | 19 | </tr> |
20 | - <tr class="udPerms" <?php echo showHide($use_udperms==1);?>> |
|
20 | + <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>> |
|
21 | 21 | <td nowrap class="warning"><?php echo $_lang['udperms_allowroot_title'] ?><br><small>[(udperms_allowroot)]</small></td> |
22 | 22 | <td> |
23 | - <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot=='1' ? 'checked="checked"' : "" ; ?> /> |
|
23 | + <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot == '1' ? 'checked="checked"' : ""; ?> /> |
|
24 | 24 | <?php echo $_lang['yes']?></label><br /> |
25 | - <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot=='0' ? 'checked="checked"' : "" ; ?> /> |
|
25 | + <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot == '0' ? 'checked="checked"' : ""; ?> /> |
|
26 | 26 | <?php echo $_lang['no']?></label> |
27 | 27 | </td> |
28 | 28 | </tr> |
29 | - <tr class="udPerms" <?php echo showHide($use_udperms==1);?>> |
|
29 | + <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>> |
|
30 | 30 | <td width="200"> </td> |
31 | 31 | <td class="comment"><?php echo $_lang['udperms_allowroot_message'] ?></td> |
32 | 32 | </tr> |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | <tr> |
40 | 40 | <td nowrap class="warning"><?php echo $_lang['email_method_title'] ?><br><small>[(email_method)]</small></td> |
41 | 41 | <td> |
42 | - <?php echo wrap_label($_lang['email_method_mail'],form_radio('email_method','mail','id="useMail"'));?><br /> |
|
43 | - <?php echo wrap_label($_lang['email_method_smtp'],form_radio('email_method','smtp','id="useSmtp"'));?> |
|
44 | - <div class="smtpRow" <?php echo showHide($email_method=='smtp');?>> |
|
45 | - <?php include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/snippet_smtp.inc.php'); ?> |
|
42 | + <?php echo wrap_label($_lang['email_method_mail'], form_radio('email_method', 'mail', 'id="useMail"')); ?><br /> |
|
43 | + <?php echo wrap_label($_lang['email_method_smtp'], form_radio('email_method', 'smtp', 'id="useSmtp"')); ?> |
|
44 | + <div class="smtpRow" <?php echo showHide($email_method == 'smtp'); ?>> |
|
45 | + <?php include_once(MODX_MANAGER_PATH.'actions/mutate_settings/snippet_smtp.inc.php'); ?> |
|
46 | 46 | </div> |
47 | 47 | </td> |
48 | 48 | </tr> |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | <br /> |
55 | 55 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
56 | 56 | <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');"> |
57 | -<?php echo get_lang_options('emailsubject_default');?> |
|
57 | +<?php echo get_lang_options('emailsubject_default'); ?> |
|
58 | 58 | </select> |
59 | 59 | </td> |
60 | 60 | <td ><input id="emailsubject_field" name="emailsubject" onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" value="<?php echo $emailsubject; ?>" /> |
61 | - <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" /> |
|
61 | + <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']); ?>" /> |
|
62 | 62 | </td> |
63 | 63 | </tr> |
64 | 64 | <tr> |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | <br /> |
74 | 74 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
75 | 75 | <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');"> |
76 | -<?php echo get_lang_options('system_email_signup');?> |
|
76 | +<?php echo get_lang_options('system_email_signup'); ?> |
|
77 | 77 | </select> |
78 | 78 | </td> |
79 | 79 | <td> <textarea id="signupemail_message_textarea" name="signupemail_message" style="width:100%; height: 120px;"><?php echo $signupemail_message; ?></textarea> |
80 | - <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" /> |
|
80 | + <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']); ?>" /> |
|
81 | 81 | </td> |
82 | 82 | </tr> |
83 | 83 | <tr> |
@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | <br /> |
93 | 93 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
94 | 94 | <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');"> |
95 | -<?php echo get_lang_options('system_email_websignup');?> |
|
95 | +<?php echo get_lang_options('system_email_websignup'); ?> |
|
96 | 96 | </select> |
97 | 97 | </td> |
98 | 98 | <td> <textarea id="websignupemail_message_textarea" name="websignupemail_message" style="width:100%; height: 120px;"><?php echo $websignupemail_message; ?></textarea> |
99 | - <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" /> |
|
99 | + <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']); ?>" /> |
|
100 | 100 | </td> |
101 | 101 | </tr> |
102 | 102 | <tr> |
@@ -111,11 +111,11 @@ discard block |
||
111 | 111 | <br /> |
112 | 112 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
113 | 113 | <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');"> |
114 | -<?php echo get_lang_options('system_email_webreminder');?> |
|
114 | +<?php echo get_lang_options('system_email_webreminder'); ?> |
|
115 | 115 | </select> |
116 | 116 | </td> |
117 | 117 | <td> <textarea id="system_email_webreminder_textarea" name="webpwdreminder_message" style="width:100%; height: 120px;"><?php echo $webpwdreminder_message; ?></textarea> |
118 | - <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" /> |
|
118 | + <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']); ?>" /> |
|
119 | 119 | </td> |
120 | 120 | </tr> |
121 | 121 | <tr> |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | <?php |
128 | 128 | // invoke OnUserSettingsRender event |
129 | 129 | $evtOut = $modx->invokeEvent('OnUserSettingsRender'); |
130 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
130 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
131 | 131 | ?> |
132 | 132 | </td> |
133 | 133 | </tr> |