From 20f4538db4fdfe74c060670caf46a754f856313e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 13 Apr 2023 22:28:08 +0200 Subject: update remove_all_xchan_resources() and remove deletion of deprecated conv table --- include/channel.php | 1 - 1 file changed, 1 deletion(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index c36e50f19..bb213f102 100644 --- a/include/channel.php +++ b/include/channel.php @@ -2855,7 +2855,6 @@ function channel_remove($channel_id, $local = true, $unset_session = false) { q("DELETE FROM app WHERE app_channel = %d", intval($channel_id)); q("DELETE FROM atoken WHERE atoken_uid = %d", intval($channel_id)); q("DELETE FROM chatroom WHERE cr_uid = %d", intval($channel_id)); - q("DELETE FROM conv WHERE uid = %d", intval($channel_id)); q("DELETE FROM pgrp WHERE uid = %d", intval($channel_id)); q("DELETE FROM pgrp_member WHERE uid = %d", intval($channel_id)); -- cgit v1.2.3 From 93278c00b745a67fda03395f73c79cb2ddeb12d7 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 6 May 2023 19:41:02 +0000 Subject: update profile vcard to implement the cover image --- include/channel.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index bb213f102..01302a1b9 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1583,6 +1583,10 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $details = $reddress = true; $connect_url = ''; $connect = ''; + $default_cover = get_config('system', 'default_cover_photo', 'hubzilla'); + $default_cover_url = z_root() . '/images/default_cover_photos/' . $default_cover . '/425.png'; + + if(! perm_is_allowed($profile['uid'], $observer_hash, 'view_profile')) { $block = true; @@ -1681,9 +1685,11 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $details = '$homepage' => $homepage, '$chanmenu' => $channel_menu, '$reddress' => $reddress, + '$no_pdesc' => t('This channel has not added a profile description yet'), '$contact_block' => $contact_block, '$change_photo' => t('Change your profile photo'), - '$editmenu' => profile_edit_menu($profile['uid']) + '$editmenu' => profile_edit_menu($profile['uid']), + '$cover' => get_cover_photo($profile['uid'], 'array', PHOTO_RES_COVER_425) ?: ['url' => $default_cover_url] )); $arr = [ @@ -2404,7 +2410,7 @@ function get_zcard($channel, $observer_hash = '', $args = array()) { $cover = $r[0]; $cover['href'] = z_root() . '/photo/' . $r[0]['resource_id'] . '-' . $r[0]['imgscale']; } else { - $default_cover = get_config('system','default_cover_photo','bggenerator'); + $default_cover = get_config('system', 'default_cover_photo', 'hubzilla'); $cover = [ 'href' => z_root() . '/images/default_cover_photos/' . $default_cover . '/' . $cover_width . '.png' ]; } @@ -2478,7 +2484,7 @@ function get_zcard_embed($channel, $observer_hash = '', $args = array()) { $cover['href'] = z_root() . '/photo/' . $r[0]['resource_id'] . '-' . $r[0]['imgscale']; } else { - $default_cover = get_config('system','default_cover_photo','bggenerator'); + $default_cover = get_config('system', 'default_cover_photo', 'hubzilla'); $cover = [ 'href' => z_root() . '/images/default_cover_photos/' . $default_cover . '/' . $cover_width . '.png' ]; } -- cgit v1.2.3