create character name config moved to settings

This commit is contained in:
slawkens
2023-07-22 10:57:42 +02:00
parent d82e3a21e5
commit aad175548a
7 changed files with 32 additions and 20 deletions

View File

@@ -18,8 +18,8 @@ class CreateCharacter
*/
public function checkName($name, &$errors)
{
$minLength = config('character_name_min_length');
$maxLength = config('character_name_max_length');
$minLength = setting('core.create_character_name_min_length');
$maxLength = setting('core.create_character_name_max_length');
if(empty($name)) {
$errors['name'] = 'Please enter a name for your character!';

View File

@@ -180,8 +180,8 @@ class Validator
return false;
}
$minLength = config('character_name_min_length');
$maxLength = config('character_name_max_length');
$minLength = setting('core.create_character_name_min_length');
$maxLength = setting('core.create_character_name_max_length');
// installer doesn't know config.php yet
// that's why we need to ignore the nulls
@@ -221,7 +221,7 @@ class Validator
return false;
}
$npcCheck = config('character_name_npc_check');
$npcCheck = setting('core.create_character_name_npc_check');
if ($npcCheck) {
require_once LIBS . 'npc.php';
NPCS::load();
@@ -332,7 +332,7 @@ class Validator
return false;
}
$npcCheck = config('character_name_npc_check');
$npcCheck = setting('core.create_character_name_npc_check');
if ($npcCheck) {
require_once LIBS . 'npc.php';
NPCS::load();