From 9c43e8fc7a192dfe768c76a539373915bddaa0aa Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 29 Jun 2001 22:08:57 +0000 Subject: 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! --- modules/moderate.module | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'modules/moderate.module') diff --git a/modules/moderate.module b/modules/moderate.module index a75402c3a..bbb3f9489 100644 --- a/modules/moderate.module +++ b/modules/moderate.module @@ -4,6 +4,14 @@ function moderate_perm() { return array("access moderation pages"); } +function moderate_link($type) { + if ($type == "admin") { + $links[] = "moderate content"; + } + + return $links ? $links : array(); +} + function moderate_comment_access($cid) { global $user; return db_fetch_object(db_query("SELECT n.moderate FROM comments c LEFT JOIN node n ON c.lid = n.nid WHERE c.cid = '". check_input($cid) ."' AND n.moderate LIKE '%$user->userid%'")); @@ -72,9 +80,9 @@ function moderate_comment_save($id, $edit) { } function moderate_admin() { - global $user, $op, $id, $edit, $type; + global $op, $id, $edit, $type; - if (user_access($user, "access moderation pages")) { + if (user_access("access moderation pages")) { switch ($type) { case "comment": -- cgit v1.2.3