🤖 Auto commit for release 'v6.2.20' on 2025-07-02

This commit is contained in:
JC5
2025-07-02 06:03:17 +02:00
parent 80c2f1ea3f
commit 323d04fe6c
8 changed files with 87 additions and 78 deletions

View File

@@ -175,10 +175,10 @@ class StandardMessageGenerator implements MessageGeneratorInterface
case WebhookResponse::ACCOUNTS->value:
/** @var TransactionGroup $model */
$accounts = $this->collectAccounts($model);
$enrichment = new AccountEnrichment();
$enrichment = new AccountEnrichment();
$enrichment->setUser($model->user);
$enrichment->setNative(Amount::getNativeCurrencyByUserGroup($model->userGroup));
$accounts = $enrichment->enrich($accounts);
$accounts = $enrichment->enrich($accounts);
foreach ($accounts as $account) {
$transformer = new AccountTransformer();
$transformer->setParameters(new ParameterBag());

View File

@@ -23,8 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers;
use function Safe\realpath;
use function Safe\ini_get;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\Steam;
@@ -38,6 +36,9 @@ use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Route;
use function Safe\realpath;
use function Safe\ini_get;
/**
* Class Controller.
*
@@ -78,12 +79,12 @@ abstract class Controller extends BaseController
View::share('featuringWebhooks', true === config('firefly.feature_flags.webhooks') && true === config('firefly.allow_webhooks'));
// share custom auth guard info.
$authGuard = config('firefly.authentication_guard');
$logoutUrl = config('firefly.custom_logout_url');
$authGuard = config('firefly.authentication_guard');
$logoutUrl = config('firefly.custom_logout_url');
// overrule v2 layout back to v1.
if ('true' === request()->get('force_default_layout') && 'v2' === config('view.layout')) {
//config('view.layout','v1');
// config('view.layout','v1');
Config::set('view.layout', 'v1');
View::getFinder()->setPaths([realpath(base_path('resources/views'))]); // @phpstan-ignore-line
}
@@ -92,15 +93,15 @@ abstract class Controller extends BaseController
View::share('logoutUrl', $logoutUrl);
// upload size
$maxFileSize = Steam::phpBytes((string) ini_get('upload_max_filesize'));
$maxPostSize = Steam::phpBytes((string) ini_get('post_max_size'));
$uploadSize = min($maxFileSize, $maxPostSize);
$maxFileSize = Steam::phpBytes((string) ini_get('upload_max_filesize'));
$maxPostSize = Steam::phpBytes((string) ini_get('post_max_size'));
$uploadSize = min($maxFileSize, $maxPostSize);
View::share('uploadSize', $uploadSize);
// share is alpha, is beta
$isAlpha = false;
$isBeta = false;
$isDevelop = false;
$isAlpha = false;
$isBeta = false;
$isDevelop = false;
if (str_contains((string) config('firefly.version'), 'alpha')) {
$isAlpha = true;
}
@@ -118,7 +119,7 @@ abstract class Controller extends BaseController
$this->middleware(
function ($request, $next): mixed {
$locale = Steam::getLocale();
$locale = Steam::getLocale();
// translations for specific strings:
$this->monthFormat = (string) trans('config.month_js', [], $locale);
$this->monthAndDayFormat = (string) trans('config.month_and_day_js', [], $locale);

View File

@@ -56,7 +56,7 @@ class RemoteUserGuard implements Guard
public function authenticate(): void
{
Log::debug(sprintf('Now at %s', __METHOD__));
Log::debug(sprintf('Now at %s', __METHOD__));
if ($this->user instanceof User) {
Log::debug(sprintf('%s is found: #%d, "%s".', $this->user::class, $this->user->id, $this->user->email));
@@ -67,7 +67,7 @@ class RemoteUserGuard implements Guard
$userID = request()->server($header) ?? null;
if (function_exists('apache_request_headers')) {
Log::debug('Use apache_request_headers to find user ID.');
Log::debug('Use apache_request_headers to find user ID.');
$userID = request()->server($header) ?? apache_request_headers()[$header] ?? null;
}
@@ -77,7 +77,7 @@ class RemoteUserGuard implements Guard
throw new FireflyException('The guard header was unexpectedly empty. See the logs.');
}
Log::debug(sprintf('User ID found in header is "%s"', $userID));
Log::debug(sprintf('User ID found in header is "%s"', $userID));
/** @var User $retrievedUser */
$retrievedUser = $this->provider->retrieveById($userID);

View File

@@ -54,7 +54,7 @@ class SetDescription implements ActionInterface
// replace newlines.
$after = trim(str_replace(["\r", "\n", "\t", "\036", "\025"], '', $after));
if('' === $after) {
if ('' === $after) {
Log::warning('Action resulted in an empty description, reset to default value.');
$after = '(no description)';
}