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/meta.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/meta.module')
-rw-r--r-- | modules/meta.module | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/meta.module b/modules/meta.module index 092bf1d4c..207123b80 100644 --- a/modules/meta.module +++ b/modules/meta.module @@ -6,10 +6,19 @@ function meta_help() { <?php } -function meta_conf() { - return array("add and edit meta tags"); +function meta_perm() { + return array("administer meta tags"); } +function meta_link($type) { + if ($type == "admin" && user_access("administer meta tags")) { + $links[] = "<a href=\"admin.php?mod=meta\">meta tags</a>"; + } + + return $links ? $links : array(); +} + + function meta_form($type, $edit = array()) { $c = db_query("SELECT * FROM collection WHERE types LIKE '%". check_input($type) ."%'"); while ($collection = db_fetch_object($c)) { @@ -129,9 +138,9 @@ function meta_overview() { } function meta_admin() { - global $user, $edit, $type, $op, $id; + global $edit, $type, $op, $id; - if (user_access($user, "add and edit meta tags")) { + if (user_access("administer meta tags")) { print "<SMALL><A HREF=\"admin.php?mod=meta&type=collection&op=add\">add new collection</A> | <A HREF=\"admin.php?mod=meta&type=tag&op=add\">add new meta-tag</A> | <A HREF=\"admin.php?mod=meta&op=preview\">preview node forms</A> | <A HREF=\"admin.php?mod=meta\">overview</A> | <A HREF=\"admin.php?mod=meta&op=help\">help</A></SMALL><HR>\n"; |