aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Profiles.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-10 12:29:05 +0000
committerMario <mario@mariovavti.com>2021-09-10 12:29:05 +0000
commite5dc3c05dfb79df79f4fd14496bc5e646217c27e (patch)
tree3d57250415940472e53f4f94526b74b0b914031e /Zotlabs/Module/Profiles.php
parente2d0269b5c9f1f1b865e1c0473a6bc0a0a0a1740 (diff)
downloadvolse-hubzilla-e5dc3c05dfb79df79f4fd14496bc5e646217c27e.tar.gz
volse-hubzilla-e5dc3c05dfb79df79f4fd14496bc5e646217c27e.tar.bz2
volse-hubzilla-e5dc3c05dfb79df79f4fd14496bc5e646217c27e.zip
when updating the channel name from profiles make sure to lookup the xchan entry by xchan_hash since xchan_url is set to the primary location but we might be updating from a clone
Diffstat (limited to 'Zotlabs/Module/Profiles.php')
-rw-r--r--Zotlabs/Module/Profiles.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 452af4d78..631a41ddc 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -606,10 +606,10 @@ class Profiles extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
if($namechanged && $is_default) {
- $r = q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_url = '%s'",
+ $r = q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_hash = '%s'",
dbesc($name),
dbesc(datetime_convert()),
- dbesc(z_root() . '/channel/' . $channel['channel_address'])
+ dbesc($channel['xchan_hash'])
);
$r = q("UPDATE channel SET channel_name = '%s' WHERE channel_hash = '%s'",
dbesc($name),