Skip to content

Commit

Permalink
Only highlight sidebar manage menu when needed
Browse files Browse the repository at this point in the history
We are only in the context of Manage menu when editing Global Profiles.
When working with a User Profile, the sidebar should not show the
Manage Overview Page as active.

Fixes #27258
  • Loading branch information
dregad committed Sep 18, 2020
1 parent 4c8c3f8 commit 3f660aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions account_prof_edit_page.php
Expand Up @@ -84,6 +84,8 @@
if( $t_global_profile ) {
layout_page_begin( 'manage_overview_page.php' );
print_manage_menu( 'manage_prof_menu_page.php' );
} else {
layout_page_begin();
}
?>

Expand Down
6 changes: 3 additions & 3 deletions account_prof_menu_page.php
Expand Up @@ -61,7 +61,6 @@
}

auth_ensure_user_authenticated();

current_user_ensure_unprotected();

$t_manage_global_profile_threshold = config_get( 'manage_global_profile_threshold' );
Expand All @@ -74,10 +73,11 @@

layout_page_header( lang_get( 'manage_profiles_link' ) );

layout_page_begin( 'manage_overview_page.php' );

if( $g_global_profiles ) {
layout_page_begin( 'manage_overview_page.php' );
print_manage_menu( 'manage_prof_menu_page.php' );
} else {
layout_page_begin();
}

if( $g_global_profiles ) {
Expand Down

0 comments on commit 3f660aa

Please sign in to comment.