aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Profile.php
diff options
context:
space:
mode:
authornobody <nobody@zotlabs.com>2021-04-05 23:15:01 -0700
committernobody <nobody@zotlabs.com>2021-04-05 23:15:01 -0700
commit9359fc065c72243bd85f0fc3db842976f07183cc (patch)
tree37551feefe6fff472b9c346a7a8c3cd9080d8946 /Zotlabs/Module/Profile.php
parent878be8fff0328ee4ab978de20e7e385244ac54ec (diff)
parent19daadbfd7f281e27dffdc53d0e8ebeb837e1ae3 (diff)
downloadvolse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.gz
volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.bz2
volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Module/Profile.php')
-rw-r--r--Zotlabs/Module/Profile.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/Zotlabs/Module/Profile.php b/Zotlabs/Module/Profile.php
index 118f11f64..bcc7ad930 100644
--- a/Zotlabs/Module/Profile.php
+++ b/Zotlabs/Module/Profile.php
@@ -29,26 +29,28 @@ class Profile extends Controller {
return;
}
- $profile = '';
- $channel = App::get_channel();
-
- if (!$channel)
- http_status_exit(404, 'Not found');
-
if (ActivityStreams::is_as_request()) {
+ $channel = channelx_by_nick($which);
+ if (!$channel) {
+ http_status_exit(404, 'Not found');
+ }
+
$p = Activity::encode_person($channel, true);
as_return_and_die(['type' => 'Profile', 'describes' => $p], $channel);
}
- nav_set_selected('Profile');
+ $profile = '';
if ((local_channel()) && (argc() > 2) && (argv(2) === 'view')) {
+ $channel = App::get_channel();
$which = $channel['channel_address'];
$profile = argv(1);
- $r = q("select profile_guid from profile where id = %d and uid = %d limit 1",
+
+ $r = q("select profile_guid from profile where id = %d and uid = %d limit 1",
intval($profile),
intval(local_channel())
);
+
if (!$r)
$profile = '';
$profile = $r[0]['profile_guid'];
@@ -80,7 +82,6 @@ class Profile extends Controller {
profile_load($which, $profile);
-
}
function get() {
@@ -89,11 +90,10 @@ class Profile extends Controller {
return login();
}
- $groups = [];
-
+ nav_set_selected('Profile');
- $tab = 'profile';
- $o = '';
+ $groups = [];
+ $o = '';
if (!(perm_is_allowed(App::$profile['profile_uid'], get_observer_hash(), 'view_profile'))) {
notice(t('Permission denied.') . EOL);