summaryrefslogtreecommitdiff
path: root/modules/comment/helpers/comment_installer.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-05 23:35:32 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-05 23:35:32 -0700
commit87fde3f360d557d48241d09cae4f25949e748d4f (patch)
treef832951bc829847a5d5298ce05792c4a0b3e91ff /modules/comment/helpers/comment_installer.php
parent10895ca5298dc71410cfd87fe8a28c4f976c2234 (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_installer.php')
-rw-r--r--modules/comment/helpers/comment_installer.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php
index 9ca47f1a..7a32bf67 100644
--- a/modules/comment/helpers/comment_installer.php
+++ b/modules/comment/helpers/comment_installer.php
@@ -47,7 +47,8 @@ class comment_installer {
DEFAULT CHARSET=utf8;");
module::set_var("comment", "spam_caught", 0);
- module::set_version("comment", 2);
+ module::set_var("comment", "access_permissions", "everybody");
+ module::set_version("comment", 3);
}
static function upgrade($version) {
@@ -56,6 +57,11 @@ class comment_installer {
$db->query("ALTER TABLE {comments} CHANGE `state` `state` varchar(15) default 'unpublished'");
module::set_version("comment", 2);
}
+
+ if ($version == 2) {
+ module::set_var("comment", "access_permissions", "everybody");
+ module::set_version("comment", 3);
+ }
}
static function uninstall() {