aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-12 10:07:15 +0000
committerMario <mario@mariovavti.com>2021-03-12 10:07:15 +0000
commit3f053611bdbbd4a26a5d9c76a294b7ada07f0726 (patch)
treeb8b16b780d0353ede8580b41ec9e16f622c94c87 /Zotlabs/Module/Channel.php
parentc29261487cdecda4282df25769540bc4fa20631d (diff)
parent1582b8bc9620a661823c608c0c7023a70554214b (diff)
downloadvolse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.tar.gz
volse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.tar.bz2
volse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.zip
Merge branch 'dev' into air
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r--Zotlabs/Module/Channel.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index a513523a7..ab5000b9a 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -27,8 +27,8 @@ class Channel extends Controller {
function init() {
- if (in_array(substr($_GET['search'], 0, 1), ['@', '!', '?']) || strpos($_GET['search'], 'https://') === 0)
- goaway('search' . '?f=&search=' . $_GET['search']);
+ if (array_key_exists('search', $_GET) && (in_array(substr($_GET['search'], 0, 1), ['@', '!', '?']) || strpos($_GET['search'], 'https://') === 0))
+ goaway(z_root() . '/search?f=&search=' . $_GET['search']);
$which = null;
if (argc() > 1)
@@ -155,7 +155,7 @@ class Channel extends Controller {
intval($channel['channel_id'])
);
- opengraph_add_meta($r ? $r[0] : [], $channel);
+ opengraph_add_meta((isset($r) && count($r) ? $r[0] : []), $channel);
}
function get($update = 0, $load = false) {
@@ -168,7 +168,7 @@ class Channel extends Controller {
if (strpos($mid, 'b64.') === 0)
$decoded = @base64url_decode(substr($mid, 4));
- if ($decoded)
+ if (isset($decoded))
$mid = $decoded;
$datequery = ((x($_GET, 'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
@@ -328,6 +328,7 @@ class Channel extends Controller {
}
else {
+ $sql_extra2 = '';
if (x($category)) {
$sql_extra2 .= protect_sprintf(term_item_parent_query(App::$profile['profile_uid'], 'item', $category, TERM_CATEGORY));
}
@@ -419,7 +420,7 @@ class Channel extends Controller {
if ((!$update) && (!$load)) {
- if ($decoded)
+ if (isset($decoded))
$mid = 'b64.' . base64url_encode($mid);
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
@@ -485,7 +486,7 @@ class Channel extends Controller {
$o .= conversation($items, $mode, $update, $page_mode);
- if ($mid && $items[0]['title'])
+ if ($mid && count($items) > 0 && isset($items[0]['title']))
App::$page['title'] = $items[0]['title'] . " - " . App::$page['title'];
}