* Created localized exception.php (DE)

* Update German translation

* Update German translation

* Update de localization, Create New Post -> New

* Formatting

* Update site.php (#2889)

Co-authored-by: daniel <danielsupernault@gmail.com>

* Formatting

* Update controllers, fixes #2906

* Update NotificationService, fix 500 bug

* Update changelog

Co-authored-by: forenta <ueblesurmeli-github@yahoo.de>
Co-authored-by: Tomas Brabenec <tomas@brabenec.net>
This commit is contained in:
daniel 2021-09-19 23:10:18 -06:00 committed by GitHub
parent cdfb6ac25f
commit 68437e614d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 57 additions and 28 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.11.1...dev)
### Updated
- Updated NotificationService, fix 500 bug. ([4a609dc3](https://github.com/pixelfed/pixelfed/commit/4a609dc3))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
### Added
- WebP Support ([069a0e4a](https://github.com/pixelfed/pixelfed/commit/069a0e4a))
@ -112,7 +116,6 @@
- Updated DirectMessageController, fix autocomplete bug. ([0f00be4d](https://github.com/pixelfed/pixelfed/commit/0f00be4d))
- Updated StoryService, fix division by zero bug. ([6ae1ba0a](https://github.com/pixelfed/pixelfed/commit/6ae1ba0a))
- Updated ApiV1Controller, fix empty public timeline bug. ([0584f9ee](https://github.com/pixelfed/pixelfed/commit/0584f9ee))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
### Added

View file

@ -15,10 +15,13 @@ use App\Jobs\ImportPipeline\ImportInstagram;
trait Instagram
{
public function instagram()
{
return view('settings.import.instagram.home');
}
public function instagram()
{
if(config_cache('pixelfed.import.instagram.enabled') != true) {
abort(404, 'Feature not enabled');
}
return view('settings.import.instagram.home');
}
public function instagramStart(Request $request)
{

View file

@ -6,8 +6,11 @@ use Illuminate\Http\Request;
trait Mastodon
{
public function mastodon()
{
return view('settings.import.mastodon.home');
}
public function mastodon()
{
if(config_cache('pixelfed.import.instagram.enabled') != true) {
abort(404, 'Feature not enabled');
}
return view('settings.import.mastodon.home');
}
}

View file

@ -11,10 +11,6 @@ class ImportController extends Controller
public function __construct()
{
$this->middleware('auth');
if(config_cache('pixelfed.import.instagram.enabled') != true) {
abort(404, 'Feature not enabled');
}
}
}

View file

@ -11,14 +11,10 @@ use App\Services\FollowerService;
class PollController extends Controller
{
public function __construct()
{
abort_if(!config_cache('instance.polls.enabled'), 404);
}
public function getPoll(Request $request, $id)
{
abort_if(!config_cache('instance.polls.enabled'), 404);
$poll = Poll::findOrFail($id);
$status = Status::findOrFail($poll->status_id);
if($status->scope != 'public') {
@ -34,6 +30,8 @@ class PollController extends Controller
public function vote(Request $request, $id)
{
abort_if(!config_cache('instance.polls.enabled'), 404);
abort_unless($request->user(), 403);
$this->validate($request, [

View file

@ -27,7 +27,10 @@ class NotificationService {
$ids = self::coldGet($id, $start, $stop);
}
foreach($ids as $id) {
$res->push(self::getNotification($id));
$n = self::getNotification($id);
if($n != null) {
$res->push($n);
}
}
return $res;
}
@ -56,7 +59,10 @@ class NotificationService {
$res = collect([]);
foreach($ids as $id) {
$res->push(self::getNotification($id));
$n = self::getNotification($id);
if($n != null) {
$res->push($n);
}
}
return $res->toArray();
}
@ -71,7 +77,10 @@ class NotificationService {
$res = collect([]);
foreach($ids as $id) {
$res->push(self::getNotification($id));
$n = self::getNotification($id);
if($n != null) {
$res->push($n);
}
}
return $res->toArray();
}
@ -129,7 +138,12 @@ class NotificationService {
public static function getNotification($id)
{
return Cache::remember('service:notification:'.$id, now()->addDays(3), function() use($id) {
$n = Notification::with('item')->findOrFail($id);
$n = Notification::with('item')->find($id);
if(!$n) {
return null;
}
$fractal = new Fractal\Manager();
$fractal->setSerializer(new ArraySerializer());
$resource = new Fractal\Resource\Item($n, new NotificationTransformer());

View file

@ -1,7 +1,6 @@
<?php
return [
'about' => 'O nás',
'help' => 'Nápověda',
'language' => 'Jazyk',
@ -12,5 +11,8 @@ return [
'l10nWip' => 'Stále pracujeme na podpoře lokalizací',
'currentLocale' => 'Aktuální jazyk',
'selectLocale' => 'Vyberte si jeden z podporovaných jazyků',
'contact' => 'Kontakt',
'contact-us' => 'Kontaktujte nás',
'places' => 'Místa',
'profiles' => 'Profily',
];

View file

@ -0,0 +1,11 @@
<?php
return [
'compose' => [
'invalid' => [
'album' => 'Mindestens 1 Foto oder Video muss enthalten sein.',
],
],
];

View file

@ -1,7 +1,6 @@
<?php
return [
'search' => 'Suche',
'home' => 'Heim',
'local' => 'Lokal',
@ -16,5 +15,5 @@ return [
'admin' => 'Administration',
'logout' => 'Abmelden',
'directMessages' => 'Privatnachrichten',
'composePost' => 'Neu',
];

View file

@ -15,5 +15,5 @@ return [
'contact' => 'Kontakt',
'contact-us' => 'Kontaktiere uns',
'places' => 'Orte',
'profiles' => 'Profile',
];