aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-21 07:33:02 +0000
committerMario <mario@mariovavti.com>2021-09-21 07:33:02 +0000
commit7122e1522ab9350755f0c34131f1be074b0ed79e (patch)
tree6918ff9ae2eeea1eea6fab5c9bf3582be6f17cea /Zotlabs/Module
parent5497adfde6e1df941d42bb8fb6e18b261402716e (diff)
downloadvolse-hubzilla-7122e1522ab9350755f0c34131f1be074b0ed79e.tar.gz
volse-hubzilla-7122e1522ab9350755f0c34131f1be074b0ed79e.tar.bz2
volse-hubzilla-7122e1522ab9350755f0c34131f1be074b0ed79e.zip
perform profile sync after all the fields are updated otherwise we will sync outdated data
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Profiles.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 631a41ddc..73bae45e8 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -595,30 +595,31 @@ class Profiles extends \Zotlabs\Web\Controller {
if($r)
info( t('Profile updated.') . EOL);
- $r = q("select * from profile where id = %d and uid = %d limit 1",
- intval(argv(1)),
- intval(local_channel())
- );
- if($r) {
- Libsync::build_sync_packet(local_channel(),array('profile' => $r));
- }
-
$channel = \App::get_channel();
if($namechanged && $is_default) {
- $r = q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_hash = '%s'",
+ q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_hash = '%s'",
dbesc($name),
dbesc(datetime_convert()),
dbesc($channel['xchan_hash'])
);
- $r = q("UPDATE channel SET channel_name = '%s' WHERE channel_hash = '%s'",
+ q("UPDATE channel SET channel_name = '%s' WHERE channel_hash = '%s'",
dbesc($name),
dbesc($channel['xchan_hash'])
);
}
+ $r = q("select * from profile where id = %d and uid = %d limit 1",
+ intval(argv(1)),
+ intval(local_channel())
+ );
+
+ if($r) {
+ Libsync::build_sync_packet(local_channel(), ['profile' => $r]);
+ }
+
if($is_default) {
- // reload the info for the sidebar widget - why does this not work?
+ // reload the info for the sidebar widget
profile_load($channel['channel_address']);
\Zotlabs\Daemon\Master::Summon(array('Directory',local_channel()));
}