You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 Fix cms as now on epicnabbo.nl 🆙
This commit is contained in:
+1
-1
@@ -53,6 +53,6 @@ class TwoFactorAuthenticatedSessionController extends Controller
|
||||
'ip_current' => $request->ip(),
|
||||
]);
|
||||
|
||||
return app(TwoFactorLoginResponse::class);
|
||||
return resolve(TwoFactorLoginResponse::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class CreateNewUser implements CreatesNewUsers
|
||||
'beta_code' => ['sometimes', 'string', new BetaCodeRule],
|
||||
'terms' => ['required', 'accepted'],
|
||||
'g-recaptcha-response' => ['sometimes', 'string', new GoogleRecaptchaRule],
|
||||
'cf-turnstile-response' => [app(Turnstile::class)],
|
||||
'cf-turnstile-response' => [resolve(Turnstile::class)],
|
||||
];
|
||||
|
||||
$messages = [
|
||||
|
||||
@@ -179,7 +179,7 @@ class RedirectIfTwoFactorAuthenticatable
|
||||
}
|
||||
|
||||
if (setting('cloudflare_turnstile_enabled') !== '' && setting('cloudflare_turnstile_enabled') !== '0') {
|
||||
$rules['cf-turnstile-response'] = ['required', app(Turnstile::class)];
|
||||
$rules['cf-turnstile-response'] = ['required', resolve(Turnstile::class)];
|
||||
}
|
||||
|
||||
$messages = [
|
||||
|
||||
@@ -123,7 +123,7 @@ class BadgePage extends Page
|
||||
return;
|
||||
}
|
||||
|
||||
$badgeData = app(ExternalTextsParser::class)->getBadgeData($badgeCode);
|
||||
$badgeData = resolve(ExternalTextsParser::class)->getBadgeData($badgeCode);
|
||||
$this->badgeWasPreviouslyCreated = is_array($badgeData['nitro']) || is_array($badgeData['flash']);
|
||||
|
||||
if ($this->badgeWasPreviouslyCreated) {
|
||||
@@ -202,7 +202,7 @@ class BadgePage extends Page
|
||||
return;
|
||||
}
|
||||
|
||||
$externalTextsParser = app(ExternalTextsParser::class);
|
||||
$externalTextsParser = resolve(ExternalTextsParser::class);
|
||||
|
||||
if ((empty($this->data['nitro']) && $nitroEnabled) || (empty($this->data['flash']) && $flashEnabled)) {
|
||||
Notification::make()
|
||||
|
||||
@@ -56,7 +56,7 @@ class Login extends \Filament\Auth\Pages\Login
|
||||
|
||||
session()->regenerate();
|
||||
|
||||
return app(LoginResponse::class);
|
||||
return resolve(LoginResponse::class);
|
||||
}
|
||||
|
||||
protected function throwFailureValidationException(): never
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class BadgeTextEditorResource extends Resource
|
||||
#[\Override]
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
$settingsService = app(SettingsService::class);
|
||||
$settingsService = resolve(SettingsService::class);
|
||||
$badgesPath = $settingsService->getOrDefault('badges_path', '/gamedata/c_images/album1584/');
|
||||
|
||||
return $table
|
||||
|
||||
@@ -10,7 +10,7 @@ class CustomQueryBuilder extends Builder
|
||||
public function __construct()
|
||||
{
|
||||
// Call the parent constructor with a dummy query
|
||||
parent::__construct(app('db')->query());
|
||||
parent::__construct(resolve('db')->query());
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
|
||||
@@ -58,7 +58,7 @@ class EditUser extends EditRecord
|
||||
$this->halt();
|
||||
}
|
||||
|
||||
$rcon = app(RconService::class);
|
||||
$rcon = resolve(RconService::class);
|
||||
|
||||
if (! $user->online) {
|
||||
DB::transaction(function () use ($user, $data): void {
|
||||
@@ -152,7 +152,7 @@ class EditUser extends EditRecord
|
||||
return;
|
||||
}
|
||||
|
||||
app(SendCurrency::class)->execute($user, $currencyType, -$currency->amount + $updatedCurrencyAmount);
|
||||
resolve(SendCurrency::class)->execute($user, $currencyType, -$currency->amount + $updatedCurrencyAmount);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ class BadgesRelationManager extends RelationManager
|
||||
->persistent()
|
||||
->send();
|
||||
} else {
|
||||
$rcon = app(RconService::class);
|
||||
$rcon = resolve(RconService::class);
|
||||
$data = $action->getFormData();
|
||||
|
||||
$rcon->sendSafelyFromDashboard('sendBadge', [$user, $data['badge_code']], 'RCON: Failed to send the badge');
|
||||
@@ -119,7 +119,7 @@ class BadgesRelationManager extends RelationManager
|
||||
->persistent()
|
||||
->send();
|
||||
} else {
|
||||
$rcon = app(RconService::class);
|
||||
$rcon = resolve(RconService::class);
|
||||
$badge = $action instanceof DeleteAction
|
||||
? $action->getRecord()?->badge_code
|
||||
: $action->getRecords()->map(fn ($record) => $record->badge_code)->join(';');
|
||||
|
||||
@@ -9,21 +9,21 @@ use Illuminate\Support\Str;
|
||||
if (! function_exists('setting')) {
|
||||
function setting(string $setting): string
|
||||
{
|
||||
return app(SettingsService::class)->getOrDefault($setting);
|
||||
return resolve(SettingsService::class)->getOrDefault($setting);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('hasPermission')) {
|
||||
function hasPermission(string $permission): string
|
||||
{
|
||||
return app(PermissionsService::class)->getOrDefault($permission);
|
||||
return resolve(PermissionsService::class)->getOrDefault($permission);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('hasHousekeepingPermission')) {
|
||||
function hasHousekeepingPermission(string $permission): string
|
||||
{
|
||||
return app(HousekeepingPermissionsService::class)->getOrDefault($permission);
|
||||
return resolve(HousekeepingPermissionsService::class)->getOrDefault($permission);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ class ShopController extends Controller
|
||||
|
||||
public function handleFurniture(array $furniture)
|
||||
{
|
||||
$sendFurniture = app(SendFurniture::class);
|
||||
$sendFurniture = resolve(SendFurniture::class);
|
||||
|
||||
$sendFurniture->execute(Auth::user(), $furniture);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class AccountSettingsFormRequest extends FormRequest
|
||||
'mail' => ['required', 'email', Rule::unique('users')->ignore($this->user()->id), new WebsiteWordfilterRule],
|
||||
'motto' => ['nullable', 'string', 'max:127', new WebsiteWordfilterRule],
|
||||
'g-recaptcha-response' => [new GoogleRecaptchaRule],
|
||||
'cf-turnstile-response' => [app(Turnstile::class)],
|
||||
'cf-turnstile-response' => [resolve(Turnstile::class)],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class PasswordSettingsFormRequest extends FormRequest
|
||||
'current_password' => ['required', 'string', new CurrentPasswordRule],
|
||||
'password' => $this->passwordRules(),
|
||||
'g-recaptcha-response' => [new GoogleRecaptchaRule],
|
||||
'cf-turnstile-response' => [app(Turnstile::class)],
|
||||
'cf-turnstile-response' => [resolve(Turnstile::class)],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class RegisterFormRequest extends FormRequest
|
||||
'password' => ['required', 'string', 'confirmed', 'min:8'],
|
||||
'terms' => ['required', 'accepted'],
|
||||
'g-recaptcha-response' => [new GoogleRecaptchaRule],
|
||||
'cf-turnstile-response' => [app(Turnstile::class)],
|
||||
'cf-turnstile-response' => [resolve(Turnstile::class)],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class ShopVoucherFormRequest extends FormRequest
|
||||
return [
|
||||
'code' => ['required', 'string'],
|
||||
'g-recaptcha-response' => [new GoogleRecaptchaRule],
|
||||
'cf-turnstile-response' => [app(Turnstile::class)],
|
||||
'cf-turnstile-response' => [resolve(Turnstile::class)],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class StaffApplicationFormRequest extends FormRequest
|
||||
return [
|
||||
'content' => ['required', 'string'],
|
||||
'g-recaptcha-response' => [new GoogleRecaptchaRule],
|
||||
'cf-turnstile-response' => [app(Turnstile::class)],
|
||||
'cf-turnstile-response' => [resolve(Turnstile::class)],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
|
||||
public function confirmTwoFactorAuthentication($code)
|
||||
{
|
||||
$codeIsValid = app(TwoFactorAuthenticationProvider::class)
|
||||
$codeIsValid = resolve(TwoFactorAuthenticationProvider::class)
|
||||
->verify(decrypt($this->two_factor_secret), $code);
|
||||
|
||||
if (! $codeIsValid) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class WebsiteAd extends Model
|
||||
protected function imageUrl(): \Illuminate\Database\Eloquent\Casts\Attribute
|
||||
{
|
||||
return \Illuminate\Database\Eloquent\Casts\Attribute::make(get: function () {
|
||||
$settingsService = app(SettingsService::class);
|
||||
$settingsService = resolve(SettingsService::class);
|
||||
$adsPicturePath = Cache::remember('ads_picture_path', 3600, fn () => $settingsService->getOrDefault('ads_picture_path'));
|
||||
if (! str_starts_with((string) $adsPicturePath, 'http')) {
|
||||
$adsPicturePath = rtrim((string) config('app.url'), '/') . '/' . ltrim((string) $adsPicturePath, '/');
|
||||
@@ -56,7 +56,7 @@ class WebsiteAd extends Model
|
||||
|
||||
protected function configureAdsDisk(): void
|
||||
{
|
||||
$settingsService = app(SettingsService::class);
|
||||
$settingsService = resolve(SettingsService::class);
|
||||
|
||||
$adsPath = Cache::remember('ads_path_filesystem', 3600, fn () => $settingsService->getOrDefault('ads_path_filesystem'));
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
$table->paginated([10, 25, 50]);
|
||||
});
|
||||
|
||||
$settingsService = app(SettingsService::class);
|
||||
$settingsService = resolve(SettingsService::class);
|
||||
$badgePath = $settingsService->getOrDefault('badge_path_filesystem', '/var/www/gamedata/c_images/album1584');
|
||||
Config::set('filesystems.disks.badges.root', $badgePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user