Skip to content
Snippets Groups Projects
Commit f8c2b83a authored by xamgore's avatar xamgore
Browse files

Fixes menu displaying for admins & deans

Ternary operator is left-associated in PHP (right in C++), so we have:
    (...) ? one : second;

I have put an extra braces to improve the evaluation order.
parent 4fb5c8cd
Branches
Tags
No related merge requests found
......@@ -15,11 +15,11 @@ class Controller_Environment_Office extends Controller_Environment_User
// todo: move to twig
$menu = Model_System::loadConfig(
$this->user->isAdmin()
? 'sidePanel/admin.json'
: $this->user->isDean()
? 'sidePanel/dean.json'
: []);
$this->user->isAdmin() ?
'sidePanel/admin.json' : (
$this->user->isDean() ?
'sidePanel/dean.json' : []
));
$this->twig->set_global('SidePanel', $menu);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment