aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-05-15 15:16:05 +0200
committerMario Vavti <mario@mariovavti.com>2021-05-15 15:16:05 +0200
commit2ee1e2af723ef812a6072fc26c175f1ca5819be5 (patch)
tree90cf55939df0a3f711ca5009f9330fcaca76c734 /Zotlabs
parentc3ad21c5486c58ae08aabbbbfbd23afdab15ec0c (diff)
parent635a24dff477548bdcf601874cb1ff2509aef3cc (diff)
downloadvolse-hubzilla-2ee1e2af723ef812a6072fc26c175f1ca5819be5.tar.gz
volse-hubzilla-2ee1e2af723ef812a6072fc26c175f1ca5819be5.tar.bz2
volse-hubzilla-2ee1e2af723ef812a6072fc26c175f1ca5819be5.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Magic.php3
-rw-r--r--Zotlabs/Module/Photos.php8
-rw-r--r--Zotlabs/Module/Sse.php3
3 files changed, 8 insertions, 6 deletions
diff --git a/Zotlabs/Module/Magic.php b/Zotlabs/Module/Magic.php
index b4372e26d..bfd38d2fa 100644
--- a/Zotlabs/Module/Magic.php
+++ b/Zotlabs/Module/Magic.php
@@ -40,7 +40,7 @@ class Magic extends Controller {
goaway($dest);
}
- $basepath = $parsed['scheme'] . '://' . $parsed['host'] . (($parsed['port']) ? ':' . $parsed['port'] : '');
+ $basepath = $parsed['scheme'] . '://' . $parsed['host'] . (isset($parsed['port']) ? ':' . $parsed['port'] : '');
$owapath = SConfig::get($basepath,'system','openwebauth', $basepath . '/owa');
// This is ready-made for a plugin that provides a blacklist or "ask me" before blindly authenticating.
@@ -110,6 +110,7 @@ class Magic extends Controller {
$headers['(request-target)'] = 'post ' . '/owa';
$headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'], channel_url($channel),true,'sha512');
+ $redirects = 0;
$x = z_post_url($owapath,$data,$redirects,[ 'headers' => $headers ]);
logger('owa fetch returned: ' . print_r($x,true),LOGGER_DATA);
if ($x['success']) {
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index 099289c03..e62accb06 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -876,7 +876,7 @@ class Photos extends \Zotlabs\Web\Controller {
$prevlink = '';
$nextlink = '';
- if($_GET['order'] === 'posted')
+ if(isset($_GET['order']) && $_GET['order'] === 'posted')
$order = 'ASC';
else
$order = 'DESC';
@@ -901,8 +901,8 @@ class Photos extends \Zotlabs\Web\Controller {
}
}
- $prevlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$prv]['hash'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
- $nextlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$nxt]['hash'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
+ $prevlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$prv]['hash'] . (($order == 'ASC') ? '?f=&order=posted' : '');
+ $nextlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$nxt]['hash'] . (($order == 'ASC') ? '?f=&order=posted' : '');
}
@@ -987,7 +987,7 @@ class Photos extends \Zotlabs\Web\Controller {
}
$tags = array();
- if($link_item['term']) {
+ if(x($link_item, 'term')) {
$cnt = 0;
foreach($link_item['term'] as $t) {
$tags[$cnt] = array(0 => format_term_for_display($t));
diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php
index 8bea65207..6f3df299f 100644
--- a/Zotlabs/Module/Sse.php
+++ b/Zotlabs/Module/Sse.php
@@ -108,7 +108,8 @@ class Sse extends Controller {
echo 'data: {}';
echo "\n\n";
- ob_end_flush();
+ if(ob_get_length() > 0)
+ ob_end_flush();
flush();
if(connection_status() != CONNECTION_NORMAL || connection_aborted()) {