mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-22 11:11:25 +00:00
🤖 Auto commit for release 'develop' on 2025-12-20
This commit is contained in:
@@ -29,6 +29,7 @@ use FireflyIII\Api\V1\Requests\System\CronRequest;
|
||||
use FireflyIII\Support\Http\Controllers\CronRunner;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class CronController
|
||||
@@ -50,7 +51,7 @@ class CronController extends Controller
|
||||
$return = [];
|
||||
$return['recurring_transactions'] = $this->runRecurring($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['bill_notifications'] = $this->billWarningCronJob($config['force'], $config['date']);
|
||||
|
||||
@@ -38,6 +38,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class AttemptController
|
||||
@@ -71,7 +72,7 @@ class AttemptController extends Controller
|
||||
if ($message->webhook_id !== $webhook->id) {
|
||||
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));
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Support\Facades\Preferences;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class DestroyController
|
||||
@@ -63,7 +64,7 @@ class DestroyController extends Controller
|
||||
*/
|
||||
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));
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -37,6 +37,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class MessageController
|
||||
@@ -65,7 +66,7 @@ class MessageController extends Controller
|
||||
*/
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
@@ -105,7 +106,7 @@ class MessageController extends Controller
|
||||
if ($message->webhook_id !== $webhook->id) {
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -42,6 +42,7 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
@@ -72,7 +73,7 @@ class ShowController extends Controller
|
||||
*/
|
||||
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.');
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
@@ -114,7 +115,7 @@ class ShowController extends Controller
|
||||
*/
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
@@ -146,7 +147,7 @@ class ShowController extends Controller
|
||||
*/
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -34,6 +34,7 @@ use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class StoreController
|
||||
@@ -63,7 +64,7 @@ class StoreController extends Controller
|
||||
public function store(CreateRequest $request): JsonResponse
|
||||
{
|
||||
$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);
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class SubmitController
|
||||
@@ -58,7 +59,7 @@ class SubmitController extends Controller
|
||||
*/
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -35,6 +35,7 @@ use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class UpdateController
|
||||
@@ -63,7 +64,7 @@ class UpdateController extends Controller
|
||||
public function update(Webhook $webhook, UpdateRequest $request): JsonResponse
|
||||
{
|
||||
$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);
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -40,6 +40,7 @@ use FireflyIII\Validation\GroupValidation;
|
||||
use FireflyIII\Validation\TransactionValidation;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class StoreRequest
|
||||
@@ -176,7 +177,7 @@ class StoreRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
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([]);
|
||||
|
||||
return [
|
||||
|
||||
@@ -38,6 +38,7 @@ use FireflyIII\Validation\GroupValidation;
|
||||
use FireflyIII\Validation\TransactionValidation;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class UpdateRequest
|
||||
@@ -248,7 +249,7 @@ class UpdateRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
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 [
|
||||
// basic fields for group:
|
||||
|
||||
@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use FireflyIII\Support\Request\ValidatesWebhooks;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class CreateRequest
|
||||
@@ -73,7 +74,7 @@ class CreateRequest extends FormRequest
|
||||
$triggers = implode(',', array_values(Webhook::getTriggers()));
|
||||
$responses = implode(',', array_values(Webhook::getResponses()));
|
||||
$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 [
|
||||
'title' => 'required|min:1|max:255|uniqueObjectForUser:webhooks,title',
|
||||
|
||||
@@ -31,6 +31,7 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use FireflyIII\Support\Request\ValidatesWebhooks;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class UpdateRequest
|
||||
@@ -73,7 +74,7 @@ class UpdateRequest extends FormRequest
|
||||
$triggers = implode(',', array_values(Webhook::getTriggers()));
|
||||
$responses = implode(',', array_values(Webhook::getResponses()));
|
||||
$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 */
|
||||
$webhook = $this->route()->parameter('webhook');
|
||||
|
||||
@@ -48,6 +48,7 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Query\Builder as DatabaseBuilder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class CorrectsPrimaryCurrencyAmounts extends Command
|
||||
{
|
||||
@@ -62,7 +63,7 @@ class CorrectsPrimaryCurrencyAmounts extends Command
|
||||
*/
|
||||
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.');
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -61,7 +61,7 @@ class CorrectsUnevenAmount extends Command
|
||||
|
||||
$this->fixUnevenAmounts();
|
||||
$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.');
|
||||
AccountBalanceCalculator::recalculateAll(false);
|
||||
$this->friendlyInfo('Done recalculating transaction running balance columns.');
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\System;
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class RecalculatesRunningBalance extends Command
|
||||
{
|
||||
@@ -52,7 +53,7 @@ class RecalculatesRunningBalance extends Command
|
||||
*/
|
||||
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->correctBalanceAmounts($this->option('force'));
|
||||
$this->friendlyInfo('Done recalculating account balances.');
|
||||
|
||||
@@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use League\Flysystem\FilesystemException;
|
||||
use Safe\Exceptions\JsonException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\json_decode;
|
||||
|
||||
@@ -107,8 +108,8 @@ class VerifySecurityAlerts extends Command
|
||||
private function removeOldAdvisory(): void
|
||||
{
|
||||
try {
|
||||
\FireflyIII\Support\Facades\FireflyConfig::delete('upgrade_security_message');
|
||||
\FireflyIII\Support\Facades\FireflyConfig::delete('upgrade_security_level');
|
||||
FireflyConfig::delete('upgrade_security_message');
|
||||
FireflyConfig::delete('upgrade_security_level');
|
||||
} catch (QueryException $e) {
|
||||
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
|
||||
{
|
||||
try {
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set('upgrade_security_message', $array['message']);
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set('upgrade_security_level', $array['level']);
|
||||
FireflyConfig::set('upgrade_security_message', $array['message']);
|
||||
FireflyConfig::set('upgrade_security_level', $array['level']);
|
||||
} catch (QueryException $e) {
|
||||
Log::debug(sprintf('Could not save new security advisory, but thats OK: %s', $e->getMessage()));
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ use FireflyIII\Support\Cronjobs\WebhookCronjob;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use InvalidArgumentException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class Cron extends Command
|
||||
{
|
||||
@@ -72,7 +73,7 @@ class Cron extends Command
|
||||
$force = (bool) $this->option('force'); // @phpstan-ignore-line
|
||||
|
||||
// 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 {
|
||||
$this->exchangeRatesCronJob($force, $date);
|
||||
} catch (FireflyException $e) {
|
||||
|
||||
@@ -32,6 +32,7 @@ use Illuminate\Console\Command;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class AddsTransactionIdentifiers extends Command
|
||||
{
|
||||
@@ -97,7 +98,7 @@ class AddsTransactionIdentifiers extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -157,6 +158,6 @@ class AddsTransactionIdentifiers extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use JsonException;
|
||||
use stdClass;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\json_decode;
|
||||
|
||||
@@ -86,7 +87,7 @@ class RemovesDatabaseDecryption extends Command
|
||||
$this->friendlyPositive(sprintf('Decrypted the data in table "%s".', $table));
|
||||
// mark as decrypted:
|
||||
$configName = sprintf('is_decrypted_%s', $table);
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set($configName, true);
|
||||
FireflyConfig::set($configName, true);
|
||||
}
|
||||
|
||||
private function isDecrypted(string $table): bool
|
||||
@@ -95,7 +96,7 @@ class RemovesDatabaseDecryption extends Command
|
||||
$configVar = null;
|
||||
|
||||
try {
|
||||
$configVar = \FireflyIII\Support\Facades\FireflyConfig::get($configName, false);
|
||||
$configVar = FireflyConfig::get($configName, false);
|
||||
} catch (FireflyException $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class RepairsAccountBalances extends Command
|
||||
{
|
||||
@@ -43,7 +44,7 @@ class RepairsAccountBalances extends Command
|
||||
|
||||
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->markAsExecuted();
|
||||
$this->correctBalanceAmounts();
|
||||
@@ -58,14 +59,14 @@ class RepairsAccountBalances extends Command
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
|
||||
private function correctBalanceAmounts(): void
|
||||
|
||||
@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesAccountCurrencies extends Command
|
||||
{
|
||||
@@ -85,7 +86,7 @@ class UpgradesAccountCurrencies extends Command
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -155,6 +156,6 @@ class UpgradesAccountCurrencies extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\AccountMeta;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesAccountMetaData extends Command
|
||||
{
|
||||
@@ -82,7 +83,7 @@ class UpgradesAccountMetaData extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -90,6 +91,6 @@ class UpgradesAccountMetaData extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\Note;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesAttachments extends Command
|
||||
{
|
||||
@@ -92,7 +93,7 @@ class UpgradesAttachments extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -100,6 +101,6 @@ class UpgradesAttachments extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\Support\Facades\Preferences;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesBillsToRules extends Command
|
||||
{
|
||||
@@ -99,7 +100,7 @@ class UpgradesBillsToRules extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -206,6 +207,6 @@ class UpgradesBillsToRules extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesBudgetLimitPeriods extends Command
|
||||
{
|
||||
@@ -58,7 +59,7 @@ class UpgradesBudgetLimitPeriods extends Command
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -152,6 +153,6 @@ class UpgradesBudgetLimitPeriods extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesBudgetLimits extends Command
|
||||
{
|
||||
@@ -84,7 +85,7 @@ class UpgradesBudgetLimits extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -92,6 +93,6 @@ class UpgradesBudgetLimits extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesCreditCardLiabilities extends Command
|
||||
{
|
||||
@@ -80,13 +81,13 @@ class UpgradesCreditCardLiabilities extends Command
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ use FireflyIII\Support\Facades\Amount;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesCurrencyPreferences extends Command
|
||||
{
|
||||
@@ -65,7 +66,7 @@ class UpgradesCurrencyPreferences extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -144,6 +145,6 @@ class UpgradesCurrencyPreferences extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesJournalMetaData extends Command
|
||||
{
|
||||
@@ -69,14 +70,14 @@ class UpgradesJournalMetaData extends Command
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -218,6 +219,6 @@ class UpgradesJournalMetaData extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\TransactionJournalMeta;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesJournalNotes extends Command
|
||||
{
|
||||
@@ -86,7 +87,7 @@ class UpgradesJournalNotes extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -94,6 +95,6 @@ class UpgradesJournalNotes extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Support\CreditRecalculateService;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesLiabilities extends Command
|
||||
{
|
||||
@@ -61,7 +62,7 @@ class UpgradesLiabilities extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -148,6 +149,6 @@ class UpgradesLiabilities extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ use FireflyIII\Services\Internal\Support\CreditRecalculateService;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesLiabilitiesEight extends Command
|
||||
{
|
||||
@@ -63,7 +64,7 @@ class UpgradesLiabilitiesEight extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -207,6 +208,6 @@ class UpgradesLiabilitiesEight extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesMultiPiggyBanks extends Command
|
||||
{
|
||||
@@ -64,7 +65,7 @@ class UpgradesMultiPiggyBanks extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -112,6 +113,6 @@ class UpgradesMultiPiggyBanks extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesPrimaryCurrencyAmounts extends Command
|
||||
{
|
||||
@@ -60,7 +61,7 @@ class UpgradesPrimaryCurrencyAmounts extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -68,6 +69,6 @@ class UpgradesPrimaryCurrencyAmounts extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Models\RecurrenceMeta;
|
||||
use FireflyIII\Models\RecurrenceTransactionMeta;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\json_encode;
|
||||
|
||||
@@ -65,7 +66,7 @@ class UpgradesRecurrenceMetaData extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -117,6 +118,6 @@ class UpgradesRecurrenceMetaData extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace FireflyIII\Console\Commands\Upgrade;
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesRuleActions extends Command
|
||||
{
|
||||
@@ -63,7 +64,7 @@ class UpgradesRuleActions extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -183,6 +184,6 @@ class UpgradesRuleActions extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Models\Location;
|
||||
use FireflyIII\Models\Tag;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesTagLocations extends Command
|
||||
{
|
||||
@@ -57,7 +58,7 @@ class UpgradesTagLocations extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -97,6 +98,6 @@ class UpgradesTagLocations extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesToGroups extends Command
|
||||
{
|
||||
@@ -97,7 +98,7 @@ class UpgradesToGroups extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -379,6 +380,6 @@ class UpgradesToGroups extends Command
|
||||
|
||||
private function markAsMigrated(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesTransferCurrencies extends Command
|
||||
{
|
||||
@@ -105,7 +106,7 @@ class UpgradesTransferCurrencies extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -480,6 +481,6 @@ class UpgradesTransferCurrencies extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesVariousCurrencyInformation extends Command
|
||||
{
|
||||
@@ -86,7 +87,7 @@ class UpgradesVariousCurrencyInformation extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -246,6 +247,6 @@ class UpgradesVariousCurrencyInformation extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Models\WebhookDelivery as WebhookDeliveryModel;
|
||||
use FireflyIII\Models\WebhookResponse as WebhookResponseModel;
|
||||
use FireflyIII\Models\WebhookTrigger as WebhookTriggerModel;
|
||||
use Illuminate\Console\Command;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class UpgradesWebhooks extends Command
|
||||
{
|
||||
@@ -63,7 +64,7 @@ class UpgradesWebhooks extends Command
|
||||
|
||||
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;
|
||||
|
||||
@@ -109,6 +110,6 @@ class UpgradesWebhooks extends Command
|
||||
|
||||
private function markAsExecuted(): void
|
||||
{
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
FireflyConfig::set(self::CONFIG_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ use FireflyIII\Notifications\Test\OwnerTestNotificationPushover;
|
||||
use FireflyIII\Notifications\Test\OwnerTestNotificationSlack;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class AdminEventHandler.
|
||||
@@ -45,7 +46,7 @@ class AdminEventHandler
|
||||
{
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
@@ -96,7 +97,7 @@ class AdminEventHandler
|
||||
*/
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ use Illuminate\Auth\Events\Login;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class UserEventHandler.
|
||||
@@ -224,7 +225,7 @@ class UserEventHandler
|
||||
|
||||
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) {
|
||||
$owner = $event->owner;
|
||||
|
||||
@@ -367,7 +368,7 @@ class UserEventHandler
|
||||
*/
|
||||
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) {
|
||||
try {
|
||||
Notification::send($event->user, new UserRegistrationNotification());
|
||||
|
||||
@@ -33,6 +33,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class VersionCheckEventHandler
|
||||
@@ -54,7 +55,7 @@ class VersionCheckEventHandler
|
||||
Log::debug('Now in checkForUpdates()');
|
||||
|
||||
// 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;
|
||||
if (1 !== $value) {
|
||||
Log::debug('Update check is not enabled.');
|
||||
@@ -73,7 +74,7 @@ class VersionCheckEventHandler
|
||||
}
|
||||
|
||||
/** @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();
|
||||
$diff = $now - $lastCheckTime->data;
|
||||
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();
|
||||
|
||||
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 */
|
||||
$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();
|
||||
$diff = $now - $lastCheckTime->data;
|
||||
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!');
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace FireflyIII\Handlers\Events;
|
||||
use FireflyIII\Jobs\SendWebhookMessage;
|
||||
use FireflyIII\Models\WebhookMessage;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class WebhookEventHandler
|
||||
@@ -39,7 +40,7 @@ class WebhookEventHandler
|
||||
public function sendWebhookMessages(): void
|
||||
{
|
||||
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().');
|
||||
|
||||
return;
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Support\Facades\Amount;
|
||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class TransactionObserver
|
||||
@@ -39,7 +40,7 @@ class TransactionObserver
|
||||
public function created(Transaction $transaction): void
|
||||
{
|
||||
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');
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
}
|
||||
@@ -82,7 +83,7 @@ class TransactionObserver
|
||||
public function updated(Transaction $transaction): void
|
||||
{
|
||||
// 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');
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace FireflyIII\Helpers\Update;
|
||||
|
||||
use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Trait UpdateTrait
|
||||
@@ -43,7 +44,7 @@ trait UpdateTrait
|
||||
|
||||
/** @var UpdateRequestInterface $checker */
|
||||
$checker = app(UpdateRequestInterface::class);
|
||||
$channelConfig = \FireflyIII\Support\Facades\FireflyConfig::get('update_channel', 'stable');
|
||||
$channelConfig = FireflyConfig::get('update_channel', 'stable');
|
||||
$channel = (string) $channelConfig->data;
|
||||
|
||||
return $checker->getUpdateInformation($channel);
|
||||
|
||||
@@ -79,7 +79,7 @@ class ConfigurationController extends Controller
|
||||
$enableExternalMap = FireflyConfig::get('enable_external_map', config('firefly.enable_external_map'))->data;
|
||||
$enableExternalRates = FireflyConfig::get('enable_external_rates', config('cer.download_enabled'))->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(
|
||||
'settings.configuration.index',
|
||||
|
||||
@@ -42,6 +42,7 @@ use Illuminate\Routing\Redirector;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class UserController.
|
||||
@@ -164,7 +165,7 @@ class UserController extends Controller
|
||||
$subTitle = (string) trans('firefly.user_administration');
|
||||
$subTitleIcon = 'fa-users';
|
||||
$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;
|
||||
if (!$this->externalIdentity && $singleUserMode) {
|
||||
// also registration enabled.
|
||||
|
||||
@@ -36,6 +36,7 @@ use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Safe\Exceptions\UrlException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\parse_url;
|
||||
|
||||
@@ -142,7 +143,7 @@ class ForgotPasswordController extends Controller
|
||||
}
|
||||
|
||||
// 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();
|
||||
$allowRegistration = true;
|
||||
$pageTitle = (string) trans('firefly.forgot_pw_page_title');
|
||||
|
||||
@@ -50,6 +50,7 @@ use Illuminate\Validation\ValidationException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Symfony\Component\HttpFoundation\Response as ResponseAlias;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class LoginController
|
||||
@@ -236,7 +237,7 @@ class LoginController extends Controller
|
||||
}
|
||||
|
||||
// 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;
|
||||
$allowReset = true;
|
||||
if (true === $singleUserMode && $count > 0) {
|
||||
|
||||
@@ -41,6 +41,7 @@ use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class RegisterController
|
||||
@@ -121,7 +122,7 @@ class RegisterController extends Controller
|
||||
$allowRegistration = true;
|
||||
|
||||
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) {
|
||||
$singleUserMode = true;
|
||||
}
|
||||
@@ -148,7 +149,7 @@ class RegisterController extends Controller
|
||||
*/
|
||||
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');
|
||||
$repository = app(UserRepositoryInterface::class);
|
||||
$allowRegistration = $this->allowedToRegister();
|
||||
@@ -182,7 +183,7 @@ class RegisterController extends Controller
|
||||
*/
|
||||
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');
|
||||
$allowRegistration = $this->allowedToRegister();
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class ResetPasswordController
|
||||
@@ -131,7 +132,7 @@ class ResetPasswordController extends Controller
|
||||
}
|
||||
|
||||
// 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();
|
||||
$allowRegistration = true;
|
||||
$pageTitle = (string) trans('firefly.reset_pw_page_title');
|
||||
|
||||
@@ -38,6 +38,7 @@ use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\ini_get;
|
||||
use function Safe\realpath;
|
||||
@@ -71,7 +72,7 @@ abstract class Controller extends BaseController
|
||||
public function __construct()
|
||||
{
|
||||
// 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;
|
||||
View::share('IS_DEMO_SITE', $isDemoSite);
|
||||
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'));
|
||||
|
||||
// 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.
|
||||
$authGuard = config('firefly.authentication_guard');
|
||||
|
||||
@@ -51,6 +51,7 @@ use Illuminate\View\View;
|
||||
use Monolog\Handler\RotatingFileHandler;
|
||||
use Safe\Exceptions\FilesystemException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\file_get_contents;
|
||||
use function Safe\ini_get;
|
||||
@@ -241,7 +242,7 @@ class DebugController extends Controller
|
||||
{
|
||||
$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;
|
||||
$lastCronjob = 'never';
|
||||
$lastCronjobAgo = 'never';
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\View\View;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
@@ -47,7 +48,7 @@ class IndexController extends Controller
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ use Illuminate\Http\Request;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Safe\Exceptions\UrlException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\parse_url;
|
||||
|
||||
@@ -140,7 +141,7 @@ class CreateController extends Controller
|
||||
];
|
||||
$optionalFields['external_url'] ??= 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:
|
||||
$longitude = config('firefly.default_location.longitude');
|
||||
|
||||
@@ -38,6 +38,7 @@ use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Safe\Exceptions\UrlException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
use function Safe\parse_url;
|
||||
|
||||
@@ -114,7 +115,7 @@ class EditController extends Controller
|
||||
];
|
||||
$optionalFields['external_url'] ??= 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:
|
||||
$longitude = config('firefly.default_location.longitude');
|
||||
|
||||
@@ -29,6 +29,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class CreateController
|
||||
@@ -59,7 +60,7 @@ class CreateController extends Controller
|
||||
*/
|
||||
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.');
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class DeleteController
|
||||
@@ -64,7 +65,7 @@ class DeleteController extends Controller
|
||||
*/
|
||||
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.');
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class EditController
|
||||
@@ -63,7 +64,7 @@ class EditController extends Controller
|
||||
*/
|
||||
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.');
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -29,6 +29,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class IndexController
|
||||
@@ -55,7 +56,7 @@ class IndexController extends Controller
|
||||
*/
|
||||
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.');
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
@@ -63,7 +64,7 @@ class ShowController extends Controller
|
||||
*/
|
||||
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));
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Support\Http\Controllers\RequestInformation;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class SessionFilter.
|
||||
@@ -144,11 +145,11 @@ class Range
|
||||
|
||||
// share security message:
|
||||
if (
|
||||
\FireflyIII\Support\Facades\FireflyConfig::has('upgrade_security_message')
|
||||
&& \FireflyIII\Support\Facades\FireflyConfig::has('upgrade_security_level')
|
||||
FireflyConfig::has('upgrade_security_message')
|
||||
&& 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_level', \FireflyIII\Support\Facades\FireflyConfig::get('upgrade_security_level')->data);
|
||||
app('view')->share('upgrade_security_message', FireflyConfig::get('upgrade_security_message')->data);
|
||||
app('view')->share('upgrade_security_level', FireflyConfig::get('upgrade_security_level')->data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
use NotificationChannels\Pushover\PushoverReceiver;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
class OwnerNotifiable
|
||||
{
|
||||
@@ -58,8 +59,8 @@ class OwnerNotifiable
|
||||
public function routeNotificationForPushover(): PushoverReceiver
|
||||
{
|
||||
Log::debug('Return settings for routeNotificationForPushover');
|
||||
$pushoverAppToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_app_token', '')->data;
|
||||
$pushoverUserToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_user_token', '')->data;
|
||||
$pushoverAppToken = (string) FireflyConfig::getEncrypted('pushover_app_token', '')->data;
|
||||
$pushoverUserToken = (string) FireflyConfig::getEncrypted('pushover_user_token', '')->data;
|
||||
|
||||
return PushoverReceiver::withUserKey($pushoverUserToken)
|
||||
->withApplicationToken($pushoverAppToken)
|
||||
@@ -68,7 +69,7 @@ class OwnerNotifiable
|
||||
|
||||
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)) {
|
||||
$res = '';
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ use FireflyIII\Support\Notifications\UrlValidator;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use NotificationChannels\Pushover\PushoverChannel;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
// use Wijourdil\NtfyNotificationChannel\Channels\NtfyChannel;
|
||||
|
||||
@@ -54,7 +55,7 @@ class ReturnsAvailableChannels
|
||||
|
||||
$channels = ['mail'];
|
||||
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)) {
|
||||
$channels[] = 'slack';
|
||||
}
|
||||
@@ -73,8 +74,8 @@ class ReturnsAvailableChannels
|
||||
|
||||
// pushover
|
||||
if (true === config('notifications.channels.pushover.enabled', false)) {
|
||||
$pushoverAppToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_app_token', '')->data;
|
||||
$pushoverUserToken = (string) \FireflyIII\Support\Facades\FireflyConfig::getEncrypted('pushover_user_token', '')->data;
|
||||
$pushoverAppToken = (string) FireflyConfig::getEncrypted('pushover_app_token', '')->data;
|
||||
$pushoverUserToken = (string) FireflyConfig::getEncrypted('pushover_user_token', '')->data;
|
||||
if ('' === $pushoverAppToken || '' === $pushoverUserToken) {
|
||||
Log::warning('[b] No Pushover token, channel is disabled.');
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use NumberFormatter;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class Amount.
|
||||
@@ -117,7 +118,7 @@ class Amount
|
||||
if (!$user instanceof User) {
|
||||
$pref = $instance->getPreference('convert_to_primary_no_user');
|
||||
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);
|
||||
|
||||
return $res;
|
||||
@@ -128,7 +129,7 @@ class Amount
|
||||
$key = sprintf('convert_to_primary_%d', $user->id);
|
||||
$pref = $instance->getPreference($key);
|
||||
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);
|
||||
|
||||
return $res;
|
||||
|
||||
@@ -34,6 +34,7 @@ use FireflyIII\Support\Facades\Amount;
|
||||
use FireflyIII\Support\Facades\Steam;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class ExchangeRateConverter
|
||||
@@ -71,7 +72,7 @@ class ExchangeRateConverter
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace FireflyIII\Support\System;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Trait GeneratesInstallationId
|
||||
@@ -36,7 +37,7 @@ trait GeneratesInstallationId
|
||||
protected function generateInstallationId(): void
|
||||
{
|
||||
try {
|
||||
$config = \FireflyIII\Support\Facades\FireflyConfig::get('installation_id');
|
||||
$config = FireflyConfig::get('installation_id');
|
||||
} catch (FireflyException) {
|
||||
Log::info('Could not create or generate installation ID. Do not continue.');
|
||||
|
||||
@@ -52,7 +53,7 @@ trait GeneratesInstallationId
|
||||
$uuid4 = Uuid::uuid4();
|
||||
$uniqueId = (string)$uuid4;
|
||||
Log::info(sprintf('Created Firefly III installation ID %s', $uniqueId));
|
||||
\FireflyIII\Support\Facades\FireflyConfig::set('installation_id', $uniqueId);
|
||||
FireflyConfig::set('installation_id', $uniqueId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ class User extends Authenticatable
|
||||
public function routeNotificationForSlack(Notification $notification): ?string
|
||||
{
|
||||
// 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)) {
|
||||
$res = '';
|
||||
}
|
||||
|
||||
@@ -78,8 +78,8 @@ return [
|
||||
'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.
|
||||
],
|
||||
'version' => 'develop/2025-12-19',
|
||||
'build_time' => 1766164572,
|
||||
'version' => 'develop/2025-12-20',
|
||||
'build_time' => 1766210708,
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 28, // field is no longer used.
|
||||
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -10129,9 +10129,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.97.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.97.0.tgz",
|
||||
"integrity": "sha512-KR0igP1z4avUJetEuIeOdDlwaUDvkH8wSx7FdSjyYBS3dpyX3TzHfAMO0G1Q4/3cdjcmi3r7idh+KCmKqS+KeQ==",
|
||||
"version": "1.97.1",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.97.1.tgz",
|
||||
"integrity": "sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user