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/cvs.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/cvs.module')
-rw-r--r-- | modules/cvs.module | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/cvs.module b/modules/cvs.module index cc81a12e6..bc1206898 100644 --- a/modules/cvs.module +++ b/modules/cvs.module @@ -1,7 +1,15 @@ <?php function cvs_perm() { - return array("view CVS messages"); + return array("access cvs messages"); +} + +function cvs_link($type) { + if ($type == "page" && user_access("access cvs messages")) { + $links[] = "<a href=\"module.php?mod=cvs\">cvs messages</a>"; + } + + return $links ? $links : array(); } function cvs_cron() { @@ -14,7 +22,7 @@ function cvs_cron() { } $result = db_query("UPDATE cvs SET status = '1'"); - if ($body) mail(variable_get(cvs_mail, "root@localhost"), "CVS log messages", $body, "From: no-reply"); + if ($body) mail(variable_get(cvs_mail, "root@localhost"), "cvs log messages", $body, "From: no-reply"); } } @@ -26,9 +34,9 @@ function cvs_conf_options() { } function cvs_page() { - global $user, $theme; + global $theme; - if (user_access($user, "view CVS messages")) { + if (user_access("access cvs messages")) { $result = db_query("SELECT * FROM cvs ORDER BY timestamp DESC LIMIT 50"); while ($cvs = db_fetch_object($result)) { |