aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/usersettings.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-18 17:47:50 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-18 17:47:50 +0000
commit569f19d8ff89539eb8d38b1ca1b07a2baa41852c (patch)
tree0ace0c2792db822cd0db5eae672f1f472a29439a /engine/lib/usersettings.php
parent8ec093ecc1bf28c09f5d2dbe3c7bc8e6a2485ac6 (diff)
downloadelgg-569f19d8ff89539eb8d38b1ca1b07a2baa41852c.tar.gz
elgg-569f19d8ff89539eb8d38b1ca1b07a2baa41852c.tar.bz2
half way through converting submenu to new menu code - pages and groups are the two major users left
git-svn-id: http://code.elgg.org/elgg/trunk@7669 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/usersettings.php')
-rw-r--r--engine/lib/usersettings.php31
1 files changed, 19 insertions, 12 deletions
diff --git a/engine/lib/usersettings.php b/engine/lib/usersettings.php
index 7192ea0fa..f6bbaea06 100644
--- a/engine/lib/usersettings.php
+++ b/engine/lib/usersettings.php
@@ -42,20 +42,27 @@ $priority = 500) {
* @return void
*/
function usersettings_pagesetup() {
- // Get config
- global $CONFIG;
-
- // Menu options
- if (elgg_get_context() == "settings") {
+ if (elgg_get_context() == "settings" && get_loggedin_userid()) {
$user = get_loggedin_user();
- add_submenu_item(elgg_echo('usersettings:user:opt:linktext'),
- $CONFIG->wwwroot . "pg/settings/user/{$user->username}/");
-
- add_submenu_item(elgg_echo('usersettings:plugins:opt:linktext'),
- $CONFIG->wwwroot . "pg/settings/plugins/{$user->username}/");
- add_submenu_item(elgg_echo('usersettings:statistics:opt:linktext'),
- $CONFIG->wwwroot . "pg/settings/statistics/{$user->username}/");
+ $params = array(
+ 'name' => '1_account',
+ 'title' => elgg_echo('usersettings:user:opt:linktext'),
+ 'url' => "pg/settings/user/{$user->username}",
+ );
+ elgg_register_menu_item('page', $params);
+ $params = array(
+ 'name' => '1_plugins',
+ 'title' => elgg_echo('usersettings:plugins:opt:linktext'),
+ 'url' => "pg/settings/plugins/{$user->username}",
+ );
+ elgg_register_menu_item('page', $params);
+ $params = array(
+ 'name' => '1_statistics',
+ 'title' => elgg_echo('usersettings:statistics:opt:linktext'),
+ 'url' => "pg/settings/statistics/{$user->username}",
+ );
+ elgg_register_menu_item('page', $params);
}
}