do not set App::$profile for removed channels and minor cleanup

(cherry picked from commit b20ed4f455)

Co-authored-by: Mario <mario@mariovavti.com>
This commit is contained in:
Mario
2026-05-18 19:00:15 +00:00
parent 8c4457db8b
commit a0ea19e51c
3 changed files with 9 additions and 7 deletions

View File

@@ -60,19 +60,18 @@ class Profile extends Controller {
'rel' => 'alternate',
'type' => 'application/atom+xml',
'title' => t('Posts and comments'),
'href' => z_root() . '/feed/' . $which
'href' => z_root() . '/feed/' . $which . '?top=0'
]);
head_add_link([
'rel' => 'alternate',
'type' => 'application/atom+xml',
'title' => t('Only posts'),
'href' => z_root() . '/feed/' . $which . '?f=&top=1'
'href' => z_root() . '/feed/' . $which . '?top=1'
]);
if (!$profile) {
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1",
$x = q("select channel_id as profile_uid from channel where channel_address = '%s' and channel_removed = 0 limit 1",
dbesc(argv(1))
);
if ($x) {

View File

@@ -8,15 +8,18 @@
namespace Zotlabs\Widget;
use App;
class Fullprofile {
function widget($arr) {
if(!(isset(\App::$profile['profile_uid']) && \App::$profile['profile_uid']))
if (empty(App::$profile['profile_uid'])) {
return;
}
$block = observer_prohibited();
return profile_sidebar(\App::$profile, $block, true, true);
return profile_sidebar(App::$profile, $block, true, true);
}
}

View File

@@ -13,7 +13,7 @@ use App;
class Profile {
function widget($args) {
if(!isset(App::$profile['profile_uid'])) {
if (empty(App::$profile['profile_uid'])) {
return;
}