🤖 Auto commit for release 'develop' on 2025-08-16

This commit is contained in:
JC5
2025-08-16 19:36:45 +02:00
parent eccc58e75a
commit 3409240a19
22 changed files with 96 additions and 73 deletions

View File

@@ -42,7 +42,7 @@ class ValidatesEnvironmentVariables extends Command
*
* @var string
*/
protected $signature = 'integrity:validates-environment-variables';
protected $signature = 'integrity:validates-environment-variables';
/**
* Execute the console command.
@@ -67,9 +67,9 @@ class ValidatesEnvironmentVariables extends Command
private function validateLanguage(): bool
{
$language = config('firefly.default_language');
$locale = config('firefly.default_locale');
$options = array_keys(config('firefly.languages'));
$language = config('firefly.default_language');
$locale = config('firefly.default_locale');
$options = array_keys(config('firefly.languages'));
if (!in_array($language, $options, true)) {
$this->friendlyError(sprintf('DEFAULT_LANGUAGE "%s" is not a valid language for Firefly III.', $language));
@@ -86,6 +86,7 @@ class ValidatesEnvironmentVariables extends Command
return false;
}
return true;
}
@@ -96,8 +97,10 @@ class ValidatesEnvironmentVariables extends Command
$this->friendlyError(sprintf('AUTHENTICATION_GUARD "%s" is not a valid guard for Firefly III.', $guard));
$this->friendlyError('Please check your .env file and make sure you use a valid setting.');
$this->friendlyError('Valid guards are: web, remote_user_guard');
return false;
}
return true;
}
@@ -107,8 +110,10 @@ class ValidatesEnvironmentVariables extends Command
if ('' !== $token && 32 !== strlen($token)) {
$this->friendlyError('STATIC_CRON_TOKEN must be empty or a 32-character string.');
$this->friendlyError('Please check your .env file and make sure you use a valid setting.');
return false;
}
return true;
}
}

View File

@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\Storage;
use Safe\Exceptions\FileinfoException;
use Safe\Exceptions\FilesystemException;
use Safe\Exceptions\StringsException;
use function Safe\file_put_contents;
use function Safe\md5_file;
use function Safe\mime_content_type;
@@ -45,10 +46,11 @@ class ScansAttachments extends Command
protected $description = 'Rescan all attachments and re-set the correct MD5 hash and mime.';
protected $signature = 'firefly-iii:scan-attachments';
protected $signature = 'firefly-iii:scan-attachments';
/**
* Execute the console command.
*
* @throws FilesystemException
* @throws StringsException
* @throws FileinfoException
@@ -74,7 +76,7 @@ class ScansAttachments extends Command
Log::error(sprintf('Could not decrypt data of attachment #%d: %s', $attachment->id, $e->getMessage()));
$decryptedContent = $encryptedContent;
}
$tempFileName = tempnam(sys_get_temp_dir(), 'FireflyIII');
$tempFileName = tempnam(sys_get_temp_dir(), 'FireflyIII');
file_put_contents($tempFileName, $decryptedContent);
$attachment->md5 = (string)md5_file($tempFileName);
$attachment->mime = (string)mime_content_type($tempFileName);