Merge pull request #3692 from pixelfed/staging

Staging
This commit is contained in:
daniel 2022-10-08 23:03:32 -06:00 committed by GitHub
commit ecbc168361
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 47 additions and 2 deletions

View file

@ -6,6 +6,7 @@
- Update ApiV1Controller, include self likes in favourited_by endpoint ([58b331d2](https://github.com/pixelfed/pixelfed/commit/58b331d2)) - Update ApiV1Controller, include self likes in favourited_by endpoint ([58b331d2](https://github.com/pixelfed/pixelfed/commit/58b331d2))
- Update PublicApiController, remove expensive and unused relationships ([2ecc3144](https://github.com/pixelfed/pixelfed/commit/2ecc3144)) - Update PublicApiController, remove expensive and unused relationships ([2ecc3144](https://github.com/pixelfed/pixelfed/commit/2ecc3144))
- Update status deletion, fix database lock issues and side effects ([04e8c96a](https://github.com/pixelfed/pixelfed/commit/04e8c96a)) - Update status deletion, fix database lock issues and side effects ([04e8c96a](https://github.com/pixelfed/pixelfed/commit/04e8c96a))
- Fix remote profile avatar urls when storing locally ([b0422d4f](https://github.com/pixelfed/pixelfed/commit/b0422d4f))
- ([](https://github.com/pixelfed/pixelfed/commit/)) - ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4) ## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)

View file

@ -236,7 +236,10 @@ class MediaStorageService {
$tmpBase = storage_path('app/remcache/'); $tmpBase = storage_path('app/remcache/');
$tmpPath = 'avatar_' . $avatar->profile_id . '-' . $path; $tmpPath = 'avatar_' . $avatar->profile_id . '-' . $path;
$tmpName = $tmpBase . $tmpPath; $tmpName = $tmpBase . $tmpPath;
$data = file_get_contents($url, false, null, 0, $head['length']); $data = @file_get_contents($url, false, null, 0, $head['length']);
if(!$data) {
return;
}
file_put_contents($tmpName, $data); file_put_contents($tmpName, $data);
$disk = Storage::disk($driver); $disk = Storage::disk($driver);
@ -245,7 +248,7 @@ class MediaStorageService {
$avatar->media_path = $base . $path; $avatar->media_path = $base . $path;
$avatar->is_remote = true; $avatar->is_remote = true;
$avatar->cdn_url = $permalink; $avatar->cdn_url = $local ? config('app.url') . $permalink : $permalink;
$avatar->size = $head['length']; $avatar->size = $head['length'];
$avatar->change_count = $avatar->change_count + 1; $avatar->change_count = $avatar->change_count + 1;
$avatar->last_fetched_at = now(); $avatar->last_fetched_at = now();

View file

@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Cache;
use App\Services\AccountService;
use App\Avatar;
class FixCdnUrlInAvatarsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$baseUrl = 'https://' . config('pixelfed.domain.app');
Avatar::whereNotNull('cdn_url')
->chunk(50, function($avatars) use($baseUrl) {
foreach($avatars as $avatar) {
if(substr($avatar->cdn_url, 0, 23) === '/storage/cache/avatars/') {
$avatar->cdn_url = $baseUrl . $avatar->cdn_url;
$avatar->save();
}
Cache::forget('avatar:' . $avatar->profile_id);
AccountService::del($avatar->profile_id);
}
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}

BIN
public/css/admin.css vendored

Binary file not shown.

BIN
public/css/app.css vendored

Binary file not shown.

BIN
public/css/appdark.css vendored

Binary file not shown.

BIN
public/css/landing.css vendored

Binary file not shown.

Binary file not shown.

BIN
public/js/daci-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/dffc-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/dmyh-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/dmym-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/dsfc-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/dssc-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/home-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/manifest.js vendored

Binary file not shown.

Binary file not shown.

BIN
public/js/notifications-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/post-ivl9d2teh.js vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
public/js/profile-ivl9d2teh.js vendored Normal file

Binary file not shown.

BIN
public/js/spa.js vendored

Binary file not shown.

BIN
public/js/vendor.js vendored

Binary file not shown.

Binary file not shown.