diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2010-06-05 23:35:32 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2010-06-05 23:35:32 -0700 |
| commit | 87fde3f360d557d48241d09cae4f25949e748d4f (patch) | |
| tree | f832951bc829847a5d5298ce05792c4a0b3e91ff /modules/comment/helpers/comment.php | |
| parent | 10895ca5298dc71410cfd87fe8a28c4f976c2234 (diff) | |
Create a UI under Admin > Settings > Comments where you can limit
comments only to registered users. It's simplistic, but is better
than adding a permission since generally this setting will be used
Gallery-wide.
Fixes ticket #1002
Diffstat (limited to 'modules/comment/helpers/comment.php')
| -rw-r--r-- | modules/comment/helpers/comment.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 94b14d0d..92a286c7 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -60,5 +60,10 @@ class comment_Core { } return $form; } + + static function can_comment() { + return !identity::active_user()->guest || + module::get_var("comment", "access_permissions") == "everybody"; + } } |
