diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-11-20 21:51:23 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-11-20 21:51:23 +0000 |
commit | 4bdac4333ba34adc61e19180b5f1bcde692615e2 (patch) | |
tree | ed30f0417f99d0257bef231f6652d1399d0e520a /modules/statistics/statistics.module | |
parent | 9000f825cc63e6b52ad4f19f633d67aa16fef799 (diff) | |
download | brdo-4bdac4333ba34adc61e19180b5f1bcde692615e2.tar.gz brdo-4bdac4333ba34adc61e19180b5f1bcde692615e2.tar.bz2 |
- Patch by JonBob:
Phase 2 of the menu system integration project. This unifies the interface
used by admin and non-admin pages, and deprecates the _page hook in favor of
explicit callbacks from menu(). Breadcrumbs, titles, and help text go away
as a result of this patch; they will return in the phase 3 patch, printed
by the theme.
Diffstat (limited to 'modules/statistics/statistics.module')
-rw-r--r-- | modules/statistics/statistics.module | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index bbeb72cf6..08732b32f 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -115,12 +115,16 @@ function statistics_link($type, $node = 0, $main = 0) { menu("admin/statistics/log/user", t("track user"), "statistics_admin", 0, 1); //hidden menu("admin/statistics/log/host", t("track host"), "statistics_admin", 0, 1); //hidden menu("admin/statistics/top nodes page", t("configure 'top nodes' page"), "statistics_admin", 5); - menu("admin/statistics/help", t("help"), "statistics_help", 9); + menu("admin/statistics/help", t("help"), "statistics_help_page", 9); // block configuration: menu("admin/system/block/top nodes block", t("configure 'top nodes' block"), "statistics_admin", 5); menu("admin/system/block/whos online block", t("configure 'who is online' block"), "statistics_admin", 5); } + + if (user_access("access content")) { + menu("statistics", t("view top nodes"), statistics_page, 0, 1); + } } return $links; @@ -240,6 +244,12 @@ function statistics_help($section = "admin/help#statistics") { return $output; } +function statistics_help_page() { + print theme("header"); + print statistics_help(); + print theme("footer"); +} + /* Administration hook, defines module's administrative page */ function statistics_admin() { @@ -315,7 +325,14 @@ function statistics_admin() { $output .= statistics_admin_topnodes(); } } - return $output; + print theme("header"); + print $output; + print theme("footer"); + } + else { + print theme("header"); + print message_access(); + print theme("footer"); } } |