aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorphani00 <phani00@gmail.com>2018-12-17 15:18:24 +0000
committerphani00 <phani00@gmail.com>2018-12-17 15:18:24 +0000
commitd80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8 (patch)
tree3cd13897a9db5aba8b56c570c0cf5771e6bb22b2 /Zotlabs/Module
parent70a766171117fd94c7e0ca228d3b879f7f307e5f (diff)
parentd190b1995b0886b430beb5dac1a1e72582b9ad2b (diff)
downloadvolse-hubzilla-d80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8.tar.gz
volse-hubzilla-d80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8.tar.bz2
volse-hubzilla-d80b8ff30fd1bbd6d02e685bdfac4c5bcded9fa8.zip
Merge branch 'dev' into dark-fix-dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Photo.php9
-rw-r--r--Zotlabs/Module/Setup.php5
-rw-r--r--Zotlabs/Module/Sslify.php14
3 files changed, 20 insertions, 8 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 7365a5f64..e236cc5f4 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -159,13 +159,14 @@ class Photo extends \Zotlabs\Web\Controller {
// Validate cache
$cache = array(
'resid' => $photo,
- 'uid' => $r[0]['uid'],
- 'status' => false
+ 'url' => htmlspecialchars_decode($r[0]['display_path'])
);
if($cache_mode['on'])
call_hooks('cache_url_hook', $cache);
- if(! $cache['status']) {
- header("Location: " . htmlspecialchars_decode($r[0]['display_path']));
+ if($cache['url'] != '') {
+ if(strpos(z_root(),'https:') !== false && strpos($cache['url'],'https:') === false)
+ $cache['url'] = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($cache['url']);
+ header("Location: " . $cache['url']);
killme();
}
}
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index c0716ca7c..370b7b9f8 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -441,13 +441,18 @@ class Setup extends \Zotlabs\Web\Controller {
require_once 'include/environment.php';
$help = '';
+ $mem_warning = '';
$result = getPhpiniUploadLimits();
+ if($result['post_max_size'] < 4194304 || $result['max_upload_filesize'] < 4194304) {
+ $mem_warning = '<strong>' .t('This is not sufficient to upload larger images or files. You should be able to upload at least 4 MB at once.') . '</strong>';
+ }
$help = sprintf(t('Your max allowed total upload size is set to %s. Maximum size of one file to upload is set to %s. You are allowed to upload up to %d files at once.'),
userReadableSize($result['post_max_size']),
userReadableSize($result['max_upload_filesize']),
$result['max_file_uploads']
);
+ $help .= $mem_warning;
$help .= '<br><br>' . t('You can adjust these settings in the server php.ini file.');
$this->check_add($checks, t('PHP upload limits'), true, false, $help);
diff --git a/Zotlabs/Module/Sslify.php b/Zotlabs/Module/Sslify.php
index 2891f3691..37be4423b 100644
--- a/Zotlabs/Module/Sslify.php
+++ b/Zotlabs/Module/Sslify.php
@@ -12,10 +12,16 @@ class Sslify extends \Zotlabs\Web\Controller {
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
$hdrs[strtolower($k)] = $v;
}
- if (array_key_exists('content-type', $hdrs)) {
- $type = $hdrs['content-type'];
- header('Content-Type: ' . $type);
- }
+
+ if (array_key_exists('content-type', $hdrs))
+ header('Content-Type: ' . $hdrs['content-type']);
+ if (array_key_exists('last-modified', $hdrs))
+ header('Last-Modified: ' . $hdrs['last-modified']);
+ if (array_key_exists('cache-control', $hdrs))
+ header('Cache-Control: ' . $hdrs['cache-control']);
+ if (array_key_exists('expires', $hdrs))
+ header('Expires: ' . $hdrs['expires']);
+
echo $x['body'];
killme();