You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 More fixes 🆙
This commit is contained in:
@@ -9,6 +9,9 @@ class WebsiteSettingsSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
|
$hotelNameSetting = setting('hotel_name');
|
||||||
|
$defaultNameConfig = config('habbo.site.default_name');
|
||||||
|
$hotelName = is_string($hotelNameSetting) ? $hotelNameSetting : (is_string($defaultNameConfig) ? $defaultNameConfig : '');
|
||||||
$settings = [
|
$settings = [
|
||||||
[
|
[
|
||||||
'key' => 'theme',
|
'key' => 'theme',
|
||||||
@@ -32,7 +35,7 @@ class WebsiteSettingsSeeder extends Seeder
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'key' => 'start_motto',
|
'key' => 'start_motto',
|
||||||
'value' => sprintf('I love %s hotel', setting('hotel_name') ?? config('habbo.site.default_name')),
|
'value' => sprintf('I love %s hotel', $hotelName),
|
||||||
'comment' => 'Specifies the start motto the user gets assigned upon registration',
|
'comment' => 'Specifies the start motto the user gets assigned upon registration',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -147,7 +150,7 @@ class WebsiteSettingsSeeder extends Seeder
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'key' => 'maintenance_message',
|
'key' => 'maintenance_message',
|
||||||
'value' => "We're working very hard on making " . setting('hotel_name') . ' the best possible version of itself 💛<br><br> We want to make sure ' . setting('hotel_name') . ' lives up to the standards you deserve, hence we currently have no ETA for when we can open our doors.<br><br>We promise that once we feel confident that ' . setting('hotel_name') . " is ready for launch, we'll let everyone know about it.<br><br>- The " . setting('hotel_name') . ' team ⭐',
|
'value' => "We're working very hard on making " . $hotelName . ' the best possible version of itself 💛<br><br> We want to make sure ' . $hotelName . ' lives up to the standards you deserve, hence we currently have no ETA for when we can open our doors.<br><br>We promise that once we feel confident that ' . $hotelName . " is ready for launch, we'll let everyone know about it.<br><br>- The " . $hotelName . ' team ⭐',
|
||||||
'comment' => 'The maintenance message displayed to users while maintenance is activated',
|
'comment' => 'The maintenance message displayed to users while maintenance is activated',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -295,7 +298,7 @@ class WebsiteSettingsSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$recaptchaEnabled = WebsiteSetting::query()->where('key', 'google_recaptcha_enabled')->first();
|
$recaptchaEnabledValue = WebsiteSetting::query()->where('key', 'google_recaptcha_enabled')->value('value');
|
||||||
|
|
||||||
// This is done to update the rare values key for existing applications
|
// This is done to update the rare values key for existing applications
|
||||||
WebsiteSetting::query()->where('key', 'rare_values_icons_path')->update([
|
WebsiteSetting::query()->where('key', 'rare_values_icons_path')->update([
|
||||||
@@ -303,7 +306,7 @@ class WebsiteSettingsSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Disables cloudflare turnstile if the seeder is run while having google recaptcha enabled.
|
// Disables cloudflare turnstile if the seeder is run while having google recaptcha enabled.
|
||||||
if ($recaptchaEnabled->value === '1') {
|
if ($recaptchaEnabledValue === '1') {
|
||||||
WebsiteSetting::query()->where('key', 'cloudflare_turnstile_enabled')->update([
|
WebsiteSetting::query()->where('key', 'cloudflare_turnstile_enabled')->update([
|
||||||
'value' => '0',
|
'value' => '0',
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user