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/system/system.module | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'modules/system/system.module') diff --git a/modules/system/system.module b/modules/system/system.module index 6a2504d6a..b31a9dcad 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -13,7 +13,15 @@ function system_help() { } function system_perm() { - return array("edit configuration options"); + return array("administer site options"); +} + +function system_link($type) { + if ($type == "admin" && user_access("administer site options")) { + $links[] = "configuration options"; + } + + return $links ? $links : array(); } function system_view_options() { @@ -112,9 +120,9 @@ function system_modules() { } function system_admin() { - global $user, $edit, $op, $type; + global $edit, $op, $type; - if (user_access($user, "edit configuration options")) { + if (user_access("administer site options")) { print "site settings | content filters | modules | help
\n"; -- cgit v1.2.3