1 | <?php |
||||
2 | /** |
||||
3 | * Navigation menu for a user's or a group's pages |
||||
4 | * |
||||
5 | * @uses $vars['page'] Page object if manually setting selected item |
||||
6 | */ |
||||
7 | |||||
8 | // add the jquery treeview files for navigation |
||||
9 | elgg_load_css('jquery.treeview'); |
||||
10 | elgg_require_js('pages/sidebar/navigation'); |
||||
11 | |||||
12 | $selected_page = elgg_extract('page', $vars, false); |
||||
13 | |||||
14 | $title = elgg_echo('pages:navigation'); |
||||
15 | |||||
16 | pages_register_navigation_tree(elgg_get_page_owner_entity(), $selected_page); |
||||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
It seems like
$selected_page can also be of type false ; however, parameter $selected of pages_register_navigation_tree() does only seem to accept ElggPage , maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
17 | |||||
18 | $content = elgg_view_menu('pages_nav', [ |
||||
19 | 'class' => 'pages-nav', |
||||
20 | ]); |
||||
21 | |||||
22 | if (!$content) { |
||||
23 | $content = elgg_format_element('p', [], elgg_echo('pages:none')); |
||||
24 | } |
||||
25 | |||||
26 | echo elgg_view_module('aside', $title, $content); |
||||
27 |