mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
🤖 Auto commit for release 'v6.2.20' on 2025-07-02
This commit is contained in:
@@ -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());
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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)';
|
||||
}
|
||||
|
Reference in New Issue
Block a user