summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/controllers/combined.php4
-rw-r--r--modules/gallery/helpers/item.php3
2 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/controllers/combined.php b/modules/gallery/controllers/combined.php
index ef640bd9..5c192b60 100644
--- a/modules/gallery/controllers/combined.php
+++ b/modules/gallery/controllers/combined.php
@@ -67,6 +67,7 @@ class Combined_Controller extends Controller {
if ($use_gzip && $content = $cache->get("{$key}_gz")) {
header("Content-Encoding: gzip");
+ header("Vary: Accept-Encoding");
} else {
// Fall back to non-gzipped if we have to
$content = $cache->get($key);
@@ -83,8 +84,9 @@ class Combined_Controller extends Controller {
}
header("Expires: Tue, 19 Jan 2038 00:00:00 GMT");
header("Cache-Control: max-age=2678400");
- header('Pragma: public');
+ header("Pragma: public");
header("Last-Modified: " . gmdate("D, d M Y H:i:s T", time()));
+ header("Content-Length: " . strlen($content));
Kohana::close_buffers(false);
print $content;
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php
index 0bb45e49..a0654a88 100644
--- a/modules/gallery/helpers/item.php
+++ b/modules/gallery/helpers/item.php
@@ -418,6 +418,9 @@ class item_Core {
$args = Cache::instance()->get("display_context_" . $sid = Session::instance()->id());
$callback = $args[0];
$args[0] = $item;
+ if (!$callback) {
+ $callback = "Albums_Controller::get_display_context";
+ }
return call_user_func_array($callback, $args);
}
} \ No newline at end of file