diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-04-21 13:56:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-04-21 13:56:38 +0000 |
commit | 7231c88a326f92bdc2b1579ac6afb8f7f568170b (patch) | |
tree | b7586493410910be188d97440dbdf1d44b084b91 /modules/forum.module | |
parent | 7976678719f6e04ecda315a6088ee0eb3cfb0318 (diff) | |
download | brdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.gz brdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.bz2 |
- Added support for 403 handling. Patch by JonBob. As a side benefit,
administrators will be able to define a custom 403 page, just as they
can define 404 pages now.
This needs to be documented in the "Changes since / migrating to ..."
pages.
Diffstat (limited to 'modules/forum.module')
-rw-r--r-- | modules/forum.module | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/forum.module b/modules/forum.module index 3cf75c707..09dc707f6 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -119,6 +119,9 @@ function forum_block($op = 'list', $delta = 0) { return $blocks; } +/** + * Implementation of hook_link(). + */ function forum_link($type, $node = 0, $main = 0) { global $user; @@ -129,12 +132,8 @@ function forum_link($type, $node = 0, $main = 0) { } if ($type == 'system') { - if (user_access('create forum topics')) { - menu('node/add/forum', t('forum topic'), 'node_page'); - } - if (user_access('access content')) { - menu('forum', t('forums'), 'forum_page', 0, MENU_HIDE); - } + menu('node/add/forum', t('forum topic'), user_access('create forum topics') ? 'node_page' : MENU_DENIED); + menu('forum', t('forums'), user_access('access content') ? 'forum_page' : MENU_DENIED, 0, MENU_HIDE); } if (!$main && $type == 'node' && $node->type == 'forum') { |