From 21447a9b2f9efe542e1dd7012d25464f042cd28a Mon Sep 17 00:00:00 2001 From: JC5 Date: Fri, 13 Mar 2026 08:11:23 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Auto=20commit=20for=20release=20?= =?UTF-8?q?'develop'=20on=202026-03-13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Models/Recurrence/TriggerController.php | 1 - .../V1/Controllers/System/BatchController.php | 1 - .../Autocomplete/AutocompleteApiRequest.php | 1 - app/Console/Commands/SendTestEmail.php | 17 ++++++++--------- .../Admin/NotificationController.php | 10 ++++++---- app/Http/Controllers/Auth/LoginController.php | 1 - .../Controllers/Auth/RegisterController.php | 1 - app/Http/Middleware/Authenticate.php | 3 --- app/Providers/RouteServiceProvider.php | 1 - config/firefly.php | 2 +- resources/lang/en_US/firefly.php | 4 ++-- 11 files changed, 17 insertions(+), 25 deletions(-) diff --git a/app/Api/V1/Controllers/Models/Recurrence/TriggerController.php b/app/Api/V1/Controllers/Models/Recurrence/TriggerController.php index 62bd89c072..f3f1f31dc0 100644 --- a/app/Api/V1/Controllers/Models/Recurrence/TriggerController.php +++ b/app/Api/V1/Controllers/Models/Recurrence/TriggerController.php @@ -1,6 +1,5 @@ getUser(); + $user = $this->getUser(); if (!$user->hasRole('owner')) { - $this->friendlyError((string)trans('firefly.must_be_owner')); + $this->friendlyError((string) trans('firefly.must_be_owner')); return Command::FAILURE; } /** @var int $lastNotification */ $lastNotification = FireflyConfig::get('last_test_notification', 123)->data; - if (time() - $lastNotification < 120) { - $this->friendlyError((string)trans('firefly.test_rate_limited')); + if ((time() - $lastNotification) < 120) { + $this->friendlyError((string) trans('firefly.test_rate_limited')); return Command::FAILURE; } - - $owner = new OwnerNotifiable(); + $owner = new OwnerNotifiable(); event(new OwnerTestsNotificationChannel('email', $owner)); - FireflyConfig::set('last_test_notification',time()); + FireflyConfig::set('last_test_notification', time()); + return Command::SUCCESS; } } diff --git a/app/Http/Controllers/Admin/NotificationController.php b/app/Http/Controllers/Admin/NotificationController.php index e98f2ba4ad..2c78c6eead 100644 --- a/app/Http/Controllers/Admin/NotificationController.php +++ b/app/Http/Controllers/Admin/NotificationController.php @@ -123,16 +123,17 @@ final class NotificationController extends Controller return redirect(route('settings.notification.index')); } + /** @var int $lastNotification */ $lastNotification = FireflyConfig::get('last_test_notification', 123)->data; - if (time() - $lastNotification < 120) { + if ((time() - $lastNotification) < 120) { session()->flash('error', (string) trans('firefly.test_rate_limited')); return redirect(route('settings.notification.index')); } - $all = $request->all(); - $channel = $all['test_submit'] ?? ''; + $all = $request->all(); + $channel = $all['test_submit'] ?? ''; switch ($channel) { default: @@ -149,7 +150,8 @@ final class NotificationController extends Controller event(new OwnerTestsNotificationChannel($channel, $owner)); session()->flash('success', (string) trans('firefly.notification_test_executed', ['channel' => $channel])); } - FireflyConfig::set('last_test_notification',time()); + FireflyConfig::set('last_test_notification', time()); + return redirect(route('settings.notification.index')); } } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index d115582890..052197a2c0 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -33,7 +33,6 @@ use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Support\Facades\FireflyConfig; use FireflyIII\Support\Facades\Steam; use FireflyIII\User; - use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Foundation\Auth\AuthenticatesUsers; diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index aa64e06dc6..f21f87a102 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -31,7 +31,6 @@ use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Support\Facades\FireflyConfig; use FireflyIII\Support\Http\Controllers\CreateStuff; use FireflyIII\User; - use Illuminate\Contracts\View\Factory; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Http\RedirectResponse; diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 3312cea82e..5616479cf2 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -26,14 +26,12 @@ namespace FireflyIII\Http\Middleware; use Closure; use FireflyIII\Exceptions\FireflyException; - use FireflyIII\User; use Illuminate\Auth\AuthenticationException; use Illuminate\Contracts\Auth\Factory as Auth; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; - /** * Class Authenticate */ @@ -100,7 +98,6 @@ class Authenticate throw new FireflyException('This point is generally unreachable.'); - // exit('five'); // foreach ($guards as $guard) { // exit('six'); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 67f5a5f643..24b8e6ecf9 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace FireflyIII\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; - use Override; /** diff --git a/config/firefly.php b/config/firefly.php index c97754d4c5..5cadcece2b 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -79,7 +79,7 @@ return [ // see cer.php for exchange rates feature flag. ], 'version' => 'develop/2026-03-13', - 'build_time' => 1773370359, + 'build_time' => 1773385699, 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 28, // field is no longer used. diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 71a833d0ee..bae73ee172 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -197,7 +197,7 @@ return [ 'journals_in_period_for_category' => 'All transactions for category :name between :start and :end', 'journals_in_period_for_tag' => 'All transactions for tag :tag between :start and :end', 'not_available_demo_user' => 'The feature you try to access is not available to demo users.', - 'test_rate_limited' => 'Please wait a moment before trying again', + 'test_rate_limited' => 'Please wait a moment before trying again', 'exchange_rate_instructions' => 'Asset account "@name" only accepts transactions in @primary_currency. If you wish to use @foreign_currency instead, make sure that the amount in @primary_currency is known as well:', 'transfer_exchange_rate_instructions' => 'Source asset account "@source_name" only accepts transactions in @source_currency. Destination asset account "@dest_name" only accepts transactions in @dest_currency. You must provide the transferred amount correctly in both currencies.', 'transaction_data' => 'Transaction data', @@ -1527,7 +1527,7 @@ return [ 'administration_role_mng_currencies' => 'Manage currencies', 'administration_role_view_reports' => 'View reports', 'administration_role_full' => 'Full access', - 'must_be_owner' => 'You must be system owner to do this', + 'must_be_owner' => 'You must be system owner to do this', // mfa 'enable_mfa' => 'Enable multi-factor authentication',