aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photo.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-11-08 10:25:11 +0100
committerMario <mario@mariovavti.com>2018-11-08 10:25:11 +0100
commit61deb4fcfdbb84411a568de6ffa41d1a3040fb4a (patch)
tree021648b26bace4d93e064513c28b5b61f55e6264 /Zotlabs/Module/Photo.php
parent7c4c60425b176e80252bd9491ac0642532653e86 (diff)
parent3f6cd5a6634481024853f7823043e6b6ea1e4784 (diff)
downloadvolse-hubzilla-61deb4fcfdbb84411a568de6ffa41d1a3040fb4a.tar.gz
volse-hubzilla-61deb4fcfdbb84411a568de6ffa41d1a3040fb4a.tar.bz2
volse-hubzilla-61deb4fcfdbb84411a568de6ffa41d1a3040fb4a.zip
Merge branch 'patch-1' into 'dev'
Disable image caching if personal or group permissions enabled See merge request hubzilla/core!1377
Diffstat (limited to 'Zotlabs/Module/Photo.php')
-rw-r--r--Zotlabs/Module/Photo.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index d3d82f035..09c698b1a 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -128,9 +128,7 @@ class Photo extends \Zotlabs\Web\Controller {
$photo = substr($photo,0,-2);
// If viewing on a high-res screen, attempt to serve a higher resolution image:
if ($resolution == 2 && ($cookie_value > 1))
- {
$resolution = 1;
- }
}
$r = q("SELECT uid, photo_usage FROM photo WHERE resource_id = '%s' AND imgscale = %d LIMIT 1",
@@ -171,6 +169,8 @@ class Photo extends \Zotlabs\Web\Controller {
$modified = strtotime($e[0]['edited']);
if(intval($e[0]['os_storage']))
$streaming = $data;
+ if($e[0]['allow_cid'] != '' || $e[0]['allow_gid'] != '' || $e[0]['deny_gid'] != '' || $e[0]['deny_gid'] != '')
+ $prvcachecontrol = true;
}
else {
if(! $allowed) {
@@ -188,13 +188,13 @@ class Photo extends \Zotlabs\Web\Controller {
header_remove('Pragma');
- if($ismodified === gmdate("D, d M Y H:i:s", $modified) . " GMT") {
+ if($ismodified === gmdate("D, d M Y H:i:s", $modified) . " GMT") {
header_remove('Expires');
header_remove('Cache-Control');
header_remove('Set-Cookie');
- http_status_exit(304,'not modified');
- }
-
+ http_status_exit(304,'not modified');
+ }
+
if(! isset($data)) {
if(isset($resolution)) {
switch($resolution) {