mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 04:53:17 +00:00
commit
ecbc168361
36 changed files with 47 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
- 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 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/))
|
||||
|
||||
## [v0.11.4 (2022-10-04)](https://github.com/pixelfed/pixelfed/compare/v0.11.3...v0.11.4)
|
||||
|
|
|
@ -236,7 +236,10 @@ class MediaStorageService {
|
|||
$tmpBase = storage_path('app/remcache/');
|
||||
$tmpPath = 'avatar_' . $avatar->profile_id . '-' . $path;
|
||||
$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);
|
||||
|
||||
$disk = Storage::disk($driver);
|
||||
|
@ -245,7 +248,7 @@ class MediaStorageService {
|
|||
|
||||
$avatar->media_path = $base . $path;
|
||||
$avatar->is_remote = true;
|
||||
$avatar->cdn_url = $permalink;
|
||||
$avatar->cdn_url = $local ? config('app.url') . $permalink : $permalink;
|
||||
$avatar->size = $head['length'];
|
||||
$avatar->change_count = $avatar->change_count + 1;
|
||||
$avatar->last_fetched_at = now();
|
||||
|
|
|
@ -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
BIN
public/css/admin.css
vendored
Binary file not shown.
BIN
public/css/app.css
vendored
BIN
public/css/app.css
vendored
Binary file not shown.
BIN
public/css/appdark.css
vendored
BIN
public/css/appdark.css
vendored
Binary file not shown.
BIN
public/css/landing.css
vendored
BIN
public/css/landing.css
vendored
Binary file not shown.
Binary file not shown.
BIN
public/js/daci-17lx4qxke.js
vendored
BIN
public/js/daci-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/daci-ivl9d2teh.js
vendored
Normal file
BIN
public/js/daci-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/dffc-17lx4qxke.js
vendored
BIN
public/js/dffc-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/dffc-ivl9d2teh.js
vendored
Normal file
BIN
public/js/dffc-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/js/dmyh-17lx4qxke.js
vendored
BIN
public/js/dmyh-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/dmyh-ivl9d2teh.js
vendored
Normal file
BIN
public/js/dmyh-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/dmym-17lx4qxke.js
vendored
BIN
public/js/dmym-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/dmym-ivl9d2teh.js
vendored
Normal file
BIN
public/js/dmym-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/dsfc-17lx4qxke.js
vendored
BIN
public/js/dsfc-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/dsfc-ivl9d2teh.js
vendored
Normal file
BIN
public/js/dsfc-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/dssc-17lx4qxke.js
vendored
BIN
public/js/dssc-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/dssc-ivl9d2teh.js
vendored
Normal file
BIN
public/js/dssc-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/home-17lx4qxke.js
vendored
BIN
public/js/home-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/home-ivl9d2teh.js
vendored
Normal file
BIN
public/js/home-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/live-player.js
vendored
BIN
public/js/live-player.js
vendored
Binary file not shown.
BIN
public/js/manifest.js
vendored
BIN
public/js/manifest.js
vendored
Binary file not shown.
BIN
public/js/notifications-17lx4qxke.js
vendored
BIN
public/js/notifications-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/notifications-ivl9d2teh.js
vendored
Normal file
BIN
public/js/notifications-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/post-17lx4qxke.js
vendored
BIN
public/js/post-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/post-ivl9d2teh.js
vendored
Normal file
BIN
public/js/post-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/profile-17lx4qxke.js
vendored
BIN
public/js/profile-17lx4qxke.js
vendored
Binary file not shown.
BIN
public/js/profile-ivl9d2teh.js
vendored
Normal file
BIN
public/js/profile-ivl9d2teh.js
vendored
Normal file
Binary file not shown.
BIN
public/js/spa.js
vendored
BIN
public/js/spa.js
vendored
Binary file not shown.
BIN
public/js/vendor.js
vendored
BIN
public/js/vendor.js
vendored
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue