aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-12-17 18:45:42 -0800
committerzotlabs <mike@macgirvin.com>2018-12-17 18:45:42 -0800
commit15ce8bc79b219e10f709796c09c739649a8df53b (patch)
treeedd456a39ad0daf12d6cc4409a99477f4fb38d82 /Zotlabs
parent8d70b919551f6f6462e639f7cfffda9825344e43 (diff)
parentd190b1995b0886b430beb5dac1a1e72582b9ad2b (diff)
downloadvolse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.tar.gz
volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.tar.bz2
volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Identity/OAuth2Storage.php2
-rw-r--r--Zotlabs/Module/Articles.php12
-rw-r--r--Zotlabs/Module/Network.php7
-rw-r--r--Zotlabs/Module/Photo.php11
-rw-r--r--Zotlabs/Module/Settings/Featured.php8
-rw-r--r--Zotlabs/Module/Setup.php5
-rw-r--r--Zotlabs/Module/Sslify.php14
-rw-r--r--Zotlabs/Module/Wiki.php4
-rw-r--r--Zotlabs/Widget/Affinity.php9
9 files changed, 56 insertions, 16 deletions
diff --git a/Zotlabs/Identity/OAuth2Storage.php b/Zotlabs/Identity/OAuth2Storage.php
index bbf61cf2b..a4ba9c526 100644
--- a/Zotlabs/Identity/OAuth2Storage.php
+++ b/Zotlabs/Identity/OAuth2Storage.php
@@ -64,7 +64,7 @@ class OAuth2Storage extends \OAuth2\Storage\Pdo {
return( [
'webfinger' => channel_reddress($x),
'portable_id' => $x['channel_hash'],
- 'email' => $a['account_email'],
+ 'email' => $a[0]['account_email'],
'username' => $x['channel_address'],
'user_id' => $x['channel_id'],
'name' => $x['channel_name'],
diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php
index 58c16be45..ca132c01e 100644
--- a/Zotlabs/Module/Articles.php
+++ b/Zotlabs/Module/Articles.php
@@ -17,8 +17,16 @@ class Articles extends Controller {
if(argc() > 1)
$which = argv(1);
- else
- return;
+
+ if(! $which) {
+ if(local_channel()) {
+ $channel = App::get_channel();
+ if($channel && $channel['channel_address'])
+ $which = $channel['channel_address'];
+ } else {
+ return;
+ }
+ }
profile_load($which);
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index b93faa612..d5cc06d09 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -132,6 +132,13 @@ class Network extends \Zotlabs\Web\Controller {
$deftag = '';
+ if (feature_enabled(local_channel(),'affinity')) {
+ $affinity_locked = intval(get_pconfig(local_channel(),'affinity','lock',1));
+ if ($affinity_locked) {
+ set_pconfig(local_channel(),'affinity','cmin',$cmin);
+ set_pconfig(local_channel(),'affinity','cmax',$cmax);
+ }
+ }
if(x($_GET,'search') || $file || (!$pf && $cid) || $hashtags || $verb || $category || $conv || $unseen)
$nouveau = true;
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index ddff3a68e..e236cc5f4 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -32,7 +32,7 @@ class Photo extends \Zotlabs\Web\Controller {
}
$cache_mode = array(
- 'on' => get_config('system','photo_cache_enable', 0),
+ 'on' => false,
'age' => 86400,
'exp' => true,
'leak' => false
@@ -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/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php
index 542a05363..1d903fcf7 100644
--- a/Zotlabs/Module/Settings/Featured.php
+++ b/Zotlabs/Module/Settings/Featured.php
@@ -17,8 +17,12 @@ class Featured {
$cmin = intval($_POST['affinity_cmin']);
if($cmin < 0 || $cmin > 99)
$cmin = 0;
+
+ $lock = ($_POST['affinity_lock']) ? intval($_POST['affinity_lock']) : 1;
+
set_pconfig(local_channel(),'affinity','cmin',$cmin);
set_pconfig(local_channel(),'affinity','cmax',$cmax);
+ set_pconfig(local_channel(),'affinity','lock',$lock);
info( t('Affinity Slider settings updated.') . EOL);
@@ -49,6 +53,10 @@ class Featured {
$setting_fields .= replace_macros(get_markup_template('field_input.tpl'), array(
'$field' => array('affinity_cmin', t('Default minimum affinity level'), $cmin, t('0-99 - default 0'))
));
+ $lock = intval(get_pconfig(local_channel(),'affinity','lock',1));
+ $setting_fields .= replace_macros(get_markup_template('field_checkbox.tpl'), array(
+ '$field' => array('affinity_lock', t('Always reset on new page visit.'), $lock, t('default: yes'), Array('No','Yes'))
+ ));
$settings_addons .= replace_macros(get_markup_template('generic_addon_settings.tpl'), array(
'$addon' => array('affinity_slider', '' . t('Affinity Slider Settings'), '', t('Submit')),
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();
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 892810241..502f96a62 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -442,8 +442,8 @@ class Wiki extends Controller {
$mimeType = $_POST['mimetype'];
if($mimeType === 'text/bbcode') {
- $linkconverted = NativeWikiPage::convert_links($content,$wikiURL);
- $html = zidify_links(smilies(bbcode($linkconverted)));
+ $html = zidify_links(smilies(bbcode($content)));
+ $html = NativeWikiPage::convert_links($html,$wikiURL);
}
elseif($mimeType === 'text/markdown') {
$linkconverted = NativeWikiPage::convert_links($content,$wikiURL);
diff --git a/Zotlabs/Widget/Affinity.php b/Zotlabs/Widget/Affinity.php
index 4fb2874ae..28190e187 100644
--- a/Zotlabs/Widget/Affinity.php
+++ b/Zotlabs/Widget/Affinity.php
@@ -15,9 +15,14 @@ class Affinity {
$cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : $default_cmin);
$cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : $default_cmax);
-
if(feature_enabled(local_channel(),'affinity')) {
+ $affinity_locked = intval(get_pconfig(local_channel(),'affinity','lock',1));
+ if ($affinity_locked) {
+ set_pconfig(local_channel(),'affinity','cmin',$cmin);
+ set_pconfig(local_channel(),'affinity','cmax',$cmax);
+ }
+
$labels = array(
t('Me'),
t('Family'),
@@ -53,4 +58,4 @@ class Affinity {
return '';
}
}
- \ No newline at end of file
+