diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-06-29 22:08:57 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-06-29 22:08:57 +0000 |
commit | 9c43e8fc7a192dfe768c76a539373915bddaa0aa (patch) | |
tree | 32dfe7f04171c2600be4164ca529d7f42766ec32 /modules/forum/forum.module | |
parent | 124694ee4dbcc1df5dfc2d419ed2393619883071 (diff) | |
download | brdo-9c43e8fc7a192dfe768c76a539373915bddaa0aa.tar.gz brdo-9c43e8fc7a192dfe768c76a539373915bddaa0aa.tar.bz2 |
Extremely large commit:
- Fixed tiny quote problem in account.php.
- Fixed tiny bug in comment.inc.
- Fixed tiny bug in comment.module.
- Fixed tiny bug in meta.module.
- Simplified user_access() API.
- Rewrote link system: still needs fine-tuning and testing so don't
upgrade if you are running a production site. ;)
Updated all modules and themes to reflect this change. All other
themes and modules need updating too!
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r-- | modules/forum/forum.module | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index cdbe9ce4f..ecf0f52bd 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -4,6 +4,15 @@ function forum_status() { return array(dumped, posted); } + +function forum_link($type) { + if ($type == "page" && user_access("access content")) { + $links[] = "<a href=\"module.php?mod=forum\">". t("forum") ."</a>"; + } + + return $links ? $links : array(); +} + function forum_view($node) { global $theme; $output .= "<P><A HREF=\"module.php?mod=forum\">". t("Forum") ."</A> / <B><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></B>:</P><P>". check_output($node->body) ."</P>"; @@ -38,9 +47,9 @@ function forum_last_comment($nid) { } function forum_page() { - global $user, $theme; + global $theme; - if (user_access($user, "view content")) { + if (user_access("access content")) { $result = db_query("SELECT nid FROM node WHERE type = 'forum' ORDER BY title"); $output .= "<TABLE BORDER=\"0\" CELLSPACING=\"4\" CELLPADDING=\"4\">\n"; |