Merge branch 'dev' into dark-fix-dev
This commit is contained in:
commit
d80b8ff30f
@ -159,13 +159,14 @@ class Photo extends \Zotlabs\Web\Controller {
|
|||||||
// Validate cache
|
// Validate cache
|
||||||
$cache = array(
|
$cache = array(
|
||||||
'resid' => $photo,
|
'resid' => $photo,
|
||||||
'uid' => $r[0]['uid'],
|
'url' => htmlspecialchars_decode($r[0]['display_path'])
|
||||||
'status' => false
|
|
||||||
);
|
);
|
||||||
if($cache_mode['on'])
|
if($cache_mode['on'])
|
||||||
call_hooks('cache_url_hook', $cache);
|
call_hooks('cache_url_hook', $cache);
|
||||||
if(! $cache['status']) {
|
if($cache['url'] != '') {
|
||||||
header("Location: " . htmlspecialchars_decode($r[0]['display_path']));
|
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();
|
killme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -441,13 +441,18 @@ class Setup extends \Zotlabs\Web\Controller {
|
|||||||
require_once 'include/environment.php';
|
require_once 'include/environment.php';
|
||||||
|
|
||||||
$help = '';
|
$help = '';
|
||||||
|
$mem_warning = '';
|
||||||
|
|
||||||
$result = getPhpiniUploadLimits();
|
$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.'),
|
$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['post_max_size']),
|
||||||
userReadableSize($result['max_upload_filesize']),
|
userReadableSize($result['max_upload_filesize']),
|
||||||
$result['max_file_uploads']
|
$result['max_file_uploads']
|
||||||
);
|
);
|
||||||
|
$help .= $mem_warning;
|
||||||
$help .= '<br><br>' . t('You can adjust these settings in the server php.ini file.');
|
$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);
|
$this->check_add($checks, t('PHP upload limits'), true, false, $help);
|
||||||
|
@ -12,10 +12,16 @@ class Sslify extends \Zotlabs\Web\Controller {
|
|||||||
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
|
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
|
||||||
$hdrs[strtolower($k)] = $v;
|
$hdrs[strtolower($k)] = $v;
|
||||||
}
|
}
|
||||||
if (array_key_exists('content-type', $hdrs)) {
|
|
||||||
$type = $hdrs['content-type'];
|
if (array_key_exists('content-type', $hdrs))
|
||||||
header('Content-Type: ' . $type);
|
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'];
|
echo $x['body'];
|
||||||
killme();
|
killme();
|
||||||
|
@ -120,6 +120,14 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
|
|||||||
@curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']);
|
@curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('http_version',$opts)) {
|
||||||
|
@curl_setopt($ch,CURLOPT_HTTP_VERSION,$opts['http_version']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
@curl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(x($opts,'cookiejar'))
|
if(x($opts,'cookiejar'))
|
||||||
@curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']);
|
@curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']);
|
||||||
if(x($opts,'cookiefile'))
|
if(x($opts,'cookiefile'))
|
||||||
@ -290,6 +298,13 @@ function z_post_url($url, $params, $redirects = 0, $opts = array()) {
|
|||||||
@curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']);
|
@curl_setopt($ch, CURLOPT_USERPWD, $opts['http_auth']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('http_version',$opts)) {
|
||||||
|
@curl_setopt($ch,CURLOPT_HTTP_VERSION,$opts['http_version']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
@curl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
|
||||||
|
}
|
||||||
|
|
||||||
if(x($opts,'cookiejar'))
|
if(x($opts,'cookiejar'))
|
||||||
@curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']);
|
@curl_setopt($ch, CURLOPT_COOKIEJAR, $opts['cookiejar']);
|
||||||
if(x($opts,'cookiefile'))
|
if(x($opts,'cookiefile'))
|
||||||
|
Reference in New Issue
Block a user