summaryrefslogtreecommitdiff
path: root/modules/forum/forum.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-02-15 20:09:46 +0000
committerDries Buytaert <dries@buytaert.net>2004-02-15 20:09:46 +0000
commit4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b (patch)
treecf369f7370c1be045e3d48e7a9beb26d1d0f3714 /modules/forum/forum.module
parentae5136e51b87b414c737f4726c367c18db79fc49 (diff)
downloadbrdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.gz
brdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.bz2
- Patch by Steven: removed redundant permission checks. These are no longer
required thanks to the new 404 handling.
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r--modules/forum/forum.module45
1 files changed, 20 insertions, 25 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index e462fe6b0..cbc3034a3 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -404,40 +404,35 @@ function forum_page() {
$op = $_POST['op'];
- if (user_access('access content')) {
- if (module_exist('taxonomy')) {
- $tid = arg(1);
-
- if (arg(2) == 'new') {
- if ($nid = _forum_new($tid)) {
- drupal_goto("node/view/$nid");
- }
- }
+ if (module_exist('taxonomy')) {
+ $tid = arg(1);
- if (empty($sortby)) {
- $sortby = isset($user->sortby) ? $user->sortby : variable_get('forum_order', 1);
+ if (arg(2) == 'new') {
+ if ($nid = _forum_new($tid)) {
+ drupal_goto("node/view/$nid");
}
+ }
- if (empty($forum_per_page)) {
- $forum_per_page = isset($user->forum_per_page) ? $user->forum_per_page : variable_get('forum_per_page', 25);
- }
+ if (empty($sortby)) {
+ $sortby = isset($user->sortby) ? $user->sortby : variable_get('forum_order', 1);
+ }
- $offset = ($from / $forum_per_page) + 1;
+ if (empty($forum_per_page)) {
+ $forum_per_page = isset($user->forum_per_page) ? $user->forum_per_page : variable_get('forum_per_page', 25);
+ }
- $forums = forum_get_forums($tid);
- $parents = taxonomy_get_parents_all($tid);
- if ($tid && !in_array($tid, variable_get('forum_containers', array()))) {
- $topics = forum_get_topics($tid, $sortby, $forum_per_page);
- }
+ $offset = ($from / $forum_per_page) + 1;
- print theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset);
- }
- else {
- print theme('page', forum_help('admin/system/modules/forum'), t('Warning'));
+ $forums = forum_get_forums($tid);
+ $parents = taxonomy_get_parents_all($tid);
+ if ($tid && !in_array($tid, variable_get('forum_containers', array()))) {
+ $topics = forum_get_topics($tid, $sortby, $forum_per_page);
}
+
+ print theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page, $offset);
}
else {
- print theme('page', message_access());
+ print theme('page', forum_help('admin/system/modules/forum'), t('Warning'));
}
}