diff options
author | Mario <mario@mariovavti.com> | 2022-01-18 10:24:52 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-01-18 10:24:52 +0000 |
commit | dce249f7a9201cd13aa4f8762e22e4fe5e407bca (patch) | |
tree | c3c770b423065e95c90c0532df0afd0d77a511ef /Zotlabs/Module/Profiles.php | |
parent | c4b09f1a4f6274b0c96c7ed742f845bdba413171 (diff) | |
download | volse-hubzilla-dce249f7a9201cd13aa4f8762e22e4fe5e407bca.tar.gz volse-hubzilla-dce249f7a9201cd13aa4f8762e22e4fe5e407bca.tar.bz2 volse-hubzilla-dce249f7a9201cd13aa4f8762e22e4fe5e407bca.zip |
change name on all associated xchans by matching the url
Diffstat (limited to 'Zotlabs/Module/Profiles.php')
-rw-r--r-- | Zotlabs/Module/Profiles.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index 325424378..e248cd028 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -579,10 +579,11 @@ class Profiles extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); if($namechanged && $is_default) { - q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_hash = '%s'", + // change name on all associated xchans by matching the url + q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_url = '%s'", dbesc($name), dbesc(datetime_convert()), - dbesc($channel['xchan_hash']) + dbesc(z_root() . '/channel/' . $channel['channel_address']) ); q("UPDATE channel SET channel_name = '%s' WHERE channel_hash = '%s'", dbesc($name), |