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/moderate.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/moderate.module')
-rw-r--r-- | modules/moderate.module | 12 |
1 files changed, 10 insertions, 2 deletions
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[] = "<a href=\"admin.php?mod=moderate\">moderate content</a>"; + } + + 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": |