aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings
diff options
context:
space:
mode:
authornobody <nobody@zotlabs.com>2020-09-19 23:45:37 +0000
committerMario <mario@mariovavti.com>2020-09-21 10:35:14 +0200
commit34217f5f901ae4dca180bceccef425de1eef4aeb (patch)
treeb9bab1e683317abc15dfe174c72e96abf91f8f6e /Zotlabs/Module/Settings
parent04af502e3a9f360239a0bb4bca46cca1e866d2bf (diff)
downloadvolse-hubzilla-34217f5f901ae4dca180bceccef425de1eef4aeb.tar.gz
volse-hubzilla-34217f5f901ae4dca180bceccef425de1eef4aeb.tar.bz2
volse-hubzilla-34217f5f901ae4dca180bceccef425de1eef4aeb.zip
apply channel name changes to all associated xchans
(cherry picked from commit f2ac1e4b7d2aa4854ed08ded49b2ed2dd10fab59)
Diffstat (limited to 'Zotlabs/Module/Settings')
-rw-r--r--Zotlabs/Module/Settings/Channel.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index ab9b72490..2eed1efc9 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -274,10 +274,11 @@ class Channel {
}
if($name_change) {
- $r = 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
+ $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s' where xchan_url = '%s'",
dbesc($username),
dbesc(datetime_convert()),
- dbesc($channel['channel_hash'])
+ dbesc(z_root() . '/channel/' . $channel['channel_address'])
);
$r = q("update profile set fullname = '%s' where uid = %d and is_default = 1",
dbesc($username),