Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> Settings have to be removed ;)
  • Loading branch information
NaysKutzu committed May 5, 2024
1 parent 3702ceb commit a034bbb
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
composer.phar
/vendor/
/logs/*.log

/settings.json
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
8 changes: 0 additions & 8 deletions commands/custom/hello.php

This file was deleted.

21 changes: 21 additions & 0 deletions commands/custom/setup.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
use MythicalSystemsFramework\Cli\Colors as color;
use MythicalSystemsFramework\Database\MySQL;
use MythicalSystemsFramework\Managers\ConfigManager as cfg;

class setupCommand
{
public function execute()
{
$db = new MySQL();
if ($db->tryConnection(cfg::get("database", "host"), cfg::get("database", "port"), cfg::get("database", "username"), cfg::get("database", "password"), cfg::get("database", "name")) == true) {
echo color::translateColorsCode("&fConnection to the database was &asuccessful!&o");
echo color::NewLine();
if (cfg::get("encryption","key") == "") {
die(color::translateColorsCode("&cEncryption key is not set!&o&fHave you set it up already?&o"));
}
} else {
die(color::translateColorsCode("&cFailed to connect to the database!&o&fHave you set it up already?&o"));
}
}
}
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

0 comments on commit a034bbb

Please sign in to comment.