Refactoring classes into src/ folder, so they will be auto-loaded by composer

This commit is contained in:
slawkens
2024-01-27 00:36:49 +01:00
parent 410d75c882
commit 1a6fb8bee2
78 changed files with 439 additions and 341 deletions

View File

@@ -8,6 +8,9 @@
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\CreateCharacter;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Create Account';
@@ -21,7 +24,6 @@ if($logged)
}
if(setting('core.account_create_character_create')) {
require_once LIBS . 'CreateCharacter.php';
$createCharacter = new CreateCharacter();
}

View File

@@ -8,6 +8,9 @@
* @copyright 2019 MyAAC
* @link https://my-aac.org
*/
use MyAAC\CreateCharacter;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Create Character';
@@ -30,7 +33,6 @@ $character_created = false;
$save = isset($_POST['save']) && $_POST['save'] == 1;
$errors = array();
if($save) {
require_once LIBS . 'CreateCharacter.php';
$createCharacter = new CreateCharacter();
$character_created = $createCharacter->doCreate($character_name, $character_sex, $character_vocation, $character_town, $account_logged, $errors);