mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +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/jpeg':
|
||||||
case 'image/png':
|
case 'image/png':
|
||||||
case 'video/mp4':
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -51,7 +51,7 @@ class RemoteAvatarFetch implements ShouldQueue
|
||||||
{
|
{
|
||||||
$profile = $this->profile;
|
$profile = $this->profile;
|
||||||
|
|
||||||
if(config('pixelfed.cloud_storage') !== true) {
|
if(config_cache('pixelfed.cloud_storage') !== true) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class RemoteAvatarFetch implements ShouldQueue
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !isset($person['icon']) ||
|
if( !isset($person['icon']) ||
|
||||||
!isset($person['icon']['type']) ||
|
!isset($person['icon']['type']) ||
|
||||||
!isset($person['icon']['url'])
|
!isset($person['icon']['url'])
|
||||||
) {
|
) {
|
||||||
|
@ -99,4 +99,4 @@ class RemoteAvatarFetch implements ShouldQueue
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ class MediaDeletePipeline implements ShouldQueue
|
||||||
$media = $this->media;
|
$media = $this->media;
|
||||||
$path = $media->media_path;
|
$path = $media->media_path;
|
||||||
$thumb = $media->thumbnail_path;
|
$thumb = $media->thumbnail_path;
|
||||||
|
|
||||||
if(!$path) {
|
if(!$path) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class MediaDeletePipeline implements ShouldQueue
|
||||||
array_pop($e);
|
array_pop($e);
|
||||||
$i = implode('/', $e);
|
$i = implode('/', $e);
|
||||||
|
|
||||||
if(config('pixelfed.cloud_storage') == true) {
|
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||||
$disk = Storage::disk(config('filesystems.cloud'));
|
$disk = Storage::disk(config('filesystems.cloud'));
|
||||||
if($disk->exists($path)) {
|
if($disk->exists($path)) {
|
||||||
$disk->delete($path);
|
$disk->delete($path);
|
||||||
|
@ -64,4 +64,4 @@ class MediaDeletePipeline implements ShouldQueue
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class MediaStorageService {
|
||||||
|
|
||||||
public static function store(Media $media)
|
public static function store(Media $media)
|
||||||
{
|
{
|
||||||
if(config('pixelfed.cloud_storage') == true) {
|
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||||
(new self())->cloudStore($media);
|
(new self())->cloudStore($media);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ class Helpers {
|
||||||
$media->version = 3;
|
$media->version = 3;
|
||||||
$media->save();
|
$media->save();
|
||||||
|
|
||||||
if(config('pixelfed.cloud_storage') == true) {
|
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||||
MediaStoragePipeline::dispatch($media);
|
MediaStoragePipeline::dispatch($media);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -511,7 +511,7 @@ class Helpers {
|
||||||
$profile->webfinger = Purify::clean($webfinger);
|
$profile->webfinger = Purify::clean($webfinger);
|
||||||
$profile->last_fetched_at = now();
|
$profile->last_fetched_at = now();
|
||||||
$profile->save();
|
$profile->save();
|
||||||
if(config('pixelfed.cloud_storage') == true) {
|
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||||
RemoteAvatarFetch::dispatch($profile);
|
RemoteAvatarFetch::dispatch($profile);
|
||||||
}
|
}
|
||||||
return $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->sharedInbox = isset($res['endpoints']) && isset($res['endpoints']['sharedInbox']) && Helpers::validateUrl($res['endpoints']['sharedInbox']) ? $res['endpoints']['sharedInbox'] : null;
|
||||||
$profile->save();
|
$profile->save();
|
||||||
}
|
}
|
||||||
if(config('pixelfed.cloud_storage') == true) {
|
if(config_cache('pixelfed.cloud_storage') == true) {
|
||||||
RemoteAvatarFetch::dispatch($profile);
|
RemoteAvatarFetch::dispatch($profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue