diff --git a/CHANGELOG.md b/CHANGELOG.md index f991f9dd..4b0512a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.3...dev) +### Updates +- Improve S3 support by removing `ListObjects` call in media deletion ([#3438](https://github.com/pixelfed/pixelfed/pull/3438)) +- Enforce UTC in incoming activities ([18931a1f](https://github.com/pixelfed/pixelfed/commit/18931a1f)) +- Add storage flags to admin dashboard diagnostics ([#3444](https://github.com/pixelfed/pixelfed/pull/3444)) +- Hardcode UTC application timezone to prevent timezone issues ([b0d2c5e1](https://github.com/pixelfed/pixelfed/commit/b0d2c5e1)) + ## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3) ### Added diff --git a/app/Http/Controllers/DiscoverController.php b/app/Http/Controllers/DiscoverController.php index d6e9f133..a231f86d 100644 --- a/app/Http/Controllers/DiscoverController.php +++ b/app/Http/Controllers/DiscoverController.php @@ -45,26 +45,6 @@ class DiscoverController extends Controller return view('discover.tags.show', compact('tag', 'tagCount')); } - public function showCategory(Request $request, $slug) - { - abort(404); - } - - public function showLoops(Request $request) - { - abort(404); - } - - public function loopsApi(Request $request) - { - abort(404); - } - - public function loopWatch(Request $request) - { - return response()->json(200); - } - public function getHashtags(Request $request) { $user = $request->user(); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php deleted file mode 100644 index a9e74ab8..00000000 --- a/app/Http/Controllers/HomeController.php +++ /dev/null @@ -1,28 +0,0 @@ -middleware('auth'); - } - - /** - * Show the application dashboard. - * - * @return \Illuminate\Http\Response - */ - public function index(Request $request) - { - return redirect('/'); - } -} diff --git a/app/Jobs/MediaPipeline/MediaDeletePipeline.php b/app/Jobs/MediaPipeline/MediaDeletePipeline.php index f44d080c..3c486a9c 100644 --- a/app/Jobs/MediaPipeline/MediaDeletePipeline.php +++ b/app/Jobs/MediaPipeline/MediaDeletePipeline.php @@ -38,12 +38,8 @@ class MediaDeletePipeline implements ShouldQueue if(config_cache('pixelfed.cloud_storage') == true) { $disk = Storage::disk(config('filesystems.cloud')); - if($disk->exists($path)) { - $disk->delete($path); - } - if($disk->exists($thumb)) { - $disk->delete($thumb); - } + $disk->delete($path); + $disk->delete($thumb); if(count($e) > 4 && count($disk->files($i)) == 0) { $disk->deleteDirectory($i); diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index ccf754d0..b29d25aa 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -470,7 +470,7 @@ class Helpers { $status->object_url = $id; $status->caption = strip_tags($activity['content']); $status->rendered = Purify::clean($activity['content']); - $status->created_at = Carbon::parse($ts); + $status->created_at = Carbon::parse($ts)->tz('UTC'); $status->in_reply_to_id = $reply_to; $status->local = false; $status->is_nsfw = $cw; @@ -580,7 +580,7 @@ class Helpers { $status->object_url = $id; $status->caption = strip_tags($res['content']); $status->rendered = Purify::clean($res['content']); - $status->created_at = Carbon::parse($ts); + $status->created_at = Carbon::parse($ts)->tz('UTC'); $status->in_reply_to_id = null; $status->local = false; $status->is_nsfw = $cw; diff --git a/config/app.php b/config/app.php index eb1ca77a..93273b62 100644 --- a/config/app.php +++ b/config/app.php @@ -55,17 +55,10 @@ return [ 'url' => env('APP_URL', 'https://localhost'), /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | - */ + * Do not edit your timezone or things will break! + */ - 'timezone' => env('APP_TIMEZONE', 'UTC'), + 'timezone' => 'UTC', /* |-------------------------------------------------------------------------- diff --git a/resources/views/admin/diagnostics/home.blade.php b/resources/views/admin/diagnostics/home.blade.php index 3c40099e..c55645e7 100644 --- a/resources/views/admin/diagnostics/home.blade.php +++ b/resources/views/admin/diagnostics/home.blade.php @@ -176,6 +176,14 @@ OAUTH private key exists: {{ file_exists(storage_path('oauth-private.key')) ? '✅' : '❌' }} +