aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-09-14 12:31:19 +0000
committerMario <mario@mariovavti.com>2022-09-14 12:31:19 +0000
commit1d56b9a1bb155d7a0b4377f9bb1e195230e545e4 (patch)
treef7b6413727a97cfa0512dc9701d493d6751dc741 /include/channel.php
parent96535ee4df967f04d4cc6c3b7f9ab335a50f543d (diff)
downloadvolse-hubzilla-1d56b9a1bb155d7a0b4377f9bb1e195230e545e4.tar.gz
volse-hubzilla-1d56b9a1bb155d7a0b4377f9bb1e195230e545e4.tar.bz2
volse-hubzilla-1d56b9a1bb155d7a0b4377f9bb1e195230e545e4.zip
php8: warning fixes
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/channel.php b/include/channel.php
index 68e7fdf31..a309fa5c8 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1376,19 +1376,19 @@ function profile_load($nickname, $profile = '') {
}
// get the current observer
- $observer = App::get_observer();
+ $observer_hash = get_observer_hash();
$can_view_profile = true;
// Can the observer see our profile?
require_once('include/permissions.php');
- if(! perm_is_allowed($user[0]['channel_id'],$observer['xchan_hash'],'view_profile')) {
+ if(! perm_is_allowed($user[0]['channel_id'], $observer_hash, 'view_profile')) {
$can_view_profile = false;
}
- if(! $profile) {
+ if($observer_hash && !$profile) {
$r = q("SELECT abook_profile FROM abook WHERE abook_xchan = '%s' and abook_channel = '%d' limit 1",
- dbesc($observer['xchan_hash']),
+ dbesc($observer_hash),
intval($user[0]['channel_id'])
);
if($r)
@@ -1575,14 +1575,14 @@ function profile_edit_menu($uid) {
*/
function profile_sidebar($profile, $block = 0, $show_connect = true, $details = false) {
- $observer = App::get_observer();
+ $observer_hash = get_observer_hash();
$o = '';
$location = false;
$pdesc = true;
$reddress = true;
- if(! perm_is_allowed($profile['uid'],((is_array($observer)) ? $observer['xchan_hash'] : ''),'view_profile')) {
+ if(! perm_is_allowed($profile['uid'], $observer_hash, 'view_profile')) {
$block = true;
}
@@ -1654,7 +1654,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $details =
$menu = get_pconfig($profile['uid'],'system','channel_menu');
if($menu && ! $block) {
require_once('include/menu.php');
- $m = menu_fetch($menu,$profile['uid'],$observer['xchan_hash']);
+ $m = menu_fetch($menu,$profile['uid'], $observer_hash);
if($m)
$channel_menu = menu_render($m);
}