diff options
author | Mario <mario@mariovavti.com> | 2022-01-12 21:08:29 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-01-12 21:08:29 +0000 |
commit | abe3039926dd388108e620148868880cb1da3fa3 (patch) | |
tree | 5df8a062da5e7829d23045fc7e197392a9655baa /Zotlabs/Module/Profiles.php | |
parent | 82a1117e917a0c97de961f31f4d4aea7affa069f (diff) | |
download | volse-hubzilla-abe3039926dd388108e620148868880cb1da3fa3.tar.gz volse-hubzilla-abe3039926dd388108e620148868880cb1da3fa3.tar.bz2 volse-hubzilla-abe3039926dd388108e620148868880cb1da3fa3.zip |
ux improvements
Diffstat (limited to 'Zotlabs/Module/Profiles.php')
-rw-r--r-- | Zotlabs/Module/Profiles.php | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index ca0ca4f1a..70f6b1125 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -163,34 +163,6 @@ class Profiles extends \Zotlabs\Web\Controller { killme(); } - - - - // Run profile_load() here to make sure the theme is set before - // we start loading content - if(((argc() > 1) && (intval(argv(1)))) || !feature_enabled(local_channel(),'multi_profiles')) { - if(feature_enabled(local_channel(),'multi_profiles')) - $id = \App::$argv[1]; - else { - $x = q("select id from profile where uid = %d and is_default = 1", - intval(local_channel()) - ); - if($x) - $id = $x[0]['id']; - } - $r = q("SELECT * FROM profile WHERE id = %d AND uid = %d LIMIT 1", - intval($id), - intval(local_channel()) - ); - if(! count($r)) { - notice( t('Profile not found.') . EOL); - \App::$error = 404; - return; - } - - $chan = \App::get_channel(); - profile_load($chan['channel_address'],$r[0]['id']); - } } function post() { @@ -628,8 +600,6 @@ class Profiles extends \Zotlabs\Web\Controller { } if($is_default) { - // reload the info for the sidebar widget - profile_load($channel['channel_address']); \Zotlabs\Daemon\Master::Summon(array('Directory',local_channel())); } } @@ -640,13 +610,13 @@ class Profiles extends \Zotlabs\Web\Controller { $o = ''; - $channel = \App::get_channel(); - if(! local_channel()) { notice( t('Permission denied.') . EOL); return; } + $channel = \App::get_channel(); + require_once('include/channel.php'); $profile_fields_basic = get_profile_fields_basic(); @@ -662,6 +632,7 @@ class Profiles extends \Zotlabs\Web\Controller { if($x) $id = $x[0]['id']; } + $r = q("SELECT * FROM profile WHERE id = %d AND uid = %d LIMIT 1", intval($id), intval(local_channel()) @@ -672,6 +643,9 @@ class Profiles extends \Zotlabs\Web\Controller { return; } + // make sure we got uptodate data + profile_load($channel['channel_address'], $id); + $editselect = 'none'; \App::$page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array( |