diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-29 01:50:59 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-29 01:50:59 +0000 |
commit | 9f856937caf1ac2cab02fbe5aa73b0c3bb84f84c (patch) | |
tree | 8c614cd0a131bcf7b46ebafce2a76711a9212b3f /engine | |
parent | 7c1a133ad9f316d2e3b96b12eaec379c25e5d22e (diff) | |
download | elgg-9f856937caf1ac2cab02fbe5aa73b0c3bb84f84c.tar.gz elgg-9f856937caf1ac2cab02fbe5aa73b0c3bb84f84c.tar.bz2 |
Fixes #3266 let the settings pages have breadcrumbs
git-svn-id: http://code.elgg.org/elgg/trunk@8878 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/user_settings.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/engine/lib/user_settings.php b/engine/lib/user_settings.php index 5c4d1fbe4..29415f6ba 100644 --- a/engine/lib/user_settings.php +++ b/engine/lib/user_settings.php @@ -286,11 +286,23 @@ function usersettings_page_handler($page) { $page[0] = 'user'; } + if ($page[1]) { + $user = get_user_by_username($page[1]); + elgg_set_page_owner_guid($user->guid); + } else { + $user = elgg_get_logged_in_user_guid(); + elgg_set_page_owner_guid($user->guid); + } + + elgg_push_breadcrumb(elgg_echo('settings'), "settings/user/$user->username"); + switch ($page[0]) { case 'statistics': + elgg_push_breadcrumb(elgg_echo('usersettings:statistics:opt:linktext')); $path = $CONFIG->path . "pages/settings/statistics.php"; break; case 'plugins': + elgg_push_breadcrumb(elgg_echo('usersettings:plugins:opt:linktext')); $path = $CONFIG->path . "pages/settings/tools.php"; break; case 'user': @@ -299,13 +311,6 @@ function usersettings_page_handler($page) { break; } - if ($page[1]) { - $user = get_user_by_username($page[1]); - elgg_set_page_owner_guid($user->guid); - } else { - elgg_set_page_owner_guid(elgg_get_logged_in_user_guid()); - } - require($path); } |