@@ -16,35 +16,35 @@ discard block |
||
16 | 16 | $install_language = "english"; |
17 | 17 | |
18 | 18 | $_langFiles= array ( |
19 | - "en" => "english", |
|
20 | - "bg" => "bulgarian", |
|
21 | - "cs" => "czech", |
|
22 | - "da" => "danish", |
|
23 | - "fi" => "finnish-utf8", |
|
24 | - "fr" => "francais-utf8", |
|
25 | - "de" => "german", |
|
26 | - "he" => "hebrew", |
|
27 | - "it" => "italian", |
|
28 | - "ja" => "japanese-utf8", |
|
29 | - "nl" => "nederlands-utf8", |
|
30 | - "no" => "norwegian", |
|
31 | - "fa" => "persian", |
|
32 | - "pl" => "polish-utf8", |
|
33 | - "pt" => "portuguese-br-utf8", |
|
19 | + "en" => "english", |
|
20 | + "bg" => "bulgarian", |
|
21 | + "cs" => "czech", |
|
22 | + "da" => "danish", |
|
23 | + "fi" => "finnish-utf8", |
|
24 | + "fr" => "francais-utf8", |
|
25 | + "de" => "german", |
|
26 | + "he" => "hebrew", |
|
27 | + "it" => "italian", |
|
28 | + "ja" => "japanese-utf8", |
|
29 | + "nl" => "nederlands-utf8", |
|
30 | + "no" => "norwegian", |
|
31 | + "fa" => "persian", |
|
32 | + "pl" => "polish-utf8", |
|
33 | + "pt" => "portuguese-br-utf8", |
|
34 | 34 | // "pt" => "portuguese", |
35 | - "ru" => "russian-UTF8", |
|
36 | - "es" => "spanish-utf8", |
|
37 | - "sv" => "svenska" |
|
35 | + "ru" => "russian-UTF8", |
|
36 | + "es" => "spanish-utf8", |
|
37 | + "sv" => "svenska" |
|
38 | 38 | ); |
39 | 39 | $_langISO6391 = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2); |
40 | 40 | if (!empty($_langFiles[$_langISO6391])) $install_language = $_langFiles[$_langISO6391]; |
41 | 41 | |
42 | 42 | |
43 | 43 | if (isset($_POST['language']) && !stristr($_POST['language'],"..")) { |
44 | - $install_language = $_POST['language']; |
|
44 | + $install_language = $_POST['language']; |
|
45 | 45 | } else { |
46 | - if (isset($_GET['language']) && !stristr($_GET['language'],"..")) |
|
47 | - $install_language = $_GET['language']; |
|
46 | + if (isset($_GET['language']) && !stristr($_GET['language'],"..")) |
|
47 | + $install_language = $_GET['language']; |
|
48 | 48 | } |
49 | 49 | # load language file |
50 | 50 | require_once("lang/english.inc.php"); // As fallback |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | $manager_language = $install_language; |
54 | 54 | |
55 | 55 | if (isset($_POST['managerlanguage']) && !stristr($_POST['managerlanguage'],"..")) { |
56 | - $manager_language = $_POST['managerlanguage']; |
|
56 | + $manager_language = $_POST['managerlanguage']; |
|
57 | 57 | } else { |
58 | - if (isset($_GET['managerlanguage']) && !stristr($_GET['managerlanguage'],"..")) |
|
59 | - $manager_language = $_GET['managerlanguage']; |
|
58 | + if (isset($_GET['managerlanguage']) && !stristr($_GET['managerlanguage'],"..")) |
|
59 | + $manager_language = $_GET['managerlanguage']; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | foreach($_lang as $k=>$v) |
63 | 63 | { |
64 | - if(strpos($v,'[+MGR_DIR+]')!==false) |
|
65 | - $_lang[$k] = str_replace('[+MGR_DIR+]', MGR_DIR, $v); |
|
64 | + if(strpos($v,'[+MGR_DIR+]')!==false) |
|
65 | + $_lang[$k] = str_replace('[+MGR_DIR+]', MGR_DIR, $v); |
|
66 | 66 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | $autoloader = __DIR__.'/vendor/autoload.php'; |
49 | 49 | if (file_exists($autoloader) && is_readable($autoloader)) { |
50 | - include_once($autoloader); |
|
50 | + include_once($autoloader); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true); |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | if(is_file($base_path . 'assets/cache/siteManager.php')) |
57 | 57 | include_once($base_path . 'assets/cache/siteManager.php'); |
58 | 58 | if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) |
59 | - define('MGR_DIR','manager'); |
|
59 | + define('MGR_DIR','manager'); |
|
60 | 60 | if(is_file($base_path . 'assets/cache/siteHostnames.php')) |
61 | 61 | include_once($base_path . 'assets/cache/siteHostnames.php'); |
62 | 62 | if(!defined('MODX_SITE_HOSTNAMES')) |
63 | - define('MODX_SITE_HOSTNAMES',''); |
|
63 | + define('MODX_SITE_HOSTNAMES',''); |
|
64 | 64 | |
65 | 65 | // get start time |
66 | 66 | $mstart = memory_get_usage(); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | define("IN_PARSER_MODE", true); |
86 | 86 | if (!defined('IN_MANAGER_MODE')) { |
87 | - define("IN_MANAGER_MODE", false); |
|
87 | + define("IN_MANAGER_MODE", false); |
|
88 | 88 | } |
89 | 89 | if (!defined('MODX_API_MODE')) { |
90 | 90 | define('MODX_API_MODE', false); |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | |
93 | 93 | // get the required includes |
94 | 94 | if(!isset($database_user) || $database_user=="") { |
95 | - $rt = @include_once(dirname(__FILE__).'/'.MGR_DIR.'/includes/config.inc.php'); |
|
96 | - // Be sure config.inc.php is there and that it contains some important values |
|
97 | - if(!$rt || !$database_type || !$database_server || !$database_user || !$dbase) { |
|
98 | - readfile('install/not_installed.tpl'); |
|
99 | - exit; |
|
100 | - } |
|
95 | + $rt = @include_once(dirname(__FILE__).'/'.MGR_DIR.'/includes/config.inc.php'); |
|
96 | + // Be sure config.inc.php is there and that it contains some important values |
|
97 | + if(!$rt || !$database_type || !$database_server || !$database_user || !$dbase) { |
|
98 | + readfile('install/not_installed.tpl'); |
|
99 | + exit; |
|
100 | + } |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | // start session |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | |
106 | 106 | // initiate a new document parser |
107 | 107 | if (isset($coreClass) && class_exists($coreClass)) { |
108 | - $modx = new $coreClass; |
|
108 | + $modx = new $coreClass; |
|
109 | 109 | } |
110 | 110 | if (!isset($modx) || !($modx instanceof \DocumentParser)) { |
111 | - include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
112 | - $modx = new \DocumentParser; |
|
111 | + include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
112 | + $modx = new \DocumentParser; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | // set some parser options |