mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
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:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ use App;
|
||||
|
||||
class Profile {
|
||||
function widget($args) {
|
||||
if(!isset(App::$profile['profile_uid'])) {
|
||||
if (empty(App::$profile['profile_uid'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user