diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-05-15 18:38:57 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-05-15 18:38:57 +0000 |
commit | 14ddbc473c3ccfc03773bd684cd41255cc951507 (patch) | |
tree | 3310c06c4323dfc5690d6e78236158b7bac2f428 /modules/forum.module | |
parent | 1da587a9d9df433952981da62dda4f2b216799c7 (diff) | |
download | brdo-14ddbc473c3ccfc03773bd684cd41255cc951507.tar.gz brdo-14ddbc473c3ccfc03773bd684cd41255cc951507.tar.bz2 |
- Created 2 new functions:
+ path_uri(): returns the fully-qualified URI of your drupal site.
+ path_img(): returns the image directory or http://image-server.com/
in case you prefer to load-balance bandwidth usage.
Replaced all occurences of the variable "site_url" with path_uri()
and removed "site_url" from "setting.module".
- Drastically simplified the node_save() API, which should make the
node-forms more secure. Updated "story.module", "book.module",
"forum.module", "page.module" and "node.module" to reflect this
change. This is needs more testing so hit it, beat it, tease it.
- Fixed an occasional glitch in the configuration file loading logic.
- Made "queue.module" display an informative notice when an anonymous
user tries accessing the moderation queue.
- Updated the hard-coded information in drupal.module a bit.
Diffstat (limited to 'modules/forum.module')
-rw-r--r-- | modules/forum.module | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/forum.module b/modules/forum.module index 5a14831c1..8e3693f5f 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -23,8 +23,11 @@ function forum_form($edit = array()) { } function forum_save($edit) { - global $status; - node_save(array_merge($edit, array(type => "forum", status => $status[posted]))); + global $user, $status; + + if (user_access($user)) { + node_save($edit, array(author => $user->id, body, cid, comment => category_comment($edit[cid]), moderate => topic_moderate($edit[tid]), promote => category_promote($edit[cid]), score => 0, status => $status[posted], tid, timestamp => time(), title, type => "forum", votes => 0)); + } } function forum_num_comments($nid) { |