diff --git a/php/access/installation.php b/php/access/installation.php deleted file mode 100644 index 085bca2..0000000 --- a/php/access/installation.php +++ /dev/null @@ -1,23 +0,0 @@ - \ No newline at end of file diff --git a/php/access/installation_foo.php b/php/access/installation_foo.php new file mode 100644 index 0000000..dd03925 --- /dev/null +++ b/php/access/installation_foo.php @@ -0,0 +1,39 @@ +dbCreateConfig(); break; + + # Error + default: exit('Warning: No configuration!'); + return false; break; + + } + + return true; + + } + + private function dbCreateConfig() { + + Module::dependencies(isset($_POST['dbHost'], $_POST['dbUser'], $_POST['dbPassword'], $_POST['dbName'])); + echo Database::createConfig($_POST['dbHost'], $_POST['dbUser'], $_POST['dbPassword'], $_POST['dbName']); + + } + +} + +?> \ No newline at end of file diff --git a/php/api.php b/php/api.php index d5c0254..ba10379 100755 --- a/php/api.php +++ b/php/api.php @@ -35,7 +35,11 @@ if (!empty($_POST['function'])||!empty($_GET['function'])) { ### define('LYCHEE_ACCESS_INSTALLATION', true); - require(__DIR__ . '/access/installation.php'); + require(__DIR__ . '/access/installation_foo.php'); + + $installation = new Installation(null, null, null); + $installation->check($_POST['function']); + exit(); }