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/system.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/system.module')
-rw-r--r-- | modules/system.module | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/system.module b/modules/system.module index 6a2504d6a..b31a9dcad 100644 --- a/modules/system.module +++ b/modules/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[] = "<a href=\"admin.php?mod=system\">configuration options</a>"; + } + + 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 "<SMALL><A HREF=\"admin.php?mod=system&type=options\">site settings</A> | <A HREF=\"admin.php?mod=system&type=filter\">content filters</A> | <A HREF=\"admin.php?mod=system&op=modules\">modules</A> | <A HREF=\"admin.php?mod=system&op=help\">help</A></SMALL><HR>\n"; |