diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-04-28 19:39:11 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-04-28 19:39:11 +0200 |
commit | 86acea61b18ae3cb3ef6c28d8edd080a34539f56 (patch) | |
tree | 847692d7b1600e23a1c06208e256d003d2fe3f00 /ratatoeskr/setup/setup.php | |
parent | 5a307b0688f394156951af57efb54d65e94878c0 (diff) | |
download | ratatoeskr-cms-86acea61b18ae3cb3ef6c28d8edd080a34539f56.tar.gz ratatoeskr-cms-86acea61b18ae3cb3ef6c28d8edd080a34539f56.tar.bz2 ratatoeskr-cms-86acea61b18ae3cb3ef6c28d8edd080a34539f56.zip |
Format config generation code
Diffstat (limited to 'ratatoeskr/setup/setup.php')
-rw-r--r-- | ratatoeskr/setup/setup.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ratatoeskr/setup/setup.php b/ratatoeskr/setup/setup.php index a5ebba2..3e3be9c 100644 --- a/ratatoeskr/setup/setup.php +++ b/ratatoeskr/setup/setup.php @@ -234,8 +234,17 @@ STYLE; } /* Almost done. Give the user the config file. */ - $config = "<?php\n\ndefine(\"__DEBUG__\", False);\ndefine(\"CONFIG_FILLED_OUT\", True);\ndefine(\"PLUGINS_ENABLED\", True);\n\n\$config[\"mysql\"][\"server\"] = '" . addcslashes($config["mysql"]["server"], "'") . "';\n\$config[\"mysql\"][\"db\"] = '" . addcslashes($config["mysql"]["db"], "'") . "';\n\$config[\"mysql\"][\"user\"] = '" . addcslashes($config["mysql"]["user"], "'") . "';\n\$config[\"mysql\"][\"passwd\"] = '" . addcslashes($config["mysql"]["passwd"], "'") . "';\n\$config[\"mysql\"][\"prefix\"] = '" . addcslashes($config["mysql"]["prefix"], "'") . "';\n\n?>"; - $ste->vars["config"] = $config; + $ste->vars["config"] = "<?php\n" + . "\n" + . "define(\"__DEBUG__\", false);\n" + . "define(\"CONFIG_FILLED_OUT\", true);\n" + . "define(\"PLUGINS_ENABLED\", true);\n" + . "\n" + . "\$config[\"mysql\"][\"server\"] = '" . addcslashes($config["mysql"]["server"], "'") . "';\n" + . "\$config[\"mysql\"][\"db\"] = '" . addcslashes($config["mysql"]["db"], "'") . "';\n" + . "\$config[\"mysql\"][\"user\"] = '" . addcslashes($config["mysql"]["user"], "'") . "';\n" + . "\$config[\"mysql\"][\"passwd\"] = '" . addcslashes($config["mysql"]["passwd"], "'") . "';\n" + . "\$config[\"mysql\"][\"prefix\"] = '" . addcslashes($config["mysql"]["prefix"], "'") . "';"; die($ste->exectemplate("/systemtemplates/setup_done.html")); } catch (MySQLException $e) { $ste->vars["error"] = $e->getMessage(); |