summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/controllers/admin_comments.php4
-rw-r--r--modules/comment/helpers/comment_installer.php14
-rw-r--r--modules/comment/helpers/comment_rss.php2
-rw-r--r--modules/comment/module.info2
4 files changed, 16 insertions, 6 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_comments.php
index bcd6a939..00a7a608 100644
--- a/modules/comment/controllers/admin_comments.php
+++ b/modules/comment/controllers/admin_comments.php
@@ -32,8 +32,8 @@ class Admin_Comments_Controller extends Admin_Controller {
$form->validate();
module::set_var("comment", "access_permissions",
$form->comment_settings->access_permissions->value);
- module::set_var("comment", "rss_available",
- $form->comment_settings->rss_available->value);
+ module::set_var("comment", "rss_visible",
+ $form->comment_settings->rss_visible->value);
message::success(t("Comment settings updated"));
url::redirect("admin/comments");
}
diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php
index a64064f6..cbb8c783 100644
--- a/modules/comment/helpers/comment_installer.php
+++ b/modules/comment/helpers/comment_installer.php
@@ -48,8 +48,8 @@ class comment_installer {
module::set_var("comment", "spam_caught", 0);
module::set_var("comment", "access_permissions", "everybody");
- module::set_var("comment", "rss_available", "both");
- module::set_version("comment", 5);
+ module::set_var("comment", "rss_visible", "both");
+ module::set_version("comment", 6);
}
static function upgrade($version) {
@@ -81,6 +81,16 @@ class comment_installer {
module::set_var("comment", "rss_visible", "all");
module::set_version("comment", $version = 5);
}
+
+ // In version 5 we accidentally set the installer variable to rss_available when it should
+ // have been rss_visible. Migrate it over now, if necessary.
+ if ($version == 5) {
+ if (!module::get_var("comment", "rss_visible")) {
+ module::set_var("comment", "rss_visible", module::get_var("comment", "rss_available"));
+ }
+ module::clear_var("comment", "rss_available");
+ module::set_version("comment", $version = 6);
+ }
}
static function uninstall() {
diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php
index cfee4727..be1968dc 100644
--- a/modules/comment/helpers/comment_rss.php
+++ b/modules/comment/helpers/comment_rss.php
@@ -65,7 +65,7 @@ class comment_rss_Core {
foreach ($comments->find_all($limit, $offset) as $comment) {
$item = $comment->item();
$feed->comments[] = new ArrayObject(
- array("pub_date" => date("D, d M Y H:i:s T", $comment->created),
+ array("pub_date" => date("D, d M Y H:i:s O", $comment->created),
"text" => nl2br(html::purify($comment->text)),
"thumb_url" => $item->thumb_url(),
"thumb_height" => $item->thumb_height,
diff --git a/modules/comment/module.info b/modules/comment/module.info
index ecbf8885..bd4abe9f 100644
--- a/modules/comment/module.info
+++ b/modules/comment/module.info
@@ -1,6 +1,6 @@
name = "Comments"
description = "Allows users and guests to leave comments on photos and albums."
-version = 5
+version = 6
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
info_url = "http://codex.gallery2.org/Gallery3:Modules:comment"