mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update config() to config_cache()
This commit is contained in:
parent
e8f15b6fa1
commit
41792eea56
5 changed files with 11 additions and 11 deletions
|
@ -646,7 +646,7 @@ class ComposeController extends Controller
|
|||
case 'image/jpeg':
|
||||
case 'image/png':
|
||||
case 'video/mp4':
|
||||
$finished = config('pixelfed.cloud_storage') ? (bool) $media->cdn_url : (bool) $media->processed_at;
|
||||
$finished = config_cache('pixelfed.cloud_storage') ? (bool) $media->cdn_url : (bool) $media->processed_at;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -51,7 +51,7 @@ class RemoteAvatarFetch implements ShouldQueue
|
|||
{
|
||||
$profile = $this->profile;
|
||||
|
||||
if(config('pixelfed.cloud_storage') !== true) {
|
||||
if(config_cache('pixelfed.cloud_storage') !== true) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class MediaDeletePipeline implements ShouldQueue
|
|||
array_pop($e);
|
||||
$i = implode('/', $e);
|
||||
|
||||
if(config('pixelfed.cloud_storage') == true) {
|
||||
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||
$disk = Storage::disk(config('filesystems.cloud'));
|
||||
if($disk->exists($path)) {
|
||||
$disk->delete($path);
|
||||
|
|
|
@ -20,7 +20,7 @@ class MediaStorageService {
|
|||
|
||||
public static function store(Media $media)
|
||||
{
|
||||
if(config('pixelfed.cloud_storage') == true) {
|
||||
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||
(new self())->cloudStore($media);
|
||||
}
|
||||
|
||||
|
|
|
@ -441,7 +441,7 @@ class Helpers {
|
|||
$media->version = 3;
|
||||
$media->save();
|
||||
|
||||
if(config('pixelfed.cloud_storage') == true) {
|
||||
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||
MediaStoragePipeline::dispatch($media);
|
||||
}
|
||||
}
|
||||
|
@ -511,7 +511,7 @@ class Helpers {
|
|||
$profile->webfinger = Purify::clean($webfinger);
|
||||
$profile->last_fetched_at = now();
|
||||
$profile->save();
|
||||
if(config('pixelfed.cloud_storage') == true) {
|
||||
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||
RemoteAvatarFetch::dispatch($profile);
|
||||
}
|
||||
return $profile;
|
||||
|
@ -528,7 +528,7 @@ class Helpers {
|
|||
$profile->sharedInbox = isset($res['endpoints']) && isset($res['endpoints']['sharedInbox']) && Helpers::validateUrl($res['endpoints']['sharedInbox']) ? $res['endpoints']['sharedInbox'] : null;
|
||||
$profile->save();
|
||||
}
|
||||
if(config('pixelfed.cloud_storage') == true) {
|
||||
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||
RemoteAvatarFetch::dispatch($profile);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue