Skip to content

Commit

Permalink
PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
devosc committed Jul 4, 2022
1 parent 98c6db3 commit bbeebe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions view/about/more/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ class="{{ '/overview' == $path ? ' active' : '' }} pl-0 nav-link d-inline-block"
</li>
@assign($user, $this->plugin('user'))
@if($user->authenticated())
<li class="nav-item{{ '/dashboard' == substr($path, 0, 10) ? ' active' : '' }}"><a class="nav-link" href="{{ $this->url(['dashboard']) }}">Dashboard</a></li>
<li class="nav-item{{ '/explore' == substr($path, 0, 8) ? ' active' : '' }}"><a class="nav-link" href="{{ $this->url('explore') }}">Explore</a></li>
<li class="nav-item{{ '/dashboard' == substr((string) $path, 0, 10) ? ' active' : '' }}"><a class="nav-link" href="{{ $this->url(['dashboard']) }}">Dashboard</a></li>
<li class="nav-item{{ '/explore' == substr((string) $path, 0, 8) ? ' active' : '' }}"><a class="nav-link" href="{{ $this->url('explore') }}">Explore</a></li>
<li class="nav-item"><a class="nav-link" href="{{ $this->url(['app', 'controller' => 'logout']) }}">Logout</a></li>
@else
<li class="nav-item{{ '/login' == $path ? ' active' : '' }}"><a class="nav-link" href="{{ $this->url(['app', 'controller' => 'login']) }}">Login</a></li>
Expand Down
4 changes: 2 additions & 2 deletions view/layout/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@
$user = $this->plugin('user');

if ($user->authenticated()) {
echo '<li class="nav-item', ('/dashboard' == substr($path, 0, 10) ? ' active' : '') ,'"><a class="nav-link" href="', $this->url(['dashboard']) ,'">Dashboard</a></li>',
'<li class="nav-item', ('/explore' == substr($path, 0, 8) ? ' active' : '') ,'"><a class="nav-link" href="', $this->url('explore') ,'">Explore</a></li>',
echo '<li class="nav-item', ('/dashboard' == substr((string) $path, 0, 10) ? ' active' : '') ,'"><a class="nav-link" href="', $this->url(['dashboard']) ,'">Dashboard</a></li>',
'<li class="nav-item', ('/explore' == substr((string) $path, 0, 8) ? ' active' : '') ,'"><a class="nav-link" href="', $this->url('explore') ,'">Explore</a></li>',
'<li class="nav-item"><a class="nav-link" href="', $this->url(['app', 'controller' => 'logout']) ,'">Logout</a></li>';
} else {
echo '<li class="nav-item', ('/login' == $path ? ' active' : '') ,'"><a class="nav-link" href="', $this->url(['app', 'controller' => 'login']) ,'">Login</a></li>';
Expand Down

0 comments on commit bbeebe9

Please sign in to comment.