🤖 Auto commit for release 'develop' on 2025-12-20

This commit is contained in:
JC5
2025-12-20 07:06:47 +01:00
parent 8e729d6bbf
commit 3b8caba37c
74 changed files with 214 additions and 147 deletions

View File

@@ -29,6 +29,7 @@ use FireflyIII\Api\V1\Requests\System\CronRequest;
use FireflyIII\Support\Http\Controllers\CronRunner; use FireflyIII\Support\Http\Controllers\CronRunner;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class CronController * Class CronController
@@ -50,7 +51,7 @@ class CronController extends Controller
$return = []; $return = [];
$return['recurring_transactions'] = $this->runRecurring($config['force'], $config['date']); $return['recurring_transactions'] = $this->runRecurring($config['force'], $config['date']);
$return['auto_budgets'] = $this->runAutoBudget($config['force'], $config['date']); $return['auto_budgets'] = $this->runAutoBudget($config['force'], $config['date']);
if (true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data) { if (true === FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data) {
$return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']); $return['exchange_rates'] = $this->exchangeRatesCronJob($config['force'], $config['date']);
} }
$return['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']); $return['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']);

View File

@@ -38,6 +38,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class AttemptController * Class AttemptController
@@ -71,7 +72,7 @@ class AttemptController extends Controller
if ($message->webhook_id !== $webhook->id) { if ($message->webhook_id !== $webhook->id) {
throw new FireflyException('200040: Webhook and webhook message are no match'); throw new FireflyException('200040: Webhook and webhook message are no match');
} }
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User lists webhook attempts of webhook #%d and message #%d, but webhooks are DISABLED.', $webhook->id, $message->id)); Log::channel('audit')->warning(sprintf('User lists webhook attempts of webhook #%d and message #%d, but webhooks are DISABLED.', $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -115,7 +116,7 @@ class AttemptController extends Controller
throw new FireflyException('200041: Webhook message and webhook attempt are no match'); throw new FireflyException('200041: Webhook message and webhook attempt are no match');
} }
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User views single webhook attempt #%d of webhook #%d and message #%d, but webhooks are DISABLED', $attempt->id, $webhook->id, $message->id)); Log::channel('audit')->warning(sprintf('User views single webhook attempt #%d of webhook #%d and message #%d, but webhooks are DISABLED', $attempt->id, $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -34,6 +34,7 @@ use FireflyIII\Support\Facades\Preferences;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class DestroyController * Class DestroyController
@@ -63,7 +64,7 @@ class DestroyController extends Controller
*/ */
public function destroy(Webhook $webhook): JsonResponse public function destroy(Webhook $webhook): JsonResponse
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d. but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d. but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -93,7 +94,7 @@ class DestroyController extends Controller
throw new FireflyException('200041: Webhook message and webhook attempt are no match'); throw new FireflyException('200041: Webhook message and webhook attempt are no match');
} }
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, attempt #%d, but webhooks are DISABLED.', $webhook->id, $message->id, $attempt->id)); Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, attempt #%d, but webhooks are DISABLED.', $webhook->id, $message->id, $attempt->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -121,7 +122,7 @@ class DestroyController extends Controller
throw new FireflyException('200040: Webhook and webhook message are no match'); throw new FireflyException('200040: Webhook and webhook message are no match');
} }
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, but webhooks are DISABLED.', $webhook->id, $message->id)); Log::channel('audit')->warning(sprintf('User tries to destroy webhook #%d, message #%d, but webhooks are DISABLED.', $webhook->id, $message->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -37,6 +37,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class MessageController * Class MessageController
@@ -65,7 +66,7 @@ class MessageController extends Controller
*/ */
public function index(Webhook $webhook): JsonResponse public function index(Webhook $webhook): JsonResponse
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to view messages of webhook #%d, but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->warning(sprintf('User tries to view messages of webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -105,7 +106,7 @@ class MessageController extends Controller
if ($message->webhook_id !== $webhook->id) { if ($message->webhook_id !== $webhook->id) {
throw new FireflyException('200040: Webhook and webhook message are no match'); throw new FireflyException('200040: Webhook and webhook message are no match');
} }
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User tries to view message #%d of webhook #%d, but webhooks are DISABLED.', $message->id, $webhook->id)); Log::channel('audit')->warning(sprintf('User tries to view message #%d of webhook #%d, but webhooks are DISABLED.', $message->id, $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -42,6 +42,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class ShowController * Class ShowController
@@ -72,7 +73,7 @@ class ShowController extends Controller
*/ */
public function index(): JsonResponse public function index(): JsonResponse
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info('User tries to view all webhooks, but webhooks are DISABLED.'); Log::channel('audit')->info('User tries to view all webhooks, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -114,7 +115,7 @@ class ShowController extends Controller
*/ */
public function show(Webhook $webhook): JsonResponse public function show(Webhook $webhook): JsonResponse
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to view webhook #%d, but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->info(sprintf('User tries to view webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');
@@ -146,7 +147,7 @@ class ShowController extends Controller
*/ */
public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to trigger webhook #%d on transaction group #%d, but webhooks are DISABLED.', $webhook->id, $group->id)); Log::channel('audit')->info(sprintf('User tries to trigger webhook #%d on transaction group #%d, but webhooks are DISABLED.', $webhook->id, $group->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -34,6 +34,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class StoreController * Class StoreController
@@ -63,7 +64,7 @@ class StoreController extends Controller
public function store(CreateRequest $request): JsonResponse public function store(CreateRequest $request): JsonResponse
{ {
$data = $request->getData(); $data = $request->getData();
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info('User tries to store new webhook, but webhooks are DISABLED.', $data); Log::channel('audit')->info('User tries to store new webhook, but webhooks are DISABLED.', $data);
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class SubmitController * Class SubmitController
@@ -58,7 +59,7 @@ class SubmitController extends Controller
*/ */
public function submit(Webhook $webhook): JsonResponse public function submit(Webhook $webhook): JsonResponse
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to submit webhook #%d, but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->info(sprintf('User tries to submit webhook #%d, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -35,6 +35,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UpdateController * Class UpdateController
@@ -63,7 +64,7 @@ class UpdateController extends Controller
public function update(Webhook $webhook, UpdateRequest $request): JsonResponse public function update(Webhook $webhook, UpdateRequest $request): JsonResponse
{ {
$data = $request->getData(); $data = $request->getData();
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->info(sprintf('User tries to update webhook #%d, but webhooks are DISABLED.', $webhook->id), $data); Log::channel('audit')->info(sprintf('User tries to update webhook #%d, but webhooks are DISABLED.', $webhook->id), $data);
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -40,6 +40,7 @@ use FireflyIII\Validation\GroupValidation;
use FireflyIII\Validation\TransactionValidation; use FireflyIII\Validation\TransactionValidation;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class StoreRequest * Class StoreRequest
@@ -176,7 +177,7 @@ class StoreRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
Log::debug('Collect rules of TransactionStoreRequest'); Log::debug('Collect rules of TransactionStoreRequest');
$validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data; $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
$locationRules = Location::requestRules([]); $locationRules = Location::requestRules([]);
return [ return [

View File

@@ -38,6 +38,7 @@ use FireflyIII\Validation\GroupValidation;
use FireflyIII\Validation\TransactionValidation; use FireflyIII\Validation\TransactionValidation;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UpdateRequest * Class UpdateRequest
@@ -248,7 +249,7 @@ class UpdateRequest extends FormRequest
public function rules(): array public function rules(): array
{ {
Log::debug(sprintf('Now in %s', __METHOD__)); Log::debug(sprintf('Now in %s', __METHOD__));
$validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data; $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return [ return [
// basic fields for group: // basic fields for group:

View File

@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use FireflyIII\Support\Request\ValidatesWebhooks; use FireflyIII\Support\Request\ValidatesWebhooks;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class CreateRequest * Class CreateRequest
@@ -73,7 +74,7 @@ class CreateRequest extends FormRequest
$triggers = implode(',', array_values(Webhook::getTriggers())); $triggers = implode(',', array_values(Webhook::getTriggers()));
$responses = implode(',', array_values(Webhook::getResponses())); $responses = implode(',', array_values(Webhook::getResponses()));
$deliveries = implode(',', array_values(Webhook::getDeliveries())); $deliveries = implode(',', array_values(Webhook::getDeliveries()));
$validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data; $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return [ return [
'title' => 'required|min:1|max:255|uniqueObjectForUser:webhooks,title', 'title' => 'required|min:1|max:255|uniqueObjectForUser:webhooks,title',

View File

@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use FireflyIII\Support\Request\ValidatesWebhooks; use FireflyIII\Support\Request\ValidatesWebhooks;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UpdateRequest * Class UpdateRequest
@@ -73,7 +74,7 @@ class UpdateRequest extends FormRequest
$triggers = implode(',', array_values(Webhook::getTriggers())); $triggers = implode(',', array_values(Webhook::getTriggers()));
$responses = implode(',', array_values(Webhook::getResponses())); $responses = implode(',', array_values(Webhook::getResponses()));
$deliveries = implode(',', array_values(Webhook::getDeliveries())); $deliveries = implode(',', array_values(Webhook::getDeliveries()));
$validProtocols = \FireflyIII\Support\Facades\FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data; $validProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
/** @var Webhook $webhook */ /** @var Webhook $webhook */
$webhook = $this->route()->parameter('webhook'); $webhook = $this->route()->parameter('webhook');

View File

@@ -48,6 +48,7 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Query\Builder as DatabaseBuilder; use Illuminate\Database\Query\Builder as DatabaseBuilder;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class CorrectsPrimaryCurrencyAmounts extends Command class CorrectsPrimaryCurrencyAmounts extends Command
{ {
@@ -62,7 +63,7 @@ class CorrectsPrimaryCurrencyAmounts extends Command
*/ */
public function handle(): int public function handle(): int
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) { if (false === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) {
$this->friendlyInfo('This command will not run because currency exchange rates are disabled.'); $this->friendlyInfo('This command will not run because currency exchange rates are disabled.');
return 0; return 0;

View File

@@ -61,7 +61,7 @@ class CorrectsUnevenAmount extends Command
$this->fixUnevenAmounts(); $this->fixUnevenAmounts();
$this->matchCurrencies(); $this->matchCurrencies();
if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate transaction running balance columns. This may take a LONG time. Please be patient.'); $this->friendlyInfo('Will recalculate transaction running balance columns. This may take a LONG time. Please be patient.');
AccountBalanceCalculator::recalculateAll(false); AccountBalanceCalculator::recalculateAll(false);
$this->friendlyInfo('Done recalculating transaction running balance columns.'); $this->friendlyInfo('Done recalculating transaction running balance columns.');

View File

@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\System;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class RecalculatesRunningBalance extends Command class RecalculatesRunningBalance extends Command
{ {
@@ -52,7 +53,7 @@ class RecalculatesRunningBalance extends Command
*/ */
public function handle(): int public function handle(): int
{ {
if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.'); $this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.');
$this->correctBalanceAmounts($this->option('force')); $this->correctBalanceAmounts($this->option('force'));
$this->friendlyInfo('Done recalculating account balances.'); $this->friendlyInfo('Done recalculating account balances.');

View File

@@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use League\Flysystem\FilesystemException; use League\Flysystem\FilesystemException;
use Safe\Exceptions\JsonException; use Safe\Exceptions\JsonException;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_decode; use function Safe\json_decode;
@@ -107,8 +108,8 @@ class VerifySecurityAlerts extends Command
private function removeOldAdvisory(): void private function removeOldAdvisory(): void
{ {
try { try {
\FireflyIII\Support\Facades\FireflyConfig::delete('upgrade_security_message'); FireflyConfig::delete('upgrade_security_message');
\FireflyIII\Support\Facades\FireflyConfig::delete('upgrade_security_level'); FireflyConfig::delete('upgrade_security_level');
} catch (QueryException $e) { } catch (QueryException $e) {
Log::debug(sprintf('Could not delete old security advisory, but thats OK: %s', $e->getMessage())); Log::debug(sprintf('Could not delete old security advisory, but thats OK: %s', $e->getMessage()));
} }
@@ -117,8 +118,8 @@ class VerifySecurityAlerts extends Command
private function saveSecurityAdvisory(array $array): void private function saveSecurityAdvisory(array $array): void
{ {
try { try {
\FireflyIII\Support\Facades\FireflyConfig::set('upgrade_security_message', $array['message']); FireflyConfig::set('upgrade_security_message', $array['message']);
\FireflyIII\Support\Facades\FireflyConfig::set('upgrade_security_level', $array['level']); FireflyConfig::set('upgrade_security_level', $array['level']);
} catch (QueryException $e) { } catch (QueryException $e) {
Log::debug(sprintf('Could not save new security advisory, but thats OK: %s', $e->getMessage())); Log::debug(sprintf('Could not save new security advisory, but thats OK: %s', $e->getMessage()));
} }

View File

@@ -36,6 +36,7 @@ use FireflyIII\Support\Cronjobs\WebhookCronjob;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use InvalidArgumentException; use InvalidArgumentException;
use FireflyIII\Support\Facades\FireflyConfig;
class Cron extends Command class Cron extends Command
{ {
@@ -72,7 +73,7 @@ class Cron extends Command
$force = (bool) $this->option('force'); // @phpstan-ignore-line $force = (bool) $this->option('force'); // @phpstan-ignore-line
// Fire exchange rates cron job. // Fire exchange rates cron job.
if (true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data && ($doAll || $this->option('download-cer'))) { if (true === FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data && ($doAll || $this->option('download-cer'))) {
try { try {
$this->exchangeRatesCronJob($force, $date); $this->exchangeRatesCronJob($force, $date);
} catch (FireflyException $e) { } catch (FireflyException $e) {

View File

@@ -32,6 +32,7 @@ use Illuminate\Console\Command;
use Illuminate\Database\QueryException; use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use FireflyIII\Support\Facades\FireflyConfig;
class AddsTransactionIdentifiers extends Command class AddsTransactionIdentifiers extends Command
{ {
@@ -97,7 +98,7 @@ class AddsTransactionIdentifiers extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -157,6 +158,6 @@ class AddsTransactionIdentifiers extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use JsonException; use JsonException;
use stdClass; use stdClass;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_decode; use function Safe\json_decode;
@@ -86,7 +87,7 @@ class RemovesDatabaseDecryption extends Command
$this->friendlyPositive(sprintf('Decrypted the data in table "%s".', $table)); $this->friendlyPositive(sprintf('Decrypted the data in table "%s".', $table));
// mark as decrypted: // mark as decrypted:
$configName = sprintf('is_decrypted_%s', $table); $configName = sprintf('is_decrypted_%s', $table);
\FireflyIII\Support\Facades\FireflyConfig::set($configName, true); FireflyConfig::set($configName, true);
} }
private function isDecrypted(string $table): bool private function isDecrypted(string $table): bool
@@ -95,7 +96,7 @@ class RemovesDatabaseDecryption extends Command
$configVar = null; $configVar = null;
try { try {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get($configName, false); $configVar = FireflyConfig::get($configName, false);
} catch (FireflyException $e) { } catch (FireflyException $e) {
Log::error($e->getMessage()); Log::error($e->getMessage());
} }

View File

@@ -27,6 +27,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class RepairsAccountBalances extends Command class RepairsAccountBalances extends Command
{ {
@@ -43,7 +44,7 @@ class RepairsAccountBalances extends Command
return 0; return 0;
} }
if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data) {
$this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.'); $this->friendlyInfo('Will recalculate account balances. This may take a LONG time. Please be patient.');
$this->markAsExecuted(); $this->markAsExecuted();
$this->correctBalanceAmounts(); $this->correctBalanceAmounts();
@@ -58,14 +59,14 @@ class RepairsAccountBalances extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data; return (bool) $configVar?->data;
} }
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
private function correctBalanceAmounts(): void private function correctBalanceAmounts(): void

View File

@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAccountCurrencies extends Command class UpgradesAccountCurrencies extends Command
{ {
@@ -85,7 +86,7 @@ class UpgradesAccountCurrencies extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data; return (bool) $configVar?->data;
} }
@@ -155,6 +156,6 @@ class UpgradesAccountCurrencies extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\AccountMeta; use FireflyIII\Models\AccountMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAccountMetaData extends Command class UpgradesAccountMetaData extends Command
{ {
@@ -82,7 +83,7 @@ class UpgradesAccountMetaData extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -90,6 +91,6 @@ class UpgradesAccountMetaData extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -30,6 +30,7 @@ use FireflyIII\Models\Attachment;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesAttachments extends Command class UpgradesAttachments extends Command
{ {
@@ -92,7 +93,7 @@ class UpgradesAttachments extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -100,6 +101,6 @@ class UpgradesAttachments extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -36,6 +36,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Facades\Preferences; use FireflyIII\Support\Facades\Preferences;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBillsToRules extends Command class UpgradesBillsToRules extends Command
{ {
@@ -99,7 +100,7 @@ class UpgradesBillsToRules extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -206,6 +207,6 @@ class UpgradesBillsToRules extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBudgetLimitPeriods extends Command class UpgradesBudgetLimitPeriods extends Command
{ {
@@ -58,7 +59,7 @@ class UpgradesBudgetLimitPeriods extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar->data; return (bool) $configVar->data;
} }
@@ -152,6 +153,6 @@ class UpgradesBudgetLimitPeriods extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -30,6 +30,7 @@ use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesBudgetLimits extends Command class UpgradesBudgetLimits extends Command
{ {
@@ -84,7 +85,7 @@ class UpgradesBudgetLimits extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -92,6 +93,6 @@ class UpgradesBudgetLimits extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -31,6 +31,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesCreditCardLiabilities extends Command class UpgradesCreditCardLiabilities extends Command
{ {
@@ -80,13 +81,13 @@ class UpgradesCreditCardLiabilities extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar?->data; return (bool) $configVar?->data;
} }
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -33,6 +33,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesCurrencyPreferences extends Command class UpgradesCurrencyPreferences extends Command
{ {
@@ -65,7 +66,7 @@ class UpgradesCurrencyPreferences extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -144,6 +145,6 @@ class UpgradesCurrencyPreferences extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -32,6 +32,7 @@ use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesJournalMetaData extends Command class UpgradesJournalMetaData extends Command
{ {
@@ -69,14 +70,14 @@ class UpgradesJournalMetaData extends Command
private function isMigrated(): bool private function isMigrated(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(UpgradesToGroups::CONFIG_NAME, false); $configVar = FireflyConfig::get(UpgradesToGroups::CONFIG_NAME, false);
return (bool) $configVar->data; return (bool) $configVar->data;
} }
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool) $configVar->data; return (bool) $configVar->data;
} }
@@ -218,6 +219,6 @@ class UpgradesJournalMetaData extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -29,6 +29,7 @@ use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournalMeta; use FireflyIII\Models\TransactionJournalMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesJournalNotes extends Command class UpgradesJournalNotes extends Command
{ {
@@ -86,7 +87,7 @@ class UpgradesJournalNotes extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -94,6 +95,6 @@ class UpgradesJournalNotes extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -33,6 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Services\Internal\Support\CreditRecalculateService; use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesLiabilities extends Command class UpgradesLiabilities extends Command
{ {
@@ -61,7 +62,7 @@ class UpgradesLiabilities extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -148,6 +149,6 @@ class UpgradesLiabilities extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -36,6 +36,7 @@ use FireflyIII\Services\Internal\Support\CreditRecalculateService;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesLiabilitiesEight extends Command class UpgradesLiabilitiesEight extends Command
{ {
@@ -63,7 +64,7 @@ class UpgradesLiabilitiesEight extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -207,6 +208,6 @@ class UpgradesLiabilitiesEight extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesMultiPiggyBanks extends Command class UpgradesMultiPiggyBanks extends Command
{ {
@@ -64,7 +65,7 @@ class UpgradesMultiPiggyBanks extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -112,6 +113,6 @@ class UpgradesMultiPiggyBanks extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesPrimaryCurrencyAmounts extends Command class UpgradesPrimaryCurrencyAmounts extends Command
{ {
@@ -60,7 +61,7 @@ class UpgradesPrimaryCurrencyAmounts extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -68,6 +69,6 @@ class UpgradesPrimaryCurrencyAmounts extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -29,6 +29,7 @@ use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceMeta; use FireflyIII\Models\RecurrenceMeta;
use FireflyIII\Models\RecurrenceTransactionMeta; use FireflyIII\Models\RecurrenceTransactionMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\json_encode; use function Safe\json_encode;
@@ -65,7 +66,7 @@ class UpgradesRecurrenceMetaData extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -117,6 +118,6 @@ class UpgradesRecurrenceMetaData extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\RuleAction; use FireflyIII\Models\RuleAction;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesRuleActions extends Command class UpgradesRuleActions extends Command
{ {
@@ -63,7 +64,7 @@ class UpgradesRuleActions extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -183,6 +184,6 @@ class UpgradesRuleActions extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Models\Location; use FireflyIII\Models\Location;
use FireflyIII\Models\Tag; use FireflyIII\Models\Tag;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesTagLocations extends Command class UpgradesTagLocations extends Command
{ {
@@ -57,7 +58,7 @@ class UpgradesTagLocations extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -97,6 +98,6 @@ class UpgradesTagLocations extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -39,6 +39,7 @@ use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesToGroups extends Command class UpgradesToGroups extends Command
{ {
@@ -97,7 +98,7 @@ class UpgradesToGroups extends Command
private function isMigrated(): bool private function isMigrated(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -379,6 +380,6 @@ class UpgradesToGroups extends Command
private function markAsMigrated(): void private function markAsMigrated(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -34,6 +34,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesTransferCurrencies extends Command class UpgradesTransferCurrencies extends Command
{ {
@@ -105,7 +106,7 @@ class UpgradesTransferCurrencies extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -480,6 +481,6 @@ class UpgradesTransferCurrencies extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesVariousCurrencyInformation extends Command class UpgradesVariousCurrencyInformation extends Command
{ {
@@ -86,7 +87,7 @@ class UpgradesVariousCurrencyInformation extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -246,6 +247,6 @@ class UpgradesVariousCurrencyInformation extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -34,6 +34,7 @@ use FireflyIII\Models\WebhookDelivery as WebhookDeliveryModel;
use FireflyIII\Models\WebhookResponse as WebhookResponseModel; use FireflyIII\Models\WebhookResponse as WebhookResponseModel;
use FireflyIII\Models\WebhookTrigger as WebhookTriggerModel; use FireflyIII\Models\WebhookTrigger as WebhookTriggerModel;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use FireflyIII\Support\Facades\FireflyConfig;
class UpgradesWebhooks extends Command class UpgradesWebhooks extends Command
{ {
@@ -63,7 +64,7 @@ class UpgradesWebhooks extends Command
private function isExecuted(): bool private function isExecuted(): bool
{ {
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get(self::CONFIG_NAME, false); $configVar = FireflyConfig::get(self::CONFIG_NAME, false);
return (bool)$configVar?->data; return (bool)$configVar?->data;
@@ -109,6 +110,6 @@ class UpgradesWebhooks extends Command
private function markAsExecuted(): void private function markAsExecuted(): void
{ {
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true); FireflyConfig::set(self::CONFIG_NAME, true);
} }
} }

View File

@@ -37,6 +37,7 @@ use FireflyIII\Notifications\Test\OwnerTestNotificationPushover;
use FireflyIII\Notifications\Test\OwnerTestNotificationSlack; use FireflyIII\Notifications\Test\OwnerTestNotificationSlack;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class AdminEventHandler. * Class AdminEventHandler.
@@ -45,7 +46,7 @@ class AdminEventHandler
{ {
public function sendInvitationNotification(InvitationCreated $event): void public function sendInvitationNotification(InvitationCreated $event): void
{ {
$sendMail = \FireflyIII\Support\Facades\FireflyConfig::get('notification_invite_created', true)->data; $sendMail = FireflyConfig::get('notification_invite_created', true)->data;
if (false === $sendMail) { if (false === $sendMail) {
return; return;
} }
@@ -96,7 +97,7 @@ class AdminEventHandler
*/ */
public function sendNewVersion(NewVersionAvailable $event): void public function sendNewVersion(NewVersionAvailable $event): void
{ {
$sendMail = \FireflyIII\Support\Facades\FireflyConfig::get('notification_new_version', true)->data; $sendMail = FireflyConfig::get('notification_new_version', true)->data;
if (false === $sendMail) { if (false === $sendMail) {
return; return;
} }

View File

@@ -57,6 +57,7 @@ use Illuminate\Auth\Events\Login;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UserEventHandler. * Class UserEventHandler.
@@ -224,7 +225,7 @@ class UserEventHandler
public function sendAdminRegistrationNotification(RegisteredUser $event): void public function sendAdminRegistrationNotification(RegisteredUser $event): void
{ {
$sendMail = (bool)\FireflyIII\Support\Facades\FireflyConfig::get('notification_admin_new_reg', true)->data; $sendMail = (bool)FireflyConfig::get('notification_admin_new_reg', true)->data;
if ($sendMail) { if ($sendMail) {
$owner = $event->owner; $owner = $event->owner;
@@ -367,7 +368,7 @@ class UserEventHandler
*/ */
public function sendRegistrationMail(RegisteredUser $event): void public function sendRegistrationMail(RegisteredUser $event): void
{ {
$sendMail = (bool)\FireflyIII\Support\Facades\FireflyConfig::get('notification_user_new_reg', true)->data; $sendMail = (bool)FireflyConfig::get('notification_user_new_reg', true)->data;
if ($sendMail) { if ($sendMail) {
try { try {
Notification::send($event->user, new UserRegistrationNotification()); Notification::send($event->user, new UserRegistrationNotification());

View File

@@ -33,6 +33,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class VersionCheckEventHandler * Class VersionCheckEventHandler
@@ -54,7 +55,7 @@ class VersionCheckEventHandler
Log::debug('Now in checkForUpdates()'); Log::debug('Now in checkForUpdates()');
// should not check for updates: // should not check for updates:
$permission = \FireflyIII\Support\Facades\FireflyConfig::get('permission_update_check', -1); $permission = FireflyConfig::get('permission_update_check', -1);
$value = (int) $permission->data; $value = (int) $permission->data;
if (1 !== $value) { if (1 !== $value) {
Log::debug('Update check is not enabled.'); Log::debug('Update check is not enabled.');
@@ -73,7 +74,7 @@ class VersionCheckEventHandler
} }
/** @var Configuration $lastCheckTime */ /** @var Configuration $lastCheckTime */
$lastCheckTime = \FireflyIII\Support\Facades\FireflyConfig::get('last_update_check', Carbon::now()->getTimestamp()); $lastCheckTime = FireflyConfig::get('last_update_check', Carbon::now()->getTimestamp());
$now = Carbon::now()->getTimestamp(); $now = Carbon::now()->getTimestamp();
$diff = $now - $lastCheckTime->data; $diff = $now - $lastCheckTime->data;
Log::debug(sprintf('Last check time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff)); Log::debug(sprintf('Last check time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff));
@@ -87,7 +88,7 @@ class VersionCheckEventHandler
$release = $this->getLatestRelease(); $release = $this->getLatestRelease();
session()->flash($release['level'], $release['message']); session()->flash($release['level'], $release['message']);
\FireflyIII\Support\Facades\FireflyConfig::set('last_update_check', Carbon::now()->getTimestamp()); FireflyConfig::set('last_update_check', Carbon::now()->getTimestamp());
} }
/** /**
@@ -107,7 +108,7 @@ class VersionCheckEventHandler
} }
/** @var Configuration $lastCheckTime */ /** @var Configuration $lastCheckTime */
$lastCheckTime = \FireflyIII\Support\Facades\FireflyConfig::get('last_update_warning', Carbon::now()->getTimestamp()); $lastCheckTime = FireflyConfig::get('last_update_warning', Carbon::now()->getTimestamp());
$now = Carbon::now()->getTimestamp(); $now = Carbon::now()->getTimestamp();
$diff = $now - $lastCheckTime->data; $diff = $now - $lastCheckTime->data;
Log::debug(sprintf('Last warning time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff)); Log::debug(sprintf('Last warning time is %d, current time is %d, difference is %d', $lastCheckTime->data, $now, $diff));
@@ -120,6 +121,6 @@ class VersionCheckEventHandler
Log::debug('Have warned about a new version in four weeks!'); Log::debug('Have warned about a new version in four weeks!');
session()->flash('info', (string) trans('firefly.disabled_but_check')); session()->flash('info', (string) trans('firefly.disabled_but_check'));
\FireflyIII\Support\Facades\FireflyConfig::set('last_update_warning', Carbon::now()->getTimestamp()); FireflyConfig::set('last_update_warning', Carbon::now()->getTimestamp());
} }
} }

View File

@@ -27,6 +27,7 @@ namespace FireflyIII\Handlers\Events;
use FireflyIII\Jobs\SendWebhookMessage; use FireflyIII\Jobs\SendWebhookMessage;
use FireflyIII\Models\WebhookMessage; use FireflyIII\Models\WebhookMessage;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class WebhookEventHandler * Class WebhookEventHandler
@@ -39,7 +40,7 @@ class WebhookEventHandler
public function sendWebhookMessages(): void public function sendWebhookMessages(): void
{ {
Log::debug(sprintf('Now in %s', __METHOD__)); Log::debug(sprintf('Now in %s', __METHOD__));
if (false === config('firefly.feature_flags.webhooks') || false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === config('firefly.feature_flags.webhooks') || false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::debug('Webhook event handler is disabled, do not run sendWebhookMessages().'); Log::debug('Webhook event handler is disabled, do not run sendWebhookMessages().');
return; return;

View File

@@ -28,6 +28,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Http\Api\ExchangeRateConverter; use FireflyIII\Support\Http\Api\ExchangeRateConverter;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class TransactionObserver * Class TransactionObserver
@@ -39,7 +40,7 @@ class TransactionObserver
public function created(Transaction $transaction): void public function created(Transaction $transaction): void
{ {
Log::debug('Observe "created" of a transaction.'); Log::debug('Observe "created" of a transaction.');
if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && (1 === bccomp($transaction->amount, '0') && self::$recalculate)) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && (1 === bccomp($transaction->amount, '0') && self::$recalculate)) {
Log::debug('Trigger recalculateForJournal'); Log::debug('Trigger recalculateForJournal');
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal); AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
} }
@@ -82,7 +83,7 @@ class TransactionObserver
public function updated(Transaction $transaction): void public function updated(Transaction $transaction): void
{ {
// Log::debug('Observe "updated" of a transaction.'); // Log::debug('Observe "updated" of a transaction.');
if (true === \FireflyIII\Support\Facades\FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && self::$recalculate && 1 === bccomp($transaction->amount, '0')) { if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && self::$recalculate && 1 === bccomp($transaction->amount, '0')) {
Log::debug('Trigger recalculateForJournal'); Log::debug('Trigger recalculateForJournal');
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal); AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
} }

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Helpers\Update;
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface; use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Trait UpdateTrait * Trait UpdateTrait
@@ -43,7 +44,7 @@ trait UpdateTrait
/** @var UpdateRequestInterface $checker */ /** @var UpdateRequestInterface $checker */
$checker = app(UpdateRequestInterface::class); $checker = app(UpdateRequestInterface::class);
$channelConfig = \FireflyIII\Support\Facades\FireflyConfig::get('update_channel', 'stable'); $channelConfig = FireflyConfig::get('update_channel', 'stable');
$channel = (string) $channelConfig->data; $channel = (string) $channelConfig->data;
return $checker->getUpdateInformation($channel); return $checker->getUpdateInformation($channel);

View File

@@ -61,7 +61,7 @@ class ConfigurationController extends Controller
* *
* @return Factory|View * @return Factory|View
*/ */
public function index(): Factory | \Illuminate\Contracts\View\View public function index(): Factory|\Illuminate\Contracts\View\View
{ {
$subTitle = (string)trans('firefly.instance_configuration'); $subTitle = (string)trans('firefly.instance_configuration');
$subTitleIcon = 'fa-wrench'; $subTitleIcon = 'fa-wrench';
@@ -79,7 +79,7 @@ class ConfigurationController extends Controller
$enableExternalMap = FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data; $enableExternalMap = FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
$enableExternalRates = FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data; $enableExternalRates = FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->data;
$allowWebhooks = FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data; $allowWebhooks = FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data;
$validUrlProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;; $validUrlProtocols = FireflyConfig::get('valid_url_protocols', config('firefly.valid_url_protocols'))->data;
return view( return view(
'settings.configuration.index', 'settings.configuration.index',

View File

@@ -42,6 +42,7 @@ use Illuminate\Routing\Redirector;
use Illuminate\View\View; use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class UserController. * Class UserController.
@@ -164,7 +165,7 @@ class UserController extends Controller
$subTitle = (string) trans('firefly.user_administration'); $subTitle = (string) trans('firefly.user_administration');
$subTitleIcon = 'fa-users'; $subTitleIcon = 'fa-users';
$users = $this->repository->all(); $users = $this->repository->all();
$singleUserMode = (bool) \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; $singleUserMode = (bool) FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$allowInvites = false; $allowInvites = false;
if (!$this->externalIdentity && $singleUserMode) { if (!$this->externalIdentity && $singleUserMode) {
// also registration enabled. // also registration enabled.

View File

@@ -36,6 +36,7 @@ use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException; use Safe\Exceptions\UrlException;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\parse_url; use function Safe\parse_url;
@@ -142,7 +143,7 @@ class ForgotPasswordController extends Controller
} }
// is allowed to? // is allowed to?
$singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$userCount = User::count(); $userCount = User::count();
$allowRegistration = true; $allowRegistration = true;
$pageTitle = (string) trans('firefly.forgot_pw_page_title'); $pageTitle = (string) trans('firefly.forgot_pw_page_title');

View File

@@ -50,6 +50,7 @@ use Illuminate\Validation\ValidationException;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\HttpFoundation\Response as ResponseAlias; use Symfony\Component\HttpFoundation\Response as ResponseAlias;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class LoginController * Class LoginController
@@ -236,7 +237,7 @@ class LoginController extends Controller
} }
// is allowed to register, etc. // is allowed to register, etc.
$singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$allowRegistration = true; $allowRegistration = true;
$allowReset = true; $allowReset = true;
if (true === $singleUserMode && $count > 0) { if (true === $singleUserMode && $count > 0) {

View File

@@ -41,6 +41,7 @@ use Illuminate\Validation\ValidationException;
use Illuminate\View\View; use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class RegisterController * Class RegisterController
@@ -121,7 +122,7 @@ class RegisterController extends Controller
$allowRegistration = true; $allowRegistration = true;
try { try {
$singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
} catch (ContainerExceptionInterface|NotFoundExceptionInterface) { } catch (ContainerExceptionInterface|NotFoundExceptionInterface) {
$singleUserMode = true; $singleUserMode = true;
} }
@@ -148,7 +149,7 @@ class RegisterController extends Controller
*/ */
public function showInviteForm(Request $request, string $code): Factory|\Illuminate\Contracts\View\View public function showInviteForm(Request $request, string $code): Factory|\Illuminate\Contracts\View\View
{ {
$isDemoSite = \FireflyIII\Support\Facades\FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data; $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
$pageTitle = (string) trans('firefly.register_page_title'); $pageTitle = (string) trans('firefly.register_page_title');
$repository = app(UserRepositoryInterface::class); $repository = app(UserRepositoryInterface::class);
$allowRegistration = $this->allowedToRegister(); $allowRegistration = $this->allowedToRegister();
@@ -182,7 +183,7 @@ class RegisterController extends Controller
*/ */
public function showRegistrationForm(?Request $request = null): Factory|\Illuminate\Contracts\View\View public function showRegistrationForm(?Request $request = null): Factory|\Illuminate\Contracts\View\View
{ {
$isDemoSite = \FireflyIII\Support\Facades\FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data; $isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
$pageTitle = (string) trans('firefly.register_page_title'); $pageTitle = (string) trans('firefly.register_page_title');
$allowRegistration = $this->allowedToRegister(); $allowRegistration = $this->allowedToRegister();

View File

@@ -36,6 +36,7 @@ use Illuminate\Validation\ValidationException;
use Illuminate\View\View; use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class ResetPasswordController * Class ResetPasswordController
@@ -131,7 +132,7 @@ class ResetPasswordController extends Controller
} }
// is allowed to register? // is allowed to register?
$singleUserMode = \FireflyIII\Support\Facades\FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data; $singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
$userCount = User::count(); $userCount = User::count();
$allowRegistration = true; $allowRegistration = true;
$pageTitle = (string) trans('firefly.reset_pw_page_title'); $pageTitle = (string) trans('firefly.reset_pw_page_title');

View File

@@ -38,6 +38,7 @@ use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\View; use Illuminate\Support\Facades\View;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\ini_get; use function Safe\ini_get;
use function Safe\realpath; use function Safe\realpath;
@@ -71,7 +72,7 @@ abstract class Controller extends BaseController
public function __construct() public function __construct()
{ {
// is site a demo site? // is site a demo site?
$isDemoSiteConfig = \FireflyIII\Support\Facades\FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site', false)); $isDemoSiteConfig = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site', false));
$isDemoSite = (bool) $isDemoSiteConfig->data; $isDemoSite = (bool) $isDemoSiteConfig->data;
View::share('IS_DEMO_SITE', $isDemoSite); View::share('IS_DEMO_SITE', $isDemoSite);
View::share('DEMO_USERNAME', config('firefly.demo_username')); View::share('DEMO_USERNAME', config('firefly.demo_username'));
@@ -80,7 +81,7 @@ abstract class Controller extends BaseController
View::share('FF_BUILD_TIME', config('firefly.build_time')); View::share('FF_BUILD_TIME', config('firefly.build_time'));
// is webhooks enabled? // is webhooks enabled?
View::share('featuringWebhooks', true === config('firefly.feature_flags.webhooks') && true === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data); View::share('featuringWebhooks', true === config('firefly.feature_flags.webhooks') && true === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data);
// share custom auth guard info. // share custom auth guard info.
$authGuard = config('firefly.authentication_guard'); $authGuard = config('firefly.authentication_guard');

View File

@@ -51,6 +51,7 @@ use Illuminate\View\View;
use Monolog\Handler\RotatingFileHandler; use Monolog\Handler\RotatingFileHandler;
use Safe\Exceptions\FilesystemException; use Safe\Exceptions\FilesystemException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\file_get_contents; use function Safe\file_get_contents;
use function Safe\ini_get; use function Safe\ini_get;
@@ -241,7 +242,7 @@ class DebugController extends Controller
{ {
$userGuard = config('auth.defaults.guard'); $userGuard = config('auth.defaults.guard');
$config = \FireflyIII\Support\Facades\FireflyConfig::get('last_rt_job', 0); $config = FireflyConfig::get('last_rt_job', 0);
$lastTime = (int) $config->data; $lastTime = (int) $config->data;
$lastCronjob = 'never'; $lastCronjob = 'never';
$lastCronjobAgo = 'never'; $lastCronjobAgo = 'never';

View File

@@ -28,6 +28,7 @@ use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionCurrency;
use Illuminate\View\View; use Illuminate\View\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
class IndexController extends Controller class IndexController extends Controller
{ {
@@ -47,7 +48,7 @@ class IndexController extends Controller
return $next($request); return $next($request);
} }
); );
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) { if (false === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data) {
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
} }

View File

@@ -38,6 +38,7 @@ use Illuminate\Http\Request;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException; use Safe\Exceptions\UrlException;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\parse_url; use function Safe\parse_url;
@@ -140,7 +141,7 @@ class CreateController extends Controller
]; ];
$optionalFields['external_url'] ??= false; $optionalFields['external_url'] ??= false;
$optionalFields['location'] ??= false; $optionalFields['location'] ??= false;
$optionalFields['location'] = $optionalFields['location'] && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data; $optionalFields['location'] = $optionalFields['location'] && true === FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
// map info: // map info:
$longitude = config('firefly.default_location.longitude'); $longitude = config('firefly.default_location.longitude');

View File

@@ -38,6 +38,7 @@ use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use Safe\Exceptions\UrlException; use Safe\Exceptions\UrlException;
use FireflyIII\Support\Facades\FireflyConfig;
use function Safe\parse_url; use function Safe\parse_url;
@@ -114,7 +115,7 @@ class EditController extends Controller
]; ];
$optionalFields['external_url'] ??= false; $optionalFields['external_url'] ??= false;
$optionalFields['location'] ??= false; $optionalFields['location'] ??= false;
$optionalFields['location'] = $optionalFields['location'] && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data; $optionalFields['location'] = $optionalFields['location'] && true === FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
// map info voor v2: // map info voor v2:
$longitude = config('firefly.default_location.longitude'); $longitude = config('firefly.default_location.longitude');

View File

@@ -29,6 +29,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class CreateController * Class CreateController
@@ -59,7 +60,7 @@ class CreateController extends Controller
*/ */
public function index(): Factory|\Illuminate\Contracts\View\View public function index(): Factory|\Illuminate\Contracts\View\View
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook create page, but webhooks are DISABLED.'); Log::channel('audit')->warning('User visits webhook create page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View; use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class DeleteController * Class DeleteController
@@ -64,7 +65,7 @@ class DeleteController extends Controller
*/ */
public function index(Webhook $webhook): Factory|View public function index(Webhook $webhook): Factory|View
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook delete page, but webhooks are DISABLED.'); Log::channel('audit')->warning('User visits webhook delete page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View; use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class EditController * Class EditController
@@ -63,7 +64,7 @@ class EditController extends Controller
*/ */
public function index(Webhook $webhook): Factory|View public function index(Webhook $webhook): Factory|View
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook edit page, but webhooks are DISABLED.'); Log::channel('audit')->warning('User visits webhook edit page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -29,6 +29,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class IndexController * Class IndexController
@@ -55,7 +56,7 @@ class IndexController extends Controller
*/ */
public function index(): Factory|\Illuminate\Contracts\View\View public function index(): Factory|\Illuminate\Contracts\View\View
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning('User visits webhook index page, but webhooks are DISABLED.'); Log::channel('audit')->warning('User visits webhook index page, but webhooks are DISABLED.');
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View; use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class ShowController * Class ShowController
@@ -63,7 +64,7 @@ class ShowController extends Controller
*/ */
public function index(Webhook $webhook): Factory|View public function index(Webhook $webhook): Factory|View
{ {
if (false === \FireflyIII\Support\Facades\FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) { if (false === FireflyConfig::get('allow_webhooks', config('firefly.allow_webhooks'))->data) {
Log::channel('audit')->warning(sprintf('User visits webhook #%d page, but webhooks are DISABLED.', $webhook->id)); Log::channel('audit')->warning(sprintf('User visits webhook #%d page, but webhooks are DISABLED.', $webhook->id));
throw new NotFoundHttpException('Webhooks are not enabled.'); throw new NotFoundHttpException('Webhooks are not enabled.');

View File

@@ -34,6 +34,7 @@ use FireflyIII\Support\Http\Controllers\RequestInformation;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class SessionFilter. * Class SessionFilter.
@@ -144,11 +145,11 @@ class Range
// share security message: // share security message:
if ( if (
\FireflyIII\Support\Facades\FireflyConfig::has('upgrade_security_message') FireflyConfig::has('upgrade_security_message')
&& \FireflyIII\Support\Facades\FireflyConfig::has('upgrade_security_level') && FireflyConfig::has('upgrade_security_level')
) { ) {
app('view')->share('upgrade_security_message', \FireflyIII\Support\Facades\FireflyConfig::get('upgrade_security_message')->data); app('view')->share('upgrade_security_message', FireflyConfig::get('upgrade_security_message')->data);
app('view')->share('upgrade_security_level', \FireflyIII\Support\Facades\FireflyConfig::get('upgrade_security_level')->data); app('view')->share('upgrade_security_level', FireflyConfig::get('upgrade_security_level')->data);
} }
} }
} }

View File

@@ -28,6 +28,7 @@ use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use NotificationChannels\Pushover\PushoverReceiver; use NotificationChannels\Pushover\PushoverReceiver;
use FireflyIII\Support\Facades\FireflyConfig;
class OwnerNotifiable class OwnerNotifiable
{ {
@@ -58,8 +59,8 @@ class OwnerNotifiable
public function routeNotificationForPushover(): PushoverReceiver public function routeNotificationForPushover(): PushoverReceiver
{ {
Log::debug('Return settings for routeNotificationForPushover'); Log::debug('Return settings for routeNotificationForPushover');
$pushoverAppToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_app_token', '')->data; $pushoverAppToken = (string) FireflyConfig::getEncrypted('pushover_app_token', '')->data;
$pushoverUserToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_user_token', '')->data; $pushoverUserToken = (string) FireflyConfig::getEncrypted('pushover_user_token', '')->data;
return PushoverReceiver::withUserKey($pushoverUserToken) return PushoverReceiver::withUserKey($pushoverUserToken)
->withApplicationToken($pushoverAppToken) ->withApplicationToken($pushoverAppToken)
@@ -68,7 +69,7 @@ class OwnerNotifiable
public function routeNotificationForSlack(): string public function routeNotificationForSlack(): string
{ {
$res = \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('slack_webhook_url', '')->data; $res = FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
if (is_array($res)) { if (is_array($res)) {
$res = ''; $res = '';
} }

View File

@@ -29,6 +29,7 @@ use FireflyIII\Support\Notifications\UrlValidator;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use NotificationChannels\Pushover\PushoverChannel; use NotificationChannels\Pushover\PushoverChannel;
use FireflyIII\Support\Facades\FireflyConfig;
// use Wijourdil\NtfyNotificationChannel\Channels\NtfyChannel; // use Wijourdil\NtfyNotificationChannel\Channels\NtfyChannel;
@@ -54,7 +55,7 @@ class ReturnsAvailableChannels
$channels = ['mail']; $channels = ['mail'];
if (true === config('notifications.channels.slack.enabled', false)) { if (true === config('notifications.channels.slack.enabled', false)) {
$slackUrl = \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('slack_webhook_url', '')->data; $slackUrl = FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
if (UrlValidator::isValidWebhookURL($slackUrl)) { if (UrlValidator::isValidWebhookURL($slackUrl)) {
$channels[] = 'slack'; $channels[] = 'slack';
} }
@@ -73,8 +74,8 @@ class ReturnsAvailableChannels
// pushover // pushover
if (true === config('notifications.channels.pushover.enabled', false)) { if (true === config('notifications.channels.pushover.enabled', false)) {
$pushoverAppToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_app_token', '')->data; $pushoverAppToken = (string) FireflyConfig::getEncrypted('pushover_app_token', '')->data;
$pushoverUserToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_user_token', '')->data; $pushoverUserToken = (string) FireflyConfig::getEncrypted('pushover_user_token', '')->data;
if ('' === $pushoverAppToken || '' === $pushoverUserToken) { if ('' === $pushoverAppToken || '' === $pushoverUserToken) {
Log::warning('[b] No Pushover token, channel is disabled.'); Log::warning('[b] No Pushover token, channel is disabled.');
} }

View File

@@ -52,12 +52,12 @@ class SearchServiceProvider extends ServiceProvider
static function (): QueryParserInterface { static function (): QueryParserInterface {
return app(QueryParser::class); return app(QueryParser::class);
// 2025-12-20 ignore this setting. // 2025-12-20 ignore this setting.
// $implementation = config('search.query_parser'); // $implementation = config('search.query_parser');
// //
// return match ($implementation) { // return match ($implementation) {
// 'new' => app(QueryParser::class), // 'new' => app(QueryParser::class),
// default => app(GdbotsQueryParser::class), // default => app(GdbotsQueryParser::class),
// }; // };
} }
); );

View File

@@ -35,6 +35,7 @@ use FireflyIII\User;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use NumberFormatter; use NumberFormatter;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class Amount. * Class Amount.
@@ -117,7 +118,7 @@ class Amount
if (!$user instanceof User) { if (!$user instanceof User) {
$pref = $instance->getPreference('convert_to_primary_no_user'); $pref = $instance->getPreference('convert_to_primary_no_user');
if (null === $pref) { if (null === $pref) {
$res = true === Preferences::get('convert_to_primary', false)->data && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data; $res = true === Preferences::get('convert_to_primary', false)->data && true === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
$instance->setPreference('convert_to_primary_no_user', $res); $instance->setPreference('convert_to_primary_no_user', $res);
return $res; return $res;
@@ -128,7 +129,7 @@ class Amount
$key = sprintf('convert_to_primary_%d', $user->id); $key = sprintf('convert_to_primary_%d', $user->id);
$pref = $instance->getPreference($key); $pref = $instance->getPreference($key);
if (null === $pref) { if (null === $pref) {
$res = true === Preferences::getForUser($user, 'convert_to_primary', false)->data && true === \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data; $res = true === Preferences::getForUser($user, 'convert_to_primary', false)->data && true === FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data;
$instance->setPreference($key, $res); $instance->setPreference($key, $res);
return $res; return $res;

View File

@@ -34,6 +34,7 @@ use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\Steam; use FireflyIII\Support\Facades\Steam;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class ExchangeRateConverter * Class ExchangeRateConverter
@@ -71,7 +72,7 @@ class ExchangeRateConverter
public function enabled(): bool public function enabled(): bool
{ {
return false !== \FireflyIII\Support\Facades\FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data || $this->ignoreSettings; return false !== FireflyConfig::get('enable_exchange_rates', config('cer.enabled'))->data || $this->ignoreSettings;
} }
/** /**

View File

@@ -27,6 +27,7 @@ namespace FireflyIII\Support\System;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use Ramsey\Uuid\Uuid; use Ramsey\Uuid\Uuid;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Trait GeneratesInstallationId * Trait GeneratesInstallationId
@@ -36,7 +37,7 @@ trait GeneratesInstallationId
protected function generateInstallationId(): void protected function generateInstallationId(): void
{ {
try { try {
$config = \FireflyIII\Support\Facades\FireflyConfig::get('installation_id'); $config = FireflyConfig::get('installation_id');
} catch (FireflyException) { } catch (FireflyException) {
Log::info('Could not create or generate installation ID. Do not continue.'); Log::info('Could not create or generate installation ID. Do not continue.');
@@ -52,7 +53,7 @@ trait GeneratesInstallationId
$uuid4 = Uuid::uuid4(); $uuid4 = Uuid::uuid4();
$uniqueId = (string)$uuid4; $uniqueId = (string)$uuid4;
Log::info(sprintf('Created Firefly III installation ID %s', $uniqueId)); Log::info(sprintf('Created Firefly III installation ID %s', $uniqueId));
\FireflyIII\Support\Facades\FireflyConfig::set('installation_id', $uniqueId); FireflyConfig::set('installation_id', $uniqueId);
} }
} }
} }

View File

@@ -404,7 +404,7 @@ class User extends Authenticatable
public function routeNotificationForSlack(Notification $notification): ?string public function routeNotificationForSlack(Notification $notification): ?string
{ {
// this check does not validate if the user is owner, Should be done by notification itself. // this check does not validate if the user is owner, Should be done by notification itself.
$res = \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('slack_webhook_url', '')->data; $res = FireflyConfig::getEncrypted('slack_webhook_url', '')->data;
if (is_array($res)) { if (is_array($res)) {
$res = ''; $res = '';
} }

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => env('USE_RUNNING_BALANCE', true), // this is only the default value, is not used. 'running_balance_column' => env('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-12-19', 'version' => 'develop/2025-12-20',
'build_time' => 1766164572, 'build_time' => 1766210708,
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used. 'db_version' => 28, // field is no longer used.

6
package-lock.json generated
View File

@@ -10129,9 +10129,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/sass": { "node_modules/sass": {
"version": "1.97.0", "version": "1.97.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.97.0.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.1.tgz",
"integrity": "sha512-KR0igP1z4avUJetEuIeOdDlwaUDvkH8wSx7FdSjyYBS3dpyX3TzHfAMO0G1Q4/3cdjcmi3r7idh+KCmKqS+KeQ==", "integrity": "sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {