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/box.module | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'modules/box.module') diff --git a/modules/box.module b/modules/box.module index c8e4330e2..8bac56138 100644 --- a/modules/box.module +++ b/modules/box.module @@ -30,7 +30,15 @@ function box_help() { } function box_perm() { - return array("add and edit boxes"); + return array("administer boxes"); +} + +function box_link($type) { + if ($type == "admin" && user_access("administer boxes")) { + $links[] = "boxes"; + } + + return $links ? $links : array(); } function box_block() { @@ -142,9 +150,9 @@ function box_admin_save($id, $subject, $content, $info, $link, $type) { } function box_admin() { - global $user, $op, $id, $subject, $content, $info, $link, $type; + global $op, $id, $subject, $content, $info, $link, $type; - if (user_access($user, "add and edit boxes")) { + if (user_access("administer boxes")) { print "add new box | overview | help
\n"; -- cgit v1.2.3