aboutsummaryrefslogtreecommitdiff
path: root/mod/notifications/start.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 /mod/notifications/start.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 'mod/notifications/start.php')
-rw-r--r--mod/notifications/start.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/mod/notifications/start.php b/mod/notifications/start.php
index 1bb99da35..859f4ac14 100644
--- a/mod/notifications/start.php
+++ b/mod/notifications/start.php
@@ -60,11 +60,23 @@ function notifications_page_handler($page) {
*
*/
function notifications_plugin_pagesetup() {
- global $CONFIG;
- if (elgg_get_context() == 'settings') {
- add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), "pg/notifications/personal");
+ if (elgg_get_context() == "settings" && get_loggedin_userid()) {
+ $user = get_loggedin_user();
+
+ $params = array(
+ 'name' => '2_a_user_notify',
+ 'title' => elgg_echo('notifications:subscriptions:changesettings'),
+ 'url' => "pg/notifications/personal",
+ );
+ elgg_register_menu_item('page', $params);
+
if (is_plugin_enabled('groups')) {
- add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), "pg/notifications/group");
+ $params = array(
+ 'name' => '2_group_notify',
+ 'title' => elgg_echo('notifications:subscriptions:changesettings:groups'),
+ 'url' => "pg/notifications/group",
+ );
+ elgg_register_menu_item('page', $params);
}
}
}