summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.build_number2
-rw-r--r--installer/install.sql4
-rw-r--r--modules/comment/helpers/comment_installer.php13
-rw-r--r--modules/comment/helpers/comment_rss.php2
-rw-r--r--modules/comment/module.info2
-rw-r--r--modules/gallery/controllers/combined.php4
-rw-r--r--modules/gallery/css/gallery.css1
-rw-r--r--modules/gallery/helpers/locales.php1
-rw-r--r--modules/gallery/views/form_uploadify.html.php4
-rw-r--r--modules/recaptcha/helpers/recaptcha.php2
-rw-r--r--modules/tag/helpers/item_tags_rest.php7
-rw-r--r--modules/tag/helpers/tag.php23
-rw-r--r--modules/tag/helpers/tag_items_rest.php6
-rw-r--r--system/helpers/expires.php4
14 files changed, 54 insertions, 21 deletions
diff --git a/.build_number b/.build_number
index 391e9cf8..83ac23ec 100644
--- a/.build_number
+++ b/.build_number
@@ -3,4 +3,4 @@
; process. You don't need to edit it. In fact..
;
; DO NOT EDIT THIS FILE BY HAND!
-build_number=250
+build_number=255
diff --git a/installer/install.sql b/installer/install.sql
index 2353a75a..aee0900c 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -246,7 +246,7 @@ CREATE TABLE {modules} (
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO {modules} VALUES (1,1,'gallery',50,1);
INSERT INTO {modules} VALUES (2,1,'user',4,2);
-INSERT INTO {modules} VALUES (3,1,'comment',6,3);
+INSERT INTO {modules} VALUES (3,1,'comment',7,3);
INSERT INTO {modules} VALUES (4,1,'organize',4,4);
INSERT INTO {modules} VALUES (5,1,'info',2,5);
INSERT INTO {modules} VALUES (6,1,'rss',1,6);
@@ -419,7 +419,7 @@ INSERT INTO {vars} VALUES (NULL,'gallery','identity_provider','user');
INSERT INTO {vars} VALUES (NULL,'user','minimum_password_length','5');
INSERT INTO {vars} VALUES (NULL,'comment','spam_caught','0');
INSERT INTO {vars} VALUES (NULL,'comment','access_permissions','everybody');
-INSERT INTO {vars} VALUES (NULL,'comment','rss_visible','both');
+INSERT INTO {vars} VALUES (NULL,'comment','rss_visible','all');
INSERT INTO {vars} VALUES (NULL,'info','show_title','1');
INSERT INTO {vars} VALUES (NULL,'info','show_description','1');
INSERT INTO {vars} VALUES (NULL,'info','show_owner','1');
diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php
index cbb8c783..f7bebe69 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_visible", "both");
- module::set_version("comment", 6);
+ module::set_var("comment", "rss_visible", "all");
+ module::set_version("comment", 7);
}
static function upgrade($version) {
@@ -91,6 +91,15 @@ class comment_installer {
module::clear_var("comment", "rss_available");
module::set_version("comment", $version = 6);
}
+
+ // In version 6 we accidentally left the install value of "rss_visible" to "both" when it
+ // should have been "all"
+ if ($version == 6) {
+ if (module::get_var("comment", "rss_visible") == "both") {
+ module::set_var("comment", "rss_visible", "all");
+ }
+ module::set_version("comment", $version = 7);
+ }
}
static function uninstall() {
diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php
index be1968dc..1a7ed53c 100644
--- a/modules/comment/helpers/comment_rss.php
+++ b/modules/comment/helpers/comment_rss.php
@@ -36,7 +36,7 @@ class comment_rss_Core {
}
if ($item && comment_rss::feed_visible("per_item")) {
- $feeds["comment/item/$item->id"] =
+ $feeds["comment/per_item/$item->id"] =
t("Comments on %title", array("title" => html::purify($item->title)));
}
return $feeds;
diff --git a/modules/comment/module.info b/modules/comment/module.info
index bd4abe9f..97e8a73b 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 = 6
+version = 7
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
info_url = "http://codex.gallery2.org/Gallery3:Modules:comment"
diff --git a/modules/gallery/controllers/combined.php b/modules/gallery/controllers/combined.php
index cd84cb42..80ae1e2d 100644
--- a/modules/gallery/controllers/combined.php
+++ b/modules/gallery/controllers/combined.php
@@ -50,7 +50,7 @@ class Combined_Controller extends Controller {
if ($input->server("HTTP_IF_MODIFIED_SINCE")) {
header('HTTP/1.0 304 Not Modified');
header("Expires: Tue, 19 Jan 2038 00:00:00 GMT");
- header("Cache-Control: max-age=2678400");
+ header("Cache-Control: public,max-age=2678400");
header('Pragma: public');
Kohana::close_buffers(false);
return "";
@@ -83,7 +83,7 @@ class Combined_Controller extends Controller {
header("Content-Type: text/css; charset=UTF-8");
}
header("Expires: Tue, 19 Jan 2038 00:00:00 GMT");
- header("Cache-Control: max-age=2678400");
+ header("Cache-Control: public,max-age=2678400");
header("Pragma: public");
header("Last-Modified: " . gmdate("D, d M Y H:i:s T", time()));
header("Content-Length: " . strlen($content));
diff --git a/modules/gallery/css/gallery.css b/modules/gallery/css/gallery.css
index ecf89565..9d773699 100644
--- a/modules/gallery/css/gallery.css
+++ b/modules/gallery/css/gallery.css
@@ -39,6 +39,7 @@
#g-add-photos-canvas object {
z-index: 100;
+ padding: 0em;
}
#g-add-photos-canvas .uploadifyQueue {
diff --git a/modules/gallery/helpers/locales.php b/modules/gallery/helpers/locales.php
index 0b1e16d3..f4837e01 100644
--- a/modules/gallery/helpers/locales.php
+++ b/modules/gallery/helpers/locales.php
@@ -110,6 +110,7 @@ class locales_Core {
$l["sl_SI"] = "Slovenščina"; // Slovenian
$l["sr_CS"] = "Srpski"; // Serbian
$l["sv_SE"] = "Svenska"; // Swedish
+ $l["th_TH"] = "ภาษาไทย"; // Thai
$l["tn_ZA"] = "Setswana"; // Setswana
$l["tr_TR"] = "Türkçe"; // Turkish
$l["uk_UA"] = "українська"; // Ukrainian
diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php
index 22332e82..c1f985c3 100644
--- a/modules/gallery/views/form_uploadify.html.php
+++ b/modules/gallery/views/form_uploadify.html.php
@@ -23,8 +23,8 @@
if (swfobject.hasFlashPlayerVersion("<?= $flash_minimum_version ?>")) {
$("#g-uploadify").uploadify({
- width: 150,
- height: 33,
+ width: 298,
+ height: 32,
uploader: "<?= url::file("lib/uploadify/uploadify.swf") ?>",
script: "<?= url::site("uploader/add_photo/{$album->id}") ?>",
scriptData: <?= json_encode($script_data) ?>,
diff --git a/modules/recaptcha/helpers/recaptcha.php b/modules/recaptcha/helpers/recaptcha.php
index 9c954049..57f8cf36 100644
--- a/modules/recaptcha/helpers/recaptcha.php
+++ b/modules/recaptcha/helpers/recaptcha.php
@@ -37,7 +37,7 @@ class recaptcha_Core {
$group->submit("")->value(t("Save"));
$site_domain = urlencode(stripslashes($_SERVER["HTTP_HOST"]));
- $form->get_key_url = "http://recaptcha.net/api/getkey?domain=$site_domain&app=Gallery3";
+ $form->get_key_url = "http://www.google.com/recaptcha/admin/create?domains=$site_domain&app=Gallery3";
return $form;
}
diff --git a/modules/tag/helpers/item_tags_rest.php b/modules/tag/helpers/item_tags_rest.php
index 31f9050c..98666338 100644
--- a/modules/tag/helpers/item_tags_rest.php
+++ b/modules/tag/helpers/item_tags_rest.php
@@ -44,10 +44,11 @@ class item_tags_rest_Core {
}
static function delete($request) {
- list ($tag, $item) = rest::resolve($request->url);
+ $item = rest::resolve($request->url);
access::required("edit", $item);
- $tag->remove($item);
- $tag->save();
+
+ // Deleting this collection means removing all tags associated with the item.
+ tag::clear_all($item);
}
static function resolve($id) {
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index 70d9e545..0eccb3ed 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -90,6 +90,17 @@ class tag_Core {
->find_all();
}
+ /**
+ * Return all the items for a given tag.
+ * @return array
+ */
+ static function tag_items($tag) {
+ return ORM::factory("item")
+ ->join("items_tags", "items_tags.item_id", "items.id", "left")
+ ->where("items_tags.tag_id", "=", $tag->id)
+ ->find_all();
+ }
+
static function get_add_form($item) {
$form = new Forge("tags/create/{$item->id}", "", "post", array("id" => "g-add-tag-form", "class" => "g-short-form"));
$label = $item->is_album() ?
@@ -128,6 +139,18 @@ class tag_Core {
}
/**
+ * Remove all items from a tag
+ */
+ static function remove_items($tag) {
+ db::build()
+ ->delete("items_tags")
+ ->where("tag_id", "=", $tag->id)
+ ->execute();
+ $tag->count = 0;
+ $tag->save();
+ }
+
+ /**
* Get rid of any tags that have no associated items.
*/
static function compact() {
diff --git a/modules/tag/helpers/tag_items_rest.php b/modules/tag/helpers/tag_items_rest.php
index 106e3904..ec565cbb 100644
--- a/modules/tag/helpers/tag_items_rest.php
+++ b/modules/tag/helpers/tag_items_rest.php
@@ -50,10 +50,8 @@ class tag_items_rest_Core {
}
static function delete($request) {
- list ($tag, $item) = rest::resolve($request->url);
- access::required("edit", $item);
- $tag->remove($item);
- $tag->save();
+ $tag = rest::resolve($request->url);
+ $tag->remove_items();
}
static function resolve($id) {
diff --git a/system/helpers/expires.php b/system/helpers/expires.php
index d510ba7c..a3e01b8e 100644
--- a/system/helpers/expires.php
+++ b/system/helpers/expires.php
@@ -31,7 +31,7 @@ class expires_Core {
header('Expires: '.gmdate('D, d M Y H:i:s T', $expires));
// HTTP 1.1
- header('Cache-Control: max-age='.$seconds);
+ header('Cache-Control: public,max-age='.$seconds);
return $expires;
}
@@ -94,7 +94,7 @@ class expires_Core {
header('Expires: '.gmdate('D, d M Y H:i:s T', $expires));
// HTTP 1.1
- header('Cache-Control: max-age='.$seconds);
+ header('Cache-Control: public,max-age='.$seconds);
// Clear any output
Event::add('system.display', create_function('', 'Kohana::$output = "";'));