summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-05-10 20:40:31 +0000
committerDries Buytaert <dries@buytaert.net>2001-05-10 20:40:31 +0000
commitdda4e903a4c7d9374e7f8d4c53df860b7346ea2b (patch)
treee22d674d0374da3d5cdfba49be877cd3195e400f
parentc1c3943934a4af40b744ea942e4cc3137295a5e6 (diff)
downloadbrdo-dda4e903a4c7d9374e7f8d4c53df860b7346ea2b.tar.gz
brdo-dda4e903a4c7d9374e7f8d4c53df860b7346ea2b.tar.bz2
CHANGES:
- Added moderator support to topics.
-rw-r--r--includes/node.inc2
-rw-r--r--includes/structure.inc6
2 files changed, 7 insertions, 1 deletions
diff --git a/includes/node.inc b/includes/node.inc
index d4064b0e7..7962087d6 100644
--- a/includes/node.inc
+++ b/includes/node.inc
@@ -90,7 +90,7 @@ function node_save($node) {
throttle("post node", variable_get(max_node_rate, 900));
// setup default values:
- $node = array_merge(array(title => "?", author => $user->id, type => "?", pid => 0, cid => 0, tid => 0, log => "node created", status => (category_submission($node[cid]) ? $status[queued] : $status[posted]) , score => 0, votes => 0, comment => category_comment($node[cid]), promote => category_promote($node[cid]), moderate => "", timestamp => time()), $node);
+ $node = array_merge(array(title => "?", author => $user->id, type => "?", pid => 0, cid => 0, tid => 0, log => "node created", status => (category_submission($node[cid]) ? $status[queued] : $status[posted]) , score => 0, votes => 0, comment => category_comment($node[cid]), promote => category_promote($node[cid]), moderate => topic_moderate($node[tid]), timestamp => time()), $node);
// prepare queries:
$f1 = array();
diff --git a/includes/structure.inc b/includes/structure.inc
index f0472b225..6d38bfbce 100644
--- a/includes/structure.inc
+++ b/includes/structure.inc
@@ -124,6 +124,12 @@ function topic_name($tid, $name = 0) {
return ($topic->pid) ? topic_name($topic->pid, $name) : $name;
}
+// return moderators for topic $tid:
+function topic_moderate($tid) {
+ $topic = topic_get_object("tid", $tid);
+ return $topic->moderate;
+}
+
// renders a HTML form to select one or more topics:
function topic_form_select($edit = array(), $size = 1) {
foreach (topic_tree() as $tid=>$name) {