#111: Accessing the user activity page/JSON feed is now impossible when feeds are disabled. Also the Activity icon is not shown in the navbar when feeds are disabled.
This commit is contained in:
parent
3982f47243
commit
42a1e4b770
@ -22,6 +22,11 @@ class UserController extends Controller
|
||||
{
|
||||
public function activityFeed()
|
||||
{
|
||||
if (!UserConfig::get('social_user_feeds'))
|
||||
{
|
||||
return redirect(route('home'));
|
||||
}
|
||||
|
||||
return Theme::render('gallery.user_activity_feed', [
|
||||
'user' => $this->getUser()
|
||||
]);
|
||||
@ -29,6 +34,11 @@ class UserController extends Controller
|
||||
|
||||
public function activityFeedJson()
|
||||
{
|
||||
if (!UserConfig::get('social_user_feeds'))
|
||||
{
|
||||
return response()->json(['message' => 'Activity feeds not enabled']);
|
||||
}
|
||||
|
||||
$user = $this->getUser();
|
||||
|
||||
$result = [];
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbar-content">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
@if (!Auth::guest())
|
||||
@if (!Auth::guest() && UserConfig::get('social_user_feeds'))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('userActivityFeed') }}">
|
||||
<i class="fa fa-rss"></i> @lang('navigation.navbar.activity_feed')
|
||||
|
Loading…
Reference in New Issue
Block a user