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/locale/locale.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/locale/locale.module')
-rw-r--r-- | modules/locale/locale.module | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 8450746f5..73d531c85 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -35,7 +35,15 @@ function locale_help() { } function locale_perm() { - return array("add and edit locales"); + return array("administer locales"); +} + +function locale_link($type) { + if ($type == "admin" && user_access("administer locales")) { + $links[] = "<a href=\"admin.php?mod=locale\">locales</a>"; + } + + return $links ? $links : array(); } function locale_conf_options() { @@ -97,9 +105,9 @@ function locale_overview() { } function locale_admin() { - global $user, $id, $edit, $op; + global $id, $edit, $op; - if (user_access($user, "add and edit locales")) { + if (user_access("administer locales")) { print "<SMALL><A HREF=\"admin.php?mod=locale\">overview</A> | <A HREF=\"admin.php?mod=locale&op=help\">help</A></SMALL><HR>\n"; switch ($op) { |