aboutsummaryrefslogtreecommitdiff
path: root/mod/logbrowser/start.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-05 16:44:56 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-05 16:44:56 +0000
commit3050d4aba881ffb2d6904b2e8e7054c2566d2de2 (patch)
tree939d11fc5966fb50b6d3d5b35906a0827f264f2d /mod/logbrowser/start.php
parent4b1f528ff37cf8ae43685b4d3cb2759ae1645770 (diff)
downloadelgg-3050d4aba881ffb2d6904b2e8e7054c2566d2de2.tar.gz
elgg-3050d4aba881ffb2d6904b2e8e7054c2566d2de2.tar.bz2
The log browser is now a part of the admin panel.
git-svn-id: https://code.elgg.org/elgg/trunk@1716 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/logbrowser/start.php')
-rw-r--r--mod/logbrowser/start.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/mod/logbrowser/start.php b/mod/logbrowser/start.php
index c1b4ff73f..f7b9c97c1 100644
--- a/mod/logbrowser/start.php
+++ b/mod/logbrowser/start.php
@@ -17,16 +17,20 @@
{
global $CONFIG;
- if (isadminloggedin())
- {
- add_menu(elgg_echo('logbrowser'), $CONFIG->wwwroot . "pg/logbrowser/",array(
- menu_item(elgg_echo('logbrowser:browse'), $CONFIG->wwwroot."pg/logbrowser/"),
- ),'logbrowser');
-
- }
-
// Register a page handler, so we can have nice URLs
register_page_handler('logbrowser','logbrowser_page_handler');
+ }
+
+ /**
+ * Adding the log browser to the admin menu
+ *
+ */
+ function logbrowser_pagesetup()
+ {
+ if (get_context() == 'admin' && isadminloggedin()) {
+ global $CONFIG;
+ add_submenu_item(elgg_echo('logbrowser:browser'), $CONFIG->wwwroot . 'pg/logbrowser/');
+ }
}
/**
@@ -44,6 +48,7 @@
- // Initialise log
- register_elgg_event_handler('init','system','logbrowser_init');
+ // Initialise log browser
+ register_elgg_event_handler('init','system','logbrowser_init');
+ register_elgg_event_handler('pagesetup','system','logbrowser_pagesetup');
?> \ No newline at end of file