aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/start.php
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 21:44:07 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 21:44:07 +0000
commit6b5a3b2dfd0a20da1dfb46f42a7bc79dfe9377fc (patch)
treee2f5b3cf9c799790fcc57b9e2c31c03cc70cb270 /mod/reportedcontent/start.php
parent07727717f2341edc80ba9dc47e78649d1133b29b (diff)
downloadelgg-6b5a3b2dfd0a20da1dfb46f42a7bc79dfe9377fc.tar.gz
elgg-6b5a3b2dfd0a20da1dfb46f42a7bc79dfe9377fc.tar.bz2
Updating multiple plugins to no longer register admin menus with an event hook.
git-svn-id: http://code.elgg.org/elgg/trunk@6191 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/start.php')
-rw-r--r--mod/reportedcontent/start.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
index ad75f06f0..22d93dbe1 100644
--- a/mod/reportedcontent/start.php
+++ b/mod/reportedcontent/start.php
@@ -27,17 +27,12 @@ function reportedcontent_init() {
elgg_extend_view('profile/menu/links', 'reportedcontent/user_report');
elgg_extend_view('footer/links', 'reportedcontent/footer_link');
}
-}
-
-/**
- * Adding the reported content to the admin menu
- *
- */
-function reportedcontent_pagesetup() {
- if (get_context() == 'admin' && isadminloggedin()) {
- global $CONFIG;
- add_submenu_item(elgg_echo('reportedcontent'), $CONFIG->wwwroot . 'pg/reportedcontent/');
- }
+
+ elgg_add_submenu_item(array(
+ 'text' => elgg_echo('reportedcontent'),
+ 'href' => "{$CONFIG->wwwroot}pg/reportedcontent",
+ 'parent_id' => 'overview',
+ ), 'admin', 'default');
}
/**
@@ -54,7 +49,6 @@ function reportedcontent_page_handler($page) {
// Initialise Reported Content
register_elgg_event_handler('init','system','reportedcontent_init');
-register_elgg_event_handler('pagesetup','system','reportedcontent_pagesetup');
//register action
register_action('reportedcontent/add',false,$CONFIG->pluginspath . "reportedcontent/actions/add.php");