From fa36bf91e566d76828347a95f8eb07b8bec1eaad Mon Sep 17 00:00:00 2001 From: TheRON Date: Sat, 6 Jun 2026 05:05:03 -0400 Subject: [PATCH] Updated --- hubzilla/addon/assoc_profile/assoc_profile.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hubzilla/addon/assoc_profile/assoc_profile.php b/hubzilla/addon/assoc_profile/assoc_profile.php index ade6295..fe67e9f 100644 --- a/hubzilla/addon/assoc_profile/assoc_profile.php +++ b/hubzilla/addon/assoc_profile/assoc_profile.php @@ -12,12 +12,12 @@ function assoc_profile_module() {} function assoc_profile_load() { register_hook('profile_edit', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_edit_hook'); - register_hook('profile_view', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook'); + register_hook('profile_advanced', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook'); } function assoc_profile_unload() { unregister_hook('profile_edit', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_edit_hook'); - unregister_hook('profile_view', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook'); + unregister_hook('profile_advanced', 'addon/assoc_profile/assoc_profile.php', 'assoc_profile_view_hook'); } // ---------------------------------------------------------------------------- @@ -149,9 +149,8 @@ function assoc_profile_edit_hook(&$b) { // PROFILE VIEW HOOK // ---------------------------------------------------------------------------- -function assoc_profile_view_hook(&$b) { - $profile = $b['profile'] ?? []; - $uid = intval($profile['uid'] ?? 0); +function assoc_profile_view_hook(&$o) { + $uid = intval(App::$profile['profile_uid'] ?? 0); if (!$uid) return; $r = q("SELECT channel_address FROM channel WHERE channel_id = %d LIMIT 1", @@ -166,7 +165,7 @@ function assoc_profile_view_hook(&$b) { head_add_css('/addon/assoc_profile/view/css/assoc_profile.css'); } - $b['html'] .= assoc_render_view($entry); + $o .= assoc_render_view($entry); } // ----------------------------------------------------------------------------