Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
5a6b150f
Commit
5a6b150f
authored
Nov 13, 2006
by
Richard Mansfield
Browse files
site_menu() checks whether user is logged in
parent
5d4e7a12
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
5a6b150f
...
...
@@ -906,9 +906,10 @@ function main_nav() {
* @return $menu a data structure containing the site menu
*/
function
site_menu
()
{
//$wwwroot = get_config('wwwroot');
//$wwwroot = get_config('wwwroot'); (int)
global
$SESSION
;
$menu
=
array
();
if
(
$menuitems
=
@
get_records
(
'site_menu'
,
'
'
,
''
,
'displayorder'
))
{
if
(
$menuitems
=
@
get_records
(
'site_menu'
,
'
public'
,(
int
)
!
$SESSION
->
is_logged_in
()
,
'displayorder'
))
{
foreach
(
$menuitems
as
$i
)
{
if
(
$i
->
url
)
{
$menu
[]
=
array
(
'name'
=>
$i
->
title
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment