diff options
author | Mario <mario@mariovavti.com> | 2021-09-10 12:29:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-10 14:34:21 +0200 |
commit | 0f803aa3aeb23917f0edc76e72239d7e1378334a (patch) | |
tree | fa7e469c32f286be24b46697b187f984dad60aff | |
parent | 1cfe5c3e16f901804a758f7e2a61bec1eac23c2f (diff) | |
download | volse-hubzilla-0f803aa3aeb23917f0edc76e72239d7e1378334a.tar.gz volse-hubzilla-0f803aa3aeb23917f0edc76e72239d7e1378334a.tar.bz2 volse-hubzilla-0f803aa3aeb23917f0edc76e72239d7e1378334a.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
(cherry picked from commit e5dc3c05dfb79df79f4fd14496bc5e646217c27e)
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Profiles.php | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 9c232f34d..3f1f16b09 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -2745,7 +2745,6 @@ class Libzot { } $e = $r[0]; - $id = $e['channel_id']; $sys_channel = (intval($e['channel_system']) ? true : false); 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), |