diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 7ab41a28..cbc120ce 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -186,66 +186,6 @@ class ProfileController extends Controller ->header('Content-Type', 'application/atom+xml'); } - public function followers(Request $request, $username) - { - $profile = $user = Profile::whereUsername($username)->firstOrFail(); - if($profile->status != null) { - return $this->accountCheck($profile); - } - // TODO: fix $profile/$user mismatch in profile & follower templates - $owner = Auth::check() && Auth::id() === $user->user_id; - $is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false; - if($profile->is_private || Auth::check()) { - $blocked = $this->blockedProfileCheck($profile); - $check = $this->privateProfileCheck($profile, null); - if($check || $blocked) { - return view('profile.private', compact('user', 'is_following')); - } - } - $followers = $profile->followers()->whereNull('status')->orderBy('followers.created_at', 'desc')->simplePaginate(12); - $is_admin = is_null($user->domain) ? $user->user->is_admin : false; - if ($user->remote_url) { - $settings = new \StdClass; - $settings->crawlable = false; - } else { - $settings = $profile->user->settings; - if(!$settings->show_profile_follower_count && !$owner) { - abort(403); - } - } - return view('profile.followers', compact('user', 'profile', 'followers', 'owner', 'is_following', 'is_admin', 'settings')); - } - - public function following(Request $request, $username) - { - $profile = $user = Profile::whereUsername($username)->firstOrFail(); - if($profile->status != null) { - return $this->accountCheck($profile); - } - // TODO: fix $profile/$user mismatch in profile & follower templates - $owner = Auth::check() && Auth::id() === $user->user_id; - $is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false; - if($profile->is_private || Auth::check()) { - $blocked = $this->blockedProfileCheck($profile); - $check = $this->privateProfileCheck($profile, null); - if($check || $blocked) { - return view('profile.private', compact('user', 'is_following')); - } - } - $following = $profile->following()->whereNull('status')->orderBy('followers.created_at', 'desc')->simplePaginate(12); - $is_admin = is_null($user->domain) ? $user->user->is_admin : false; - if ($user->remote_url) { - $settings = new \StdClass; - $settings->crawlable = false; - } else { - $settings = $profile->user->settings; - if(!$settings->show_profile_follower_count && !$owner) { - abort(403); - } - } - return view('profile.following', compact('user', 'profile', 'following', 'owner', 'is_following', 'is_admin', 'settings')); - } - public function meRedirect() { abort_if(!Auth::check(), 404); diff --git a/resources/views/profile/followers.blade.php b/resources/views/profile/followers.blade.php deleted file mode 100644 index aa6ef39a..00000000 --- a/resources/views/profile/followers.blade.php +++ /dev/null @@ -1,66 +0,0 @@ -@extends('layouts.app',['title' => $profile->username . "’s followers"]) - -@section('content') - -@include('profile.partial.user-info') - -
{{ __('profile.emptyFollowers') }}
-{{ __('profile.emptyFollowing') }}
-